List:Commits« Previous MessageNext Message »
From:msvensson Date:August 23 2006 1:35pm
Subject:bk commit into 5.1 tree (msvensson:1.2293)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-23 15:35:24+02:00, msvensson@shellback.(none) +1 -0
  Break out functions do_before_run_mysqltest and do_after_run_mysqltest

  mysql-test/mysql-test-run.pl@stripped, 2006-08-23 15:35:16+02:00, msvensson@shellback.(none) +48 -46
    Break out functions do_before_run_mysqltest and do_after_run_mysqltest

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	shellback.(none)
# Root:	/home/msvensson/mysql/mysql-5.1-new-maint

--- 1.157/mysql-test/mysql-test-run.pl	2006-08-23 15:35:39 +02:00
+++ 1.158/mysql-test/mysql-test-run.pl	2006-08-23 15:35:39 +02:00
@@ -2157,7 +2157,10 @@
 
   foreach my $tinfo ( @$tests )
   {
-    next if run_testcase_check_skip_test($tinfo);
+    if (run_testcase_check_skip_test($tinfo))
+    {
+      next;
+    }
 
     mtr_timer_start($glob_timers,"testcase", 60 * $opt_testcase_timeout);
     run_testcase($tinfo);
@@ -2482,6 +2485,47 @@
 }
 
 
+sub do_before_run_mysqltest($)
+{
+  my $tinfo= shift;
+  my $tname= $tinfo->{'name'};
+
+  # Remove old reject file
+  if ( $opt_suite eq "main" )
+  {
+    unlink("r/$tname.reject");
+  }
+  else
+  {
+    unlink("suite/$opt_suite/r/$tname.reject");
+  }
+
+
+# MASV cleanup...
+  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($file_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");
+  }
+}
+
+sub do_after_run_mysqltest($)
+{
+  my $tinfo= shift;
+  my $tname= $tinfo->{'name'};
+
+  #MASV cleanup
+    # Save info from this testcase run to mysqltest.log
+    my $testcase_log= mtr_fromfile($path_timefile) if -f $path_timefile;
+    mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
+    mtr_tofile($path_mysqltest_log, $testcase_log);
+  }
+
 
 ##############################################################################
 #
@@ -2502,13 +2546,6 @@
 sub run_testcase ($) {
   my $tinfo=  shift;
 
-  my $tname= $tinfo->{'name'};
-
-  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($file_ndb_testrun_log,"CURRENT TEST $tname\n");
-
   my $master_restart= run_testcase_need_master_restart($tinfo);
   my $slave_restart= run_testcase_need_slave_restart($tinfo);
 
@@ -2517,26 +2554,7 @@
     run_testcase_stop_servers($tinfo, $master_restart, $slave_restart);
   }
 
-  # ----------------------------------------------------------------------
-  # Prepare to start masters. Even if we use embedded, we want to run
-  # the preparation.
-  # ----------------------------------------------------------------------
-
-  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 any mysqld servers running died, we have to know
-  # ----------------------------------------------------------------------
-
   my $died= mtr_record_dead_children();
-
-  # ----------------------------------------------------------------------
-  # Start masters needed by the testcase
-  # ----------------------------------------------------------------------
   if ($died or $master_restart or $slave_restart)
   {
     run_testcase_start_servers($tinfo);
@@ -2546,28 +2564,14 @@
   # If --start-and-exit or --start-dirty given, stop here to let user manually
   # run tests
   # ----------------------------------------------------------------------
-
   if ( $opt_start_and_exit or $opt_start_dirty )
   {
     mtr_report("\nServers started, exiting");
     exit(0);
   }
 
-  # ----------------------------------------------------------------------
-  # Run the test case
-  # ----------------------------------------------------------------------
-
   {
-    # remove the old reject file
-    if ( $opt_suite eq "main" )
-    {
-      unlink("r/$tname.reject");
-    }
-    else
-    {
-      unlink("suite/$opt_suite/r/$tname.reject");
-    }
-    unlink($path_timefile);
+    do_before_run_mysqltest($tinfo);
 
     my $res= run_mysqltest($tinfo);
     mtr_report_test_name($tinfo);
@@ -2603,10 +2607,8 @@
 
       report_failure_and_restart($tinfo);
     }
-    # Save info from this testcase run to mysqltest.log
-    my $testcase_log= mtr_fromfile($path_timefile) if -f $path_timefile;
-    mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
-    mtr_tofile($path_mysqltest_log, $testcase_log);
+
+    do_after_run_mysqltest($tinfo);
   }
 
   # ----------------------------------------------------------------------
Thread
bk commit into 5.1 tree (msvensson:1.2293)msvensson23 Aug