From 9605bc63fc7fe2d2b188d992ae43d9e97360c782 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 28 Sep 2010 15:58:01 +0200 Subject: Bug #56125 MTR2 start-and-exit removes server tmpdir, server becomes not operational This happens when creating new tmpdir due to too long socket path Don't delete it if --start-and-exit, but warn user to do it. --- mysql-test/mysql-test-run.pl | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'mysql-test/mysql-test-run.pl') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 82c62ebfcf1..f0c7a02348a 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -110,12 +110,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"); + } } } @@ -215,10 +227,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; -- cgit v1.2.1 From be7b3c004066fba276471df861ffb6d90c88a883 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 30 Sep 2010 12:42:37 +0200 Subject: Bug #52828 Tests that use perl fail when perl is not in path Trying to run perl fails, just like it does when perl is started but fails Trap the case that perl was not found/could not be started, and skip test Also force a restart of servers since test may already have done something mtr now also appends path of current perl to PATH to aid mysqltest --- mysql-test/mysql-test-run.pl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/mysql-test-run.pl') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f0c7a02348a..b83c32d3815 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2107,6 +2107,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; } @@ -3583,6 +3588,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 ) { -- cgit v1.2.1 From cb49825d10a1ddd7c6ba85fd9039719db1ec7ad0 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 5 Oct 2010 11:03:14 +0300 Subject: Disable NDB tests to run by default. --- mysql-test/mysql-test-run.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'mysql-test/mysql-test-run.pl') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 01094f40956..046199f49f3 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -276,8 +276,9 @@ our $opt_stress_test_file= ""; our $opt_warnings; -our $opt_skip_ndbcluster= 0; -our $opt_skip_ndbcluster_slave= 0; +our $opt_skip_ndbcluster= 1; +our $opt_skip_ndbcluster_slave= 1; +our $opt_include_ndbcluster= 0; our $opt_with_ndbcluster= 0; our $opt_with_ndbcluster_only= 0; our $glob_ndbcluster_supported= 0; @@ -537,6 +538,7 @@ sub command_line_setup () { 'force' => \$opt_force, 'with-ndbcluster-only' => \$opt_with_ndbcluster_only, 'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster, + 'include-ndbcluster' => \$opt_include_ndbcluster, 'skip-ndbcluster-slave|skip-ndb-slave' => \$opt_skip_ndbcluster_slave, 'ndb-extra-test' => \$opt_ndb_extra_test, @@ -2531,6 +2533,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 || $opt_extern) { if (!$opt_extern) @@ -5189,8 +5196,9 @@ 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. skip-ndb[cluster]-slave Skip all tests that need a slave cluster + include-ndb[cluster] Enable all tests that need cluster ndb-extra Run extra tests from ndb directory do-test=PREFIX or REGEX Run test cases which name are prefixed with PREFIX -- cgit v1.2.1