summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-08-01 19:57:36 +0200
committerSergei Golubchik <sergii@pisem.net>2012-08-01 19:57:36 +0200
commit6ed4a283fd18a3dbbd7042edb61e12fbd1e3f366 (patch)
tree8e85e872502f73ea456bf2d290d6e0c86547af71 /mysql-test
parentbd39599668691415c42ada6022f567a753769a1c (diff)
downloadmariadb-git-6ed4a283fd18a3dbbd7042edb61e12fbd1e3f366.tar.gz
MDEV-399 Combinations defined in the base suite cannot be skipped by overlay
When appliying parent combinations to the overlay, filter them through the %skip_combinations using the overlayed filename
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/lib/mtr_cases.pm15
-rw-r--r--mysql-test/suite/mtr2/combinations5
2 files changed, 15 insertions, 5 deletions
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index 160fdcd935b..a8db67f1e67 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -472,11 +472,13 @@ sub process_suite {
else
{
my @combs;
- @combs = combinations_from_file($parent, "$suitedir/combinations")
- unless $suite->{skip};
+ my $from = "$suitedir/combinations";
+ @combs = combinations_from_file($parent, $from) unless $suite->{skip};
$suite->{combinations} = [ @combs ];
# in overlays it's a union of parent's and overlay's files.
- unshift @{$suite->{combinations}}, @{$parent->{combinations}} if $parent;
+ unshift @{$suite->{combinations}},
+ grep { not $skip_combinations{"$from => $_->{name}"} }
+ @{$parent->{combinations}} if $parent;
}
# suite.opt
@@ -1039,8 +1041,11 @@ sub get_tags_from_file($$) {
$suite = load_suite_for_file($comb_file) if $prefix[0] eq '';
my @comb;
unless ($suite->{skip}) {
- @comb = combinations_from_file($over, "$prefix[0]$comb_file");
- push @comb, combinations_from_file(undef, "$prefix[1]$comb_file") if $over;
+ my $from = "$prefix[0]$comb_file";
+ @comb = combinations_from_file($over, $from);
+ push @comb,
+ grep { not $skip_combinations{"$from => $_->{name}"} }
+ combinations_from_file(undef, "$prefix[1]$comb_file") if $over;
}
push @combinations, [ @comb ];
diff --git a/mysql-test/suite/mtr2/combinations b/mysql-test/suite/mtr2/combinations
new file mode 100644
index 00000000000..b26eab8ce1d
--- /dev/null
+++ b/mysql-test/suite/mtr2/combinations
@@ -0,0 +1,5 @@
+[1st]
+lock-wait-timeout=5
+
+[2nd]
+lock-wait-timeout=3