From 7ede6ce344ad7d4accacd5a04dad3e1fbe019e5a Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 24 Feb 2011 15:11:05 +0100 Subject: [PATCH] 11766640 follow-up: fix for VS_CONFIG on Windows --- mysql-test/lib/My/Find.pm | 5 ++--- mysql-test/mysql-test-run.pl | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mysql-test/lib/My/Find.pm b/mysql-test/lib/My/Find.pm index a44c9a7508c..521adecfd13 100644 --- a/mysql-test/lib/My/Find.pm +++ b/mysql-test/lib/My/Find.pm @@ -28,8 +28,6 @@ use My::Platform; use base qw(Exporter); our @EXPORT= qw(my_find_bin my_find_dir my_find_file NOT_REQUIRED); -our $vs_config_dir; - my $bin_extension= ".exe" if IS_WINDOWS; # Helper function to be used for fourth parameter to find functions @@ -158,7 +156,8 @@ sub my_find_paths { # 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}; + my $build_dir= $::opt_config_dir || $ENV{MTR_VS_CONFIG} + || $ENV{MTR_BUILD_DIR}; push(@extra_dirs, $build_dir) if defined $build_dir; if (defined $extension){ diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 05bfd4eae02..87f22ac7e45 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -5677,6 +5677,7 @@ sub run_ctest() { chdir ($bindir) or die ("Could not chdir to $bindir"); my $tinfo; my $no_ctest= (IS_WINDOWS) ? 256 : -1; + my $ctest_vs= ""; # Just ignore if not configured/built to run ctest if (! -f "CTestTestfile.cmake") { @@ -5684,9 +5685,12 @@ sub run_ctest() { return; } + # Add vs-config option on Windows if needed + $ctest_vs= "-C $opt_vs_config" if IS_WINDOWS && $opt_vs_config; + # Also silently ignore if we don't have ctest and didn't insist # Now, run ctest and collect output - my $ctest_out= `ctest 2>&1`; + my $ctest_out= `ctest $ctest_vs 2>&1`; if ($? == $no_ctest && $opt_ctest == -1) { chdir($olddir); return;