summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
authorkent@mysql.com <>2005-06-20 22:31:25 +0200
committerkent@mysql.com <>2005-06-20 22:31:25 +0200
commit9c79bc7e7301afc452d09639a7d7412b394440a4 (patch)
tree30e813eeac6497e704de9c34b5b3f6a43862a482 /mysql-test/lib
parente28264d29f7fda6d2d3ed6b7dec540f07b84275f (diff)
parent9426710c68dc27dade8d189baacc00296dd53e5d (diff)
downloadmariadb-git-9c79bc7e7301afc452d09639a7d7412b394440a4.tar.gz
Merge
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/mtr_cases.pl75
1 files changed, 49 insertions, 26 deletions
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index c07f10c3bf7..72cbe72bc0a 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -4,6 +4,7 @@
# and is part of the translation of the Bourne shell script with the
# same name.
+use File::Basename;
use strict;
sub collect_test_cases ($);
@@ -39,6 +40,7 @@ sub collect_test_cases ($) {
if ( @::opt_cases )
{
foreach my $tname ( @::opt_cases ) { # Run in specified order, no sort
+ $tname= basename($tname, ".test");
my $elem= "$tname.test";
if ( ! -f "$testdir/$elem")
{
@@ -161,52 +163,73 @@ sub collect_one_test_case($$$$$) {
my $slave_sh= "$testdir/$tname-slave.sh";
my $disabled= "$testdir/$tname.disabled";
- $tinfo->{'master_opt'}= ["--default-time-zone=+3:00"];
- $tinfo->{'slave_opt'}= ["--default-time-zone=+3:00"];
+ $tinfo->{'master_opt'}= $::glob_win32 ? ["--default-time-zone=+3:00"] : [];
+ $tinfo->{'slave_opt'}= $::glob_win32 ? ["--default-time-zone=+3:00"] : [];
$tinfo->{'slave_mi'}= [];
if ( -f $master_opt_file )
{
$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
- $tinfo->{'master_opt'}= mtr_get_opts_from_file($master_opt_file);
- foreach my $opt (@{$tinfo->{'master_opt'}})
+ MASTER_OPT:
{
- my $value;
+ my $master_opt= mtr_get_opts_from_file($master_opt_file);
- $value= mtr_match_prefix($opt, "--timezone=");
-
- if ( defined $value )
+ foreach my $opt ( @$master_opt )
{
- $tinfo->{'timezone'}= $value;
- $tinfo->{'master_opt'}= [];
- $tinfo->{'master_restart'}= 0;
- last;
- }
+ my $value;
- $value= mtr_match_prefix($opt, "--result-file=");
+ # 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
- if ( defined $value )
- {
- $tinfo->{'result_file'}= "r/$value.result";
- if ( $::opt_result_ext and $::opt_record or
- -f "$tinfo->{'result_file'}$::opt_result_ext")
+ $value= mtr_match_prefix($opt, "--timezone=");
+ if ( defined $value )
+ {
+ $tinfo->{'timezone'}= $value;
+ $tinfo->{'skip'}= 1 if $::glob_win32; # FIXME server unsets TZ
+ last MASTER_OPT;
+ }
+
+ $value= mtr_match_prefix($opt, "--result-file=");
+ if ( defined $value )
+ {
+ $tinfo->{'result_file'}= "r/$value.result";
+ if ( $::opt_result_ext and $::opt_record or
+ -f "$tinfo->{'result_file'}$::opt_result_ext")
+ {
+ $tinfo->{'result_file'}.= $::opt_result_ext;
+ }
+ $tinfo->{'master_restart'}= 0;
+ last MASTER_OPT;
+ }
+
+ # If we set default time zone, remove the one we have
+ $value= mtr_match_prefix($opt, "--default-time-zone=");
+ if ( defined $value )
{
- $tinfo->{'result_file'}.= $::opt_result_ext;
+ $tinfo->{'master_opt'}= [];
}
- $tinfo->{'master_opt'}= [];
- $tinfo->{'master_restart'}= 0;
- last;
+
}
+
+ # Ok, this was a real option list, add it
+ push(@{$tinfo->{'master_opt'}}, @$master_opt);
}
}
if ( -f $slave_opt_file )
{
- $tinfo->{'slave_opt'}= mtr_get_opts_from_file($slave_opt_file);
$tinfo->{'slave_restart'}= 1;
+ my $slave_opt= mtr_get_opts_from_file($slave_opt_file);
+
+ foreach my $opt ( @$slave_opt )
+ {
+ # If we set default time zone, remove the one we have
+ my $value= mtr_match_prefix($opt, "--default-time-zone=");
+ $tinfo->{'slave_opt'}= [] if defined $value;
+ }
+ push(@{$tinfo->{'slave_opt'}}, @$slave_opt);
}
if ( -f $slave_mi_file )