diff options
author | unknown <msvensson@shellback.(none)> | 2006-08-21 09:53:04 +0200 |
---|---|---|
committer | unknown <msvensson@shellback.(none)> | 2006-08-21 09:53:04 +0200 |
commit | b6707f8c7f39878c86347acff495337eb9bdef22 (patch) | |
tree | 3f38bf4791788412663e36b514f21979b59282b7 /mysql-test/mysql-test-run.pl | |
parent | ae705221dd91c390e917fdf590932ac59b521ea4 (diff) | |
download | mariadb-git-b6707f8c7f39878c86347acff495337eb9bdef22.tar.gz |
Break out and create new function 'run_testcase_check_skip_test'
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 69 |
1 files changed, 40 insertions, 29 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index af59c39cda7..507258c5d65 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -360,6 +360,7 @@ sub install_db ($$); sub run_testcase ($); sub run_testcase_stop_servers ($$$); sub run_testcase_start_servers ($); +sub run_testcase_check_skip_test($); sub report_failure_and_restart ($); sub do_before_start_master ($$); sub do_before_start_slave ($$); @@ -2156,6 +2157,8 @@ sub run_suite () { foreach my $tinfo ( @$tests ) { + next if run_testcase_check_skip_test($tinfo); + mtr_timer_start($glob_timers,"testcase", 60 * $opt_testcase_timeout); run_testcase($tinfo); mtr_timer_stop($glob_timers,"testcase"); @@ -2440,32 +2443,9 @@ sub im_prepare_data_dir($) { } } - -############################################################################## -# -# Run a single test case -# -############################################################################## - -# When we get here, we have already filtered out test cases that doesn't -# apply to the current setup, for example if we use a running server, test -# cases that restart the server are dropped. So this function should mostly -# be about doing things, not a lot of logic. - -# We don't start and kill the servers for each testcase. But some -# testcases needs a restart, because they specify options to start -# mysqld with. After that testcase, we need to restart again, to set -# back the normal options. - -sub run_testcase ($) { - my $tinfo= shift; - - my $tname= $tinfo->{'name'}; - - mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are - - # output current test to ndbcluster log file to enable diagnostics - mtr_tofile($file_ndb_testrun_log,"CURRENT TEST $tname\n"); +sub run_testcase_check_skip_test($) +{ + my ($tinfo)= @_; # ---------------------------------------------------------------------- # If marked to skip, just print out and return. @@ -2478,7 +2458,7 @@ sub run_testcase ($) { { mtr_report_test_name($tinfo); mtr_report_test_skipped($tinfo); - return; + return 1; } # If test needs cluster, check that master installed ok @@ -2486,7 +2466,7 @@ sub run_testcase ($) { { mtr_report_test_name($tinfo); mtr_report_test_failed($tinfo); - return; + return 1; } # If test needs slave cluster, check that it installed ok @@ -2495,9 +2475,40 @@ sub run_testcase ($) { { mtr_report_test_name($tinfo); mtr_report_test_failed($tinfo); - return; + return 1; } + return 0; +} + + + +############################################################################## +# +# Run a single test case +# +############################################################################## + +# When we get here, we have already filtered out test cases that doesn't +# apply to the current setup, for example if we use a running server, test +# cases that restart the server are dropped. So this function should mostly +# be about doing things, not a lot of logic. + +# We don't start and kill the servers for each testcase. But some +# testcases needs a restart, because they specify options to start +# mysqld with. After that testcase, we need to restart again, to set +# back the normal options. + +sub run_testcase ($) { + my $tinfo= shift; + + my $tname= $tinfo->{'name'}; + + mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are + + # output current test to ndbcluster log file to enable diagnostics + mtr_tofile($file_ndb_testrun_log,"CURRENT TEST $tname\n"); + my $master_restart= run_testcase_need_master_restart($tinfo); my $slave_restart= run_testcase_need_slave_restart($tinfo); |