Bug #57749 vs-config option of mysql-test-run does not work
Submitted: 26 Oct 2010 18:42 Modified: 20 Nov 2010 0:06
Reporter: Santo Leto Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.5-bzr OS:Windows (Vista)
Assigned to: Bjørn Munch CPU Architecture:Any
Tags: mysql-test-run, vs-config

[26 Oct 2010 18:42] Santo Leto
Description:
It seems that the option "vs-config" of mysql-test-run.pl does not work.

- Test 1:

D:\mysql-server\mysql-5.5-build1\mysql-test>mysql-test-run.pl --vs-config debug --force --timer

Logging: D:\mysql-server\mysql-5.5-build1\mysql-test\mysql-test-run.pl  --vs-config debug --force --timer
MySQL Version 5.5.7
Checking supported features...
 - skipping ndbcluster, mysqld not compiled with ndbcluster
 - SSL connections supported
 - binaries are debug compiled
mysql-test-run: *** ERROR: Could not find D:/mysql-server/mysql-5.5-build1/client/mysqladmin

--> thus one could think that the client-bindir option is needed:

- Test 2:
 
D:\mysql-server\mysql-5.5-build1\mysql-test>mysql-test-run.pl --vs-config debug  --force --timer --client-bindir="D:\mysql-server\mysql-5.5-build1\client\Debug"
 
Logging: D:\mysql-server\mysql-5.5-build1\mysql-test\mysql-test-run.pl  --vs-con
 fig debug --force --timer --client-bindir=D:\mysql-server\mysql-5.5-build1\client\Debug
 MySQL Version 5.5.7
 Checking supported features...
  - skipping ndbcluster, mysqld not compiled with ndbcluster
  - SSL connections supported
  - binaries are debug compiled
 Collecting tests...
 mysql-test-run: *** ERROR: Could not find 'debug' in 'main,sys_vars,binlog,federated,rpl,rpl_ndb,ndb,innodb,perfschema' suite(s)
 
--> still errors, but if we set the environment variable instead of vs-option, tests start without errors.

Please note that if you use the = to set vs-config option, you get an invalid option error: 

- Test 3:

D:\mysql-server\mysql-5.5-build1\mysql-test>mysql-test-run.pl --vs-config=debug --force --timer

 Logging: D:\mysql-server\mysql-5.5-build1\mysql-test\mysql-test-run.pl  --vs-con fig=debug --force --timer
 MySQL Version 5.5.7
 Invalid option "--vs-config=debug"

How to repeat:
mysql-test-run.pl --vs-config debug --force --timer

Suggested fix:
Use the environment variable MTR_VS_CONFIG. Then invoke the script in the following way:

perl mysql-test-run.pl --force --timer
[26 Oct 2010 19:06] MySQL Verification Team
Thank you for the bug report.
[5 Nov 2010 9:20] Bjørn Munch
Looks like --vs-config has not been coded to take an argument as it should. Apparently this option is not much used since it hasn't been reported before, but of course it needs to be correct. I'll have a look.
[5 Nov 2010 11:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/122938

3107 Bjorn Munch	2010-11-05
      Bug #57749 vs-config option of mysql-test-run does not work
      Option was incorrectly coded without an argument
      Added the missing =s
[5 Nov 2010 12:16] Magnus Blåudd
Once tried to make the somewhat windows specific --vs-config= option more generic and added the below code in lib/My/Find.pm, I would suggest fixing that properly and add a --build-dir= option as an alias to --vs-config. Patch is approved as is of course.

>  # User can select to look in a special build dir
>  # which is a subdirectory of any of the paths
>  my @extra_dirs;
>  my $build_dir= $vs_config_dir || $ENV{MTR_VS_CONFIG} || $ENV{MTR_BUILD_DIR};
>  push(@extra_dirs, $build_dir) if defined $build_dir;
[7 Nov 2010 14:58] Bjørn Munch
Pushed to 5.5-mtr and trunk-mtr
[13 Nov 2010 16:13] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:alexander.nozdrin@oracle.com-20101113152450-2zzcm50e7i4j35v7) (merge vers: 5.6.1-m4) (pib:21)
[13 Nov 2010 16:34] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:alexander.nozdrin@oracle.com-20101113152540-gxro4g0v29l27f5x) (pib:21)
[14 Nov 2010 2:51] Paul DuBois
Changes to test suite. No changelog entry needed.
[16 Dec 2010 22:29] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (version source revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (merge vers: 5.5.9) (pib:24)