summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-06-10 21:29:37 +0200
committerunknown <kent@mysql.com>2005-06-10 21:29:37 +0200
commit4cc8730d15468e4b88952b4b03182532517a621b (patch)
treebe4b21ca50f0ceb6260ebcc15480dca68dfa0406 /mysql-test
parent9b294f596a706b4bd3016516b3e1e13fc8b855bd (diff)
downloadmariadb-git-4cc8730d15468e4b88952b4b03182532517a621b.tar.gz
mtr_process.pl:
Added a sleep for 5 seconds when shuting down, work around for strange problem with server restarts mtr_cases.pl: Set default time zone as opt to mysqld mysql-test-run.pl: Enabled --mysqld=<flags> to work Put some Windows path names into environment, to be used in --replace_result mysql-test-run.sh: Make shell script tolerant to Windows change in test cases mysql-test/mysql-test-run.sh: Make shell script tolerant to Windows change in test cases mysql-test/mysql-test-run.pl: Enabled --mysqld=<flags> to work Put some Windows path names into environment, to be used in --replace_result mysql-test/lib/mtr_cases.pl: Set default time zone as opt to mysqld mysql-test/lib/mtr_process.pl: Added a sleep for 5 seconds when shuting down, work around for strange problem with server restarts
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/lib/mtr_cases.pl14
-rw-r--r--mysql-test/lib/mtr_process.pl2
-rwxr-xr-xmysql-test/mysql-test-run.pl18
-rw-r--r--mysql-test/mysql-test-run.sh3
4 files changed, 25 insertions, 12 deletions
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index 878afe95f2c..b4f0080a4e9 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -171,8 +171,8 @@ sub collect_one_test_case($$$$$) {
my $slave_sh= "$testdir/$tname-slave.sh";
my $disabled= "$testdir/$tname.disabled";
- $tinfo->{'master_opt'}= [];
- $tinfo->{'slave_opt'}= [];
+ $tinfo->{'master_opt'}= ["--default-time-zone=+3:00"];
+ $tinfo->{'slave_opt'}= ["--default-time-zone=+3:00"];
$tinfo->{'slave_mi'}= [];
if ( -f $master_opt_file )
@@ -180,9 +180,9 @@ sub collect_one_test_case($$$$$) {
$tinfo->{'master_restart'}= 1; # We think so for now
# This is a dirty hack from old mysql-test-run, we use the opt file
# to flag other things as well, it is not a opt list at all
- my $extra_master_opt= mtr_get_opts_from_file($master_opt_file);
+ $tinfo->{'master_opt'}= mtr_get_opts_from_file($master_opt_file);
- foreach my $opt (@$extra_master_opt)
+ foreach my $opt (@{$tinfo->{'master_opt'}})
{
my $value;
@@ -191,7 +191,7 @@ sub collect_one_test_case($$$$$) {
if ( defined $value )
{
$tinfo->{'timezone'}= $value;
- $extra_master_opt= [];
+ $tinfo->{'master_opt'}= [];
$tinfo->{'master_restart'}= 0;
last;
}
@@ -206,13 +206,11 @@ sub collect_one_test_case($$$$$) {
{
$tinfo->{'result_file'}.= $::opt_result_ext;
}
- $extra_master_opt= [];
+ $tinfo->{'master_opt'}= [];
$tinfo->{'master_restart'}= 0;
last;
}
}
-
- $tinfo->{'master_opt'}= $extra_master_opt;
}
if ( -f $slave_opt_file )
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index 7bca422773c..1eb4f6b7c58 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -669,6 +669,8 @@ sub mtr_mysqladmin_shutdown () {
last; # If we got here, we are done
}
+ sleep(5) if $::glob_win32; # FIXME next startup fails if no sleep
+
return $res;
}
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index d4fb37c2f96..17ddebdcb2b 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -204,7 +204,7 @@ our $opt_bench= 0;
our $opt_small_bench= 0;
our $opt_big_test= 0; # Send --big-test to mysqltest
-our $opt_extra_mysqld_opt; # FIXME not handled
+our @opt_extra_mysqld_opt;
our $opt_compress;
our $opt_current_test;
@@ -500,7 +500,7 @@ sub command_line_setup () {
'record' => \$opt_record,
# ???
- 'mysqld=s' => \$opt_extra_mysqld_opt,
+ 'mysqld=s' => \@opt_extra_mysqld_opt,
# Run test on running server
'extern' => \$opt_extern,
@@ -953,13 +953,25 @@ sub environment_setup () {
$ENV{'LC_COLLATE'}= "C";
$ENV{'USE_RUNNING_SERVER'}= $glob_use_running_server;
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
+ $ENV{'MYSQL_TEST_WINDIR'}= $glob_mysql_test_dir;
$ENV{'MASTER_MYSOCK'}= $master->[0]->{'path_mysock'};
+ $ENV{'MASTER_WINMYSOCK'}= $master->[0]->{'path_mysock'};
$ENV{'MASTER_MYSOCK1'}= $master->[1]->{'path_mysock'};
$ENV{'MASTER_MYPORT'}= $master->[0]->{'path_myport'};
$ENV{'MASTER_MYPORT1'}= $master->[1]->{'path_myport'};
$ENV{'SLAVE_MYPORT'}= $slave->[0]->{'path_myport'};
# $ENV{'MYSQL_TCP_PORT'}= '@MYSQL_TCP_PORT@'; # FIXME
$ENV{'MYSQL_TCP_PORT'}= 3306;
+
+ if ( $glob_cygwin_perl )
+ {
+ foreach my $key ('MYSQL_TEST_WINDIR','MASTER_MYSOCK')
+ {
+ $ENV{$key}= `cygpath -w $ENV{$key}`;
+ $ENV{$key} =~ s,\\,\\\\,g;
+ chomp($ENV{$key});
+ }
+ }
}
@@ -1852,7 +1864,7 @@ sub mysqld_arguments ($$$$$) {
}
}
- foreach my $arg ( @$extra_opt )
+ foreach my $arg ( @opt_extra_mysqld_opt, @$extra_opt )
{
mtr_add_arg($args, "%s%s", $prefix, $arg);
}
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 3f7e7d22200..7540a76317e 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -170,7 +170,8 @@ cd ..
BASEDIR=`pwd`
cd $CWD
MYSQL_TEST_DIR=$BASEDIR/mysql-test
-export MYSQL_TEST_DIR
+MYSQL_TEST_WINDIR=$MYSQL_TEST_DIR
+export MYSQL_TEST_DIR MYSQL_TEST_WINDIR
STD_DATA=$MYSQL_TEST_DIR/std_data
hostname=`hostname` # Installed in the mysql privilege table