diff options
author | Michael Widenius <monty@askmonty.org> | 2011-11-30 22:57:18 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-11-30 22:57:18 +0200 |
commit | efcfb195e3fc4a2b87bfcb9ad136d46b9961f49e (patch) | |
tree | 9eb3b78e20ecf4bd9e5cd587db50d51c1f06d336 /mysql-test/lib | |
parent | a7f87effa57f6486c23bf5b340c8474a635dcf71 (diff) | |
parent | 6378bdbf47af72b2f899853586faa5a2d2f0fee1 (diff) | |
download | mariadb-git-efcfb195e3fc4a2b87bfcb9ad136d46b9961f49e.tar.gz |
Merge with 5.1
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/My/Options.pm | 2 | ||||
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 55 |
2 files changed, 21 insertions, 36 deletions
diff --git a/mysql-test/lib/My/Options.pm b/mysql-test/lib/My/Options.pm index 6e8cf7ec919..a0713f7c07e 100644 --- a/mysql-test/lib/My/Options.pm +++ b/mysql-test/lib/My/Options.pm @@ -153,7 +153,7 @@ sub is_set { foreach my $set_opt (@$set_opts){ my ($opt_name2, $value2)= _split_option($set_opt); - if ($opt_name1 eq $opt_name2){ + if ($opt_name1 eq $opt_name2 and $value1 eq $value2){ # Option already set return 1; } diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index f453cb387b7..6acbe623e22 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -492,20 +492,32 @@ sub collect_one_suite #print_testcases(@cases); my @new_cases; - foreach my $comb (@combinations) + TEST: foreach my $test (@cases) { - foreach my $test (@cases) - { - - next if ( $test->{'skip'} ); + if ( $test->{'skip'} ) + { + push(@new_cases, $test); + next; + } - # Skip this combination if the values it provides - # already are set in master_opt or slave_opt + foreach my $comb (@combinations) + { + # Skip all other combinations if the values they change + # are already fixed in master_opt or slave_opt if (My::Options::is_set($test->{master_opt}, $comb->{comb_opt}) && My::Options::is_set($test->{slave_opt}, $comb->{comb_opt}) ){ - next; + + # Add combination name short name + $test->{combination}= $comb->{name}; + + # Add the test to new test cases list + push(@new_cases, $test); + next TEST; } + } + foreach my $comb (@combinations) + { # Copy test options my $new_test= My::Test->new(); while (my ($key, $value) = each(%$test)) { @@ -528,17 +540,6 @@ sub collect_one_suite } } - # Add the plain test if it was not already added - # as part of a combination - my %added; - foreach my $new_test (@new_cases){ - $added{$new_test->{name}}= 1; - } - foreach my $test (@cases){ - push(@new_cases, $test) unless $added{$test->{name}}; - } - - #print_testcases(@new_cases); @cases= @new_cases; #print_testcases(@cases); @@ -662,9 +663,6 @@ sub process_opts { my @opts= @{$tinfo->{$opt_name}}; $tinfo->{$opt_name} = []; - my @plugins; - my %seen; - foreach my $opt (@opts) { my $value; @@ -680,14 +678,6 @@ sub process_opts { next; } - $value= mtr_match_prefix($opt, "--plugin-load="); - if (defined $value) - { - push @plugins, $value unless $seen{$value}; - $seen{$value}=1; - next; - } - $value= mtr_match_prefix($opt, "--result-file="); if ( defined $value ) { @@ -734,11 +724,6 @@ sub process_opts { # Ok, this was a real option, add it push(@{$tinfo->{$opt_name}}, $opt); } - - if (@plugins) { - my $sep = (IS_WINDOWS) ? ';' : ':'; - push @{$tinfo->{$opt_name}}, "--plugin-load=" . join($sep, @plugins); - } } |