diff options
author | unknown <msvensson@pilot.mysql.com> | 2008-05-02 12:11:04 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.mysql.com> | 2008-05-02 12:11:04 +0200 |
commit | 1e9f11d5827b1a56c67711f4d7b31b55721b8860 (patch) | |
tree | 8a29b5441406782214e3d8cc01a1349212dbc159 /mysql-test/mysql-test-run.pl | |
parent | 65edbe24f382aa640d96c0d551a6e50cc0e3b228 (diff) | |
download | mariadb-git-1e9f11d5827b1a56c67711f4d7b31b55721b8860.tar.gz |
Print tests that has been run but shouldn't and vice versa
Use opt_start_timeout also for ndb
Remove the .result files generated by 'check_testcase'
mysql-test/lib/mtr_report.pm:
Use "failures" to keep track of if test has previously failed
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 50348053bdf..4838ddefe54 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -322,15 +322,29 @@ sub main { if ( @$completed != $num_tests){ if ($opt_force){ - # All test should have been run, print the completed list - foreach my $test ( @$completed ){ - $test->print_test(); + # All test should have been run, print the ones that differs + my %tests= (); + foreach my $t (@$tests) { $tests{$t->key()}= 1; }; + foreach my $done ( @$completed ){ + if ($tests{$done->key()}) { + mtr_report("Found one extra completed"); + $done->print_test(); + } + } + %tests= (); + foreach my $t (@$completed) { $tests{$t->key()}= 1; }; + foreach my $done ( @$tests ){ + if ($tests{$done->key()}) { + mtr_report("Found one test not run"); + $done->print_test(); + } } + } # Not all tests completed, failure mtr_report(); - mtr_report("After @$completed of $num_tests."); + mtr_report(@$completed, " of $num_tests completed."); mtr_error("Test failed.", "To continue, re-run with '--force'"); } @@ -467,6 +481,7 @@ sub run_test_server { } else { mtr_report("\nRetrying test, attempt($retries/$opt_retry)...\n"); + delete($result->{result}); $result->{retries}= $retries+1; $result->write_test($sock, 'TESTCASE'); next; @@ -479,7 +494,7 @@ sub run_test_server { { $result->{retries}= 0; $result->{failures}= 0; - + delete($result->{result}); $result->{repeat}= $repeat+1; $result->write_test($sock, 'TESTCASE'); next; @@ -1983,7 +1998,7 @@ sub ndbcluster_wait_started($$){ mtr_init_args(\$args); mtr_add_arg($args, "--defaults-file=%s", $path_config_file); mtr_add_arg($args, "--defaults-group-suffix=%s", $cluster->suffix()); - mtr_add_arg($args, "--timeout=60"); + mtr_add_arg($args, "--timeout=%d", $opt_start_timeout); if ($ndb_waiter_extra_opt) { @@ -2600,7 +2615,6 @@ sub check_testcase($$) my $err_file= $proc->user_data(); my $base_file= mtr_match_extension($err_file, "err"); # Trim extension - unlink("$base_file.result"); # One check testcase process returned my $res= $proc->exit_status(); @@ -2611,6 +2625,11 @@ sub check_testcase($$) # Remove the .err file the check generated unlink($err_file); + # Remove the .result file the check generated + if ( $mode eq 'after' ){ + unlink("$base_file.result"); + } + if ( keys(%started) == 0){ # All checks completed return 0; @@ -2646,6 +2665,9 @@ sub check_testcase($$) # Remove the .err file the check generated unlink($err_file); + # Remove the .result file the check generated + unlink("$base_file.result"); + } } else { |