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.pl43
1 files changed, 36 insertions, 7 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index e6a99025091..f668ef0ba73 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1,8 +1,8 @@
#!/usr/bin/perl
# -*- cperl -*-
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates.
-# Copyright (c) 2009, 2011, Monty Program Ab
+# Copyright (c) 2004, 2013, Oracle and/or its affiliates.
+# Copyright (c) 2009, 2013, Monty Program Ab
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
@@ -665,9 +665,11 @@ sub run_test_server ($$$) {
mtr_report("\nRetrying test $tname, ".
"attempt($retries/$opt_retry)...\n");
#saving the log file as filename.failed in case of retry
- my $worker_logdir= $result->{savedir};
- my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
- rename $log_file_name,$log_file_name.".failed";
+ if ( $result->is_failed() ) {
+ my $worker_logdir= $result->{savedir};
+ my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
+ rename $log_file_name,$log_file_name.".failed";
+ }
delete($result->{result});
$result->{retries}= $retries+1;
$result->write_test($sock, 'TESTCASE');
@@ -1911,7 +1913,17 @@ sub executable_setup () {
}
else
{
- $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
+ if ( defined $ENV{'MYSQL_TEST'} )
+ {
+ $exe_mysqltest=$ENV{'MYSQL_TEST'};
+ print "===========================================================\n";
+ print "WARNING:The mysqltest binary is fetched from $exe_mysqltest\n";
+ print "===========================================================\n";
+ }
+ else
+ {
+ $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
+ }
}
}
@@ -3866,6 +3878,7 @@ my %old_env;
sub run_testcase ($$) {
my ($tinfo, $server_socket)= @_;
+ my $print_freq=20;
mtr_verbose("Running test:", $tinfo->{name});
@@ -4043,6 +4056,7 @@ sub run_testcase ($$) {
my $test= start_mysqltest($tinfo);
# Set only when we have to keep waiting after expectedly died server
my $keep_waiting_proc = 0;
+ my $print_timeout= start_timer($print_freq * 60);
while (1)
{
@@ -4067,7 +4081,22 @@ sub run_testcase ($$) {
}
if (! $keep_waiting_proc)
{
- $proc= My::SafeProcess->wait_any_timeout($test_timeout);
+ if($test_timeout > $print_timeout)
+ {
+ $proc= My::SafeProcess->wait_any_timeout($print_timeout);
+ if ( $proc->{timeout} )
+ {
+ #print out that the test is still on
+ mtr_print("Test still running: $tinfo->{name}");
+ #reset the timer
+ $print_timeout= start_timer($print_freq * 60);
+ next;
+ }
+ }
+ else
+ {
+ $proc= My::SafeProcess->wait_any_timeout($test_timeout);
+ }
}
# Will be restored if we need to keep waiting