summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-11-28 19:54:37 +0100
committerunknown <msvensson@neptunus.(none)>2006-11-28 19:54:37 +0100
commitc5f7e0789f250a5bb2955539577da8ab4333eed4 (patch)
tree1fffd87d6922281eee538c665b181203f6c18d31
parentbb4b8d381df6d68fef80b2abbe78305e204eaa99 (diff)
parent92ac0e73dd0606a5c50f6ef7ba3efa15f8a92ac0 (diff)
downloadmariadb-git-c5f7e0789f250a5bb2955539577da8ab4333eed4.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/work/my41-work
into neptunus.(none):/home/msvensson/mysql/work/my50-work mysql-test/mysql-test-run.pl: Auto merged
-rwxr-xr-xmysql-test/mysql-test-run.pl47
1 files changed, 28 insertions, 19 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 7b4ef62fa7a..30d5ca9d746 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3040,26 +3040,15 @@ sub do_before_run_mysqltest($)
unlink("$result_dir/$tname.log");
unlink("$result_dir/$tname.warnings");
- 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($path_ndb_testrun_log,"CURRENT TEST $tname\n");
-
- mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
- if ( $master->[1]->{'pid'} )
- {
- mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
- }
-
if ( $mysql_version_id < 50000 )
{
- # Set envirnoment variable NDB_STATUS_OK to 1
+ # Set environment variable NDB_STATUS_OK to 1
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "1";
}
elsif ( $mysql_version_id < 50100 )
{
- # Set envirnoment variable NDB_STATUS_OK to YES
+ # Set environment variable NDB_STATUS_OK to YES
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "YES";
}
@@ -3070,9 +3059,9 @@ sub do_after_run_mysqltest($)
my $tinfo= shift;
my $tname= $tinfo->{'name'};
- mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
-
# Save info from this testcase run to mysqltest.log
+ mtr_appendfile_to_file($path_current_test_log, $path_mysqltest_log)
+ if -f $path_current_test_log;
mtr_appendfile_to_file($path_timefile, $path_mysqltest_log)
if -f $path_timefile;
@@ -3082,6 +3071,26 @@ sub do_after_run_mysqltest($)
}
+sub run_testcase_mark_logs($)
+{
+ my ($log_msg)= @_;
+
+ # Write a marker to all log files
+
+ # The file indicating current test name
+ mtr_tonewfile($path_current_test_log, $log_msg);
+
+ # each mysqld's .err file
+ foreach my $mysqld (@{$master}, @{$slave})
+ {
+ mtr_tofile($mysqld->{path_myerr}, $log_msg);
+ }
+
+ # ndbcluster log file
+ mtr_tofile($path_ndb_testrun_log, $log_msg);
+
+}
+
sub find_testcase_skipped_reason($)
{
my ($tinfo)= @_;
@@ -3201,6 +3210,10 @@ sub run_testcase ($) {
run_testcase_stop_servers($tinfo, $master_restart, $slave_restart);
}
+
+ # Write to all log files to indicate start of testcase
+ run_testcase_mark_logs("CURRENT_TEST: $tinfo->{name}\n");
+
my $died= mtr_record_dead_children();
if ($died or $master_restart or $slave_restart)
{
@@ -4212,8 +4225,6 @@ sub run_testcase_start_servers($) {
return 1;
}
}
- mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
-
mysqld_start($master->[1],$tinfo->{'master_opt'},[]);
}
@@ -4241,8 +4252,6 @@ sub run_testcase_start_servers($) {
# ----------------------------------------------------------------------
if ( $tinfo->{'slave_num'} )
{
- mtr_tofile($slave->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
-
restore_slave_databases($tinfo->{'slave_num'});
do_before_start_slave($tinfo);