diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-10-25 15:21:16 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-10-25 15:21:16 +0200 |
commit | 04a4b4334650b2183d25a7b04c1e83c31bffb22d (patch) | |
tree | 587654c186615669df8d81b851db711bb8ac2f62 /mysql-test/lib | |
parent | 37a78d6868d0e25d286299c91d5787fb6733844d (diff) | |
parent | 60c15066db4f59e0362420d46a1ca5b6fbb30e56 (diff) | |
download | mariadb-git-04a4b4334650b2183d25a7b04c1e83c31bffb22d.tar.gz |
merge with 5.1
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/My/Config.pm | 2 | ||||
-rw-r--r-- | mysql-test/lib/My/ConfigFactory.pm | 11 | ||||
-rw-r--r-- | mysql-test/lib/My/SafeProcess.pm | 15 | ||||
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 14 | ||||
-rw-r--r-- | mysql-test/lib/mtr_report.pm | 2 |
5 files changed, 32 insertions, 12 deletions
diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm index 0955c1bb190..bf6629754a1 100644 --- a/mysql-test/lib/My/Config.pm +++ b/mysql-test/lib/My/Config.pm @@ -246,6 +246,8 @@ sub new { while ( my $line= <$F> ) { chomp($line); + # Remove any trailing CR from Windows edited files + $line=~ s/\cM$//; # [group] if ( $line =~ /^\[(.*)\]/ ) { diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 7725b025dd8..9f8de3e5830 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -30,6 +30,13 @@ sub get_basedir { return $basedir; } +sub get_testdir { + my ($self, $group)= @_; + my $testdir= $group->if_exist('testdir') || + $self->{ARGS}->{testdir}; + return $testdir; +} + sub fix_charset_dir { my ($self, $config, $group_name, $group)= @_; @@ -138,7 +145,9 @@ sub fix_secure_file_priv { sub fix_std_data { my ($self, $config, $group_name, $group)= @_; - return "$::opt_vardir/std_data"; + #return "$::opt_vardir/std_data"; + my $testdir= $self->get_testdir($group); + return "$testdir/std_data"; } sub ssl_supported { diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm index 084ef408d5b..bdd6c7352ae 100644 --- a/mysql-test/lib/My/SafeProcess.pm +++ b/mysql-test/lib/My/SafeProcess.pm @@ -60,11 +60,12 @@ use My::Platform; my %running; my $_verbose= 0; +my $start_exit= 0; END { # Kill any children still running for my $proc (values %running){ - if ( $proc->is_child($$) ){ + if ( $proc->is_child($$) and ! $start_exit){ #print "Killing: $proc\n"; if ($proc->wait_one(0)){ $proc->kill(); @@ -149,6 +150,11 @@ sub new { push(@safe_args, "--"); push(@safe_args, $path); # The program safe_process should execute + + if ($start_exit) { # Bypass safe_process instead, start program directly + @safe_args= (); + $safe_path= $path; + } push(@safe_args, @$$args); print "### safe_path: ", $safe_path, " ", join(" ", @safe_args), "\n" @@ -534,6 +540,13 @@ sub wait_all { } } +# +# Set global flag to tell all safe_process to exit after starting child +# + +sub start_exit { + $start_exit= 1; +} # # Check if any process has exited, but don't wait. diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index fd4832d49a3..9f2dca5efb6 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -252,15 +252,11 @@ sub collect_one_suite } else { - $suitedir= my_find_dir($::basedir, - ["mysql-test/suite", - "mysql-test", - "share/mysql-test/suite", - "share/mysql-test", - "share/mysql/mysql-test/suite", - "share/mysql/mysql-test", + $suitedir= my_find_dir($suitedir, + ["suite", + ".", # Look in storage engine specific suite dirs - "storage/*/mysql-test-suites" + "../storage/*/mysql-test-suites" ], [$suite]); } @@ -573,7 +569,7 @@ sub optimize_cases { # Check that engine selected by # --default-storage-engine=<engine> is supported # ======================================================= - my %builtin_engines = ('myisam' => 1, 'memory' => 1); + my %builtin_engines = ('myisam' => 1, 'memory' => 1, 'csv' => 1); foreach my $opt ( @{$tinfo->{master_opt}} ) { my $default_engine= diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index c13e6a93319..a90c367178d 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -120,7 +120,7 @@ sub mtr_report_test ($) { my $timest = format_time(); my $fail = "fail"; - if ( $::opt_experimental ) + if ( @$::experimental_test_cases ) { # Find out if this test case is an experimental one, so we can treat # the failure as an expected failure instead of a regression. |