diff options
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index a3c3e1847d4..51808f8df34 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -126,12 +126,24 @@ my $path_vardir_trace; # unix formatted opt_vardir for trace files my $opt_tmpdir; # Path to use for tmp/ dir my $opt_tmpdir_pid; +my $opt_start; +my $opt_start_dirty; +my $opt_start_exit; +my $start_only; + END { if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ ) { - # Remove the tempdir this process has created - mtr_verbose("Removing tmpdir '$opt_tmpdir"); - rmtree($opt_tmpdir); + if (!$opt_start_exit) + { + # Remove the tempdir this process has created + mtr_verbose("Removing tmpdir $opt_tmpdir"); + rmtree($opt_tmpdir); + } + else + { + mtr_warning("tmpdir $opt_tmpdir should be removed after the server has finished"); + } } } @@ -234,10 +246,6 @@ my $opt_start_timeout = $ENV{MTR_START_TIMEOUT} || 180; # seconds sub suite_timeout { return $opt_suite_timeout * 60; }; sub check_timeout { return $opt_testcase_timeout * 6; }; -my $opt_start; -my $opt_start_dirty; -my $opt_start_exit; -my $start_only; my $opt_wait_all; my $opt_user_args; my $opt_repeat= 1; @@ -273,7 +281,8 @@ sub testcase_timeout ($) { our $opt_warnings= 1; -our $opt_skip_ndbcluster= 0; +our $opt_include_ndbcluster= 0; +our $opt_skip_ndbcluster= 1; my $exe_ndbd; my $exe_ndb_mgmd; @@ -869,6 +878,7 @@ sub command_line_setup { # Control what test suites or cases to run 'force' => \$opt_force, 'with-ndbcluster-only' => \&collect_option, + 'include-ndbcluster' => \$opt_include_ndbcluster, 'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster, 'suite|suites=s' => \$opt_suites, 'skip-rpl' => \&collect_option, @@ -2186,6 +2196,11 @@ sub environment_setup { # to detect that valgrind is being used from test cases $ENV{'VALGRIND_TEST'}= $opt_valgrind; + # Add dir of this perl to aid mysqltest in finding perl + my $perldir= dirname($^X); + my $pathsep= ":"; + $pathsep= ";" if IS_WINDOWS && ! IS_CYGWIN; + $ENV{'PATH'}= "$ENV{'PATH'}".$pathsep.$perldir; } @@ -2458,6 +2473,11 @@ sub vs_config_dirs ($$) { sub check_ndbcluster_support ($) { my $mysqld_variables= shift; + if ($opt_include_ndbcluster) + { + $opt_skip_ndbcluster= 0; + } + if ($opt_skip_ndbcluster) { mtr_report(" - skipping ndbcluster"); @@ -3658,6 +3678,9 @@ sub run_testcase ($) { # Try to get reason from test log file find_testcase_skipped_reason($tinfo); mtr_report_test_skipped($tinfo); + # Restart if skipped due to missing perl, it may have had side effects + stop_all_servers($opt_shutdown_timeout) + if ($tinfo->{'comment'} =~ /^perl not found/); } elsif ( $res == 65 ) { @@ -5494,7 +5517,8 @@ Options to control what test suites or cases to run force Continue to run the suite after failure with-ndbcluster-only Run only tests that include "ndb" in the filename - skip-ndb[cluster] Skip all tests that need cluster + skip-ndb[cluster] Skip all tests that need cluster. Default. + include-ndb[cluster] Enable all tests that need cluster do-test=PREFIX or REGEX Run test cases which name are prefixed with PREFIX or fulfills REGEX |