diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-06-02 10:00:45 +0200 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-06-02 10:00:45 +0200 |
commit | 5ce3d7a202b3eb16a12b6a98939b7b33a3cb984d (patch) | |
tree | 413941bcf97341b11f239c8940ce04e7ab5b01a1 /mysql-test | |
parent | a24465ac27b2136ca68e40c2bb78cde0a40ab005 (diff) | |
download | mariadb-git-5ce3d7a202b3eb16a12b6a98939b7b33a3cb984d.tar.gz |
Bug #45190 mtr should report some statistics even if aborting after too many tests fail
Added calls to mtr_report_stats() also after timeout or too many failures
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/lib/mtr_report.pm | 6 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index dd0721a8f16..a246c5bbef6 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -221,8 +221,8 @@ sub mtr_report_test ($) { } -sub mtr_report_stats ($) { - my $tests= shift; +sub mtr_report_stats ($;$) { + my ($tests, $dont_error)= @_; # ---------------------------------------------------------------------- # Find out how we where doing @@ -374,7 +374,7 @@ sub mtr_report_stats ($) { if ( $tot_failed != 0 || $found_problems) { - mtr_error("there were failing test cases"); + mtr_error("there were failing test cases") unless $dont_error; } } diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f4c1ed5ec11..68c32e8c0bb 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -528,6 +528,8 @@ sub run_test_server ($$$) { elsif ($opt_max_test_fail > 0 and $num_failed_test >= $opt_max_test_fail) { $suite_timeout_proc->kill(); + push(@$completed, $result); + mtr_report_stats($completed, 1); mtr_report("Too many tests($num_failed_test) failed!", "Terminating..."); return undef; @@ -659,6 +661,7 @@ sub run_test_server ($$$) { # ---------------------------------------------------- if ( ! $suite_timeout_proc->wait_one(0) ) { + mtr_report_stats($completed, 1); mtr_report("Test suite timeout! Terminating..."); return undef; } |