summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index e76712cc079..b0916f7ec1e 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -140,7 +140,7 @@ my $opt_start_dirty;
my $opt_start_exit;
my $start_only;
my $file_wsrep_provider;
-
+my $wait_on_result= 0;
our @global_suppressions;
END {
@@ -659,13 +659,14 @@ sub run_test_server ($$$) {
chomp($line);
if ($line eq 'TESTRESULT'){
+
+ $wait_on_result= 1;
$result= My::Test::read_test($sock);
# Report test status
mtr_report_test($result);
if ( $result->is_failed() ) {
-
# Save the workers "savedir" in var/log
my $worker_savedir= $result->{savedir};
my $worker_savename= basename($worker_savedir);
@@ -904,11 +905,18 @@ sub run_test_server ($$$) {
delete $next->{criteria};
$next->write_test($sock, 'TESTCASE');
$running{$next->key()}= $next;
+ $wait_on_result= 0;
}
else {
# No more test, tell child to exit
#mtr_report("Saying BYE to child");
- print $sock "BYE\n";
+ if ($wait_on_result == 1){
+ print $sock "BYE\n";
+ $wait_on_result= 0
+ }
+ else {
+ next;
+ }
}
}
}
@@ -3971,6 +3979,7 @@ sub run_testcase ($$) {
if (start_servers($tinfo))
{
report_failure_and_restart($tinfo);
+ unlink $path_current_testlog;
return 1;
}
}