Commit 456d7b3c authored by unknown's avatar unknown
Browse files

harmonized mysql-test-run.sh and .pl

+ added current test printout to error file


mysql-test/lib/mtr_cases.pl:
  harmonized mysql-test-run.sh and .pl
parent d59a2fc4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -253,12 +253,17 @@ sub collect_one_test_case($$$$$$$) {
  }

  if ( ( $::opt_with_ndbcluster or $::glob_use_running_ndbcluster ) and
       defined mtr_match_substring($tname,"ndb") )
       ( $::opt_with_ndbcluster_all or defined mtr_match_substring($tname,"ndb") ))
  {
    $tinfo->{'ndb_test'}= 1;
  }
  else
  {
    if ( $::opt_with_ndbcluster_only )
    {
      $tinfo->{'skip'}= 1;
      return;
    }
    $tinfo->{'ndb_test'}= 0;
  }

+15 −4
Original line number Diff line number Diff line
@@ -304,11 +304,13 @@ our $opt_warnings;

our $opt_udiff;

our $opt_skip_ndbcluster;
our $opt_skip_ndbcluster= 0;
our $opt_with_ndbcluster;
our $opt_skip_ndbcluster_slave;
our $opt_skip_ndbcluster_slave= 0;
our $opt_with_ndbcluster_slave;
our $opt_ndb_extra_test;
our $opt_with_ndbcluster_all= 0;
our $opt_with_ndbcluster_only= 0;
our $opt_ndb_extra_test= 0;

our $exe_ndb_mgm;
our $path_ndb_tools_dir;
@@ -548,6 +550,8 @@ sub command_line_setup () {
             'with-ndbcluster-slave'    => \$opt_with_ndbcluster_slave,
             'skip-ndbcluster-slave|skip-ndb-slave'
                                        => \$opt_skip_ndbcluster_slave,
             'with-ndbcluster-all'      => \$opt_with_ndbcluster_all,
             'with-ndbcluster-only'     => \$opt_with_ndbcluster_only,
             'ndb-extra-test'           => \$opt_ndb_extra_test,
             'do-test=s'                => \$opt_do_test,
             'suite=s'                  => \$opt_suite,
@@ -1938,6 +1942,10 @@ sub run_testcase ($) {
  mtr_report_test_name($tinfo);

  mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
  if ( $master->[1]->{'pid'} )
  {
    mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
  }

# FIXME test cases that depend on each other, prevent this from
# being at this location.
@@ -1986,6 +1994,7 @@ sub run_testcase ($) {
      }
      if ( $using_ndbcluster_master and ! $master->[1]->{'pid'} )
      {
        mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
        $master->[1]->{'pid'}=
          mysqld_start('master',1,$tinfo->{'master_opt'},[],
		       $using_ndbcluster_master);
@@ -3038,7 +3047,9 @@ Options to control what engine/variation to run
Options to control what test suites or cases to run

  force                 Continue to run the suite after failure
  with-ndbcluster       Use cluster, and enable test cases that requres it
  with-ndbcluster       Use cluster, and enable test cases that requires it
  with-ndbcluster-all   Use cluster in all tests
  with-ndbcluster-only  Run only tests that include "ndb" in the filename
  skip-ndb[cluster]     Skip the ndb test cases, don't start cluster
  do-test=PREFIX        Run test cases which name are prefixed with PREFIX
  start-from=PREFIX     Run test cases starting from test prefixed with PREFIX
+8 −2
Original line number Diff line number Diff line
@@ -630,7 +630,7 @@ export MASTER_MYHOST MASTER_MYPORT SLAVE_MYHOST SLAVE_MYPORT MYSQL_TCP_PORT MAST
NDBCLUSTER_OPTS="--port=$NDBCLUSTER_PORT --data-dir=$MYSQL_TEST_DIR/var --ndb_mgm-extra-opts=$NDB_MGM_EXTRA_OPTS --ndb_mgmd-extra-opts=$NDB_MGMD_EXTRA_OPTS --ndbd-extra-opts=$NDBD_EXTRA_OPTS"
NDBCLUSTER_OPTS_SLAVE="--port=$NDBCLUSTER_PORT_SLAVE --data-dir=$MYSQL_TEST_DIR/var"
if [ -n "$USE_NDBCLUSTER_SLAVE" ] ; then
  USE_NDBCLUSTER_SLAVE="$USE_NDBCLUSTER_SLAVE --ndb-connectstring=localhost:$NDBCLUSTER_PORT_SLAVE"
  USE_NDBCLUSTER_SLAVE="$USE_NDBCLUSTER_SLAVE --ndb-connectstring=localhost:$NDBCLUSTER_PORT_SLAVE --ndb-extra-logging"
fi
NDB_BACKUP_DIR=$MYSQL_TEST_DIR/var/ndbcluster-$NDBCLUSTER_PORT
NDB_TOOLS_OUTPUT=$MYSQL_TEST_DIR/var/log/ndb_tools.log
@@ -1016,6 +1016,10 @@ disable_test() {
report_current_test () {
   tname=$1
   echo "CURRENT_TEST: $tname" >> $MASTER_MYERR
   eval "master1_running=\$MASTER1_RUNNING"
   if [ x$master1_running = x1 ] ; then
     echo "CURRENT_TEST: $tname" >> $MASTER_MYERR"1"
   fi
   if [ -n "$PURIFY_LOGS" ] ; then
     for log in $PURIFY_LOGS
     do
@@ -1297,7 +1301,7 @@ start_ndbcluster()
    NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER"
    echo "Using ndbcluster at $NDB_CONNECTSTRING"
  fi
  USE_NDBCLUSTER_OPT="$USE_NDBCLUSTER --ndb-connectstring=\"$NDB_CONNECTSTRING\""
  USE_NDBCLUSTER_OPT="$USE_NDBCLUSTER --ndb-connectstring=\"$NDB_CONNECTSTRING\" --ndb-extra-logging"
  export NDB_CONNECTSTRING
  fi
}
@@ -1876,6 +1880,7 @@ run_testcase ()
     start_ndbcluster
     start_master
     if [ x$USING_NDBCLUSTER = x1 -a -z "$DO_BENCH" -a -z "$DO_STRESS" ] ; then
       echo "CURRENT_TEST: $tname" >> $MASTER_MYERR"1"
       start_master 1
     fi
     TZ=$MY_TZ; export TZ
@@ -1903,6 +1908,7 @@ run_testcase ()
       start_ndbcluster
       start_master
       if [ x$USING_NDBCLUSTER = x1  -a -z "$DO_BENCH" -a -z "$DO_STRESS" ] ; then
         echo "CURRENT_TEST: $tname" >> $MASTER_MYERR"1"
         start_master 1
       fi
     else