summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_cases.pm
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/lib/mtr_cases.pm')
-rw-r--r--mysql-test/lib/mtr_cases.pm46
1 files changed, 35 insertions, 11 deletions
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index bf85bd91047..2d8f111f054 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -339,17 +339,41 @@ sub collect_one_suite
for my $skip (@disabled_collection)
{
if ( open(DISABLED, $skip ) )
- {
- while ( <DISABLED> )
- {
- chomp;
- if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
- {
- $disabled{$1}= $2 if not exists $disabled{$1};
- }
- }
- close DISABLED;
- }
+ {
+ # $^O on Windows considered not generic enough
+ my $plat= (IS_WINDOWS) ? 'windows' : $^O;
+
+ while ( <DISABLED> )
+ {
+ chomp;
+ #diasble the test case if platform matches
+ if ( /\@/ )
+ {
+ if ( /\@$plat/ )
+ {
+ /^\s*(\S+)\s*\@$plat.*:\s*(.*?)\s*$/ ;
+ $disabled{$1}= $2 if not exists $disabled{$1};
+ }
+ elsif ( /\@!(\S*)/ )
+ {
+ if ( $1 ne $plat)
+ {
+ /^\s*(\S+)\s*\@!.*:\s*(.*?)\s*$/ ;
+ $disabled{$1}= $2 if not exists $disabled{$1};
+ }
+ }
+ }
+ elsif ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
+ {
+ chomp;
+ if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
+ {
+ $disabled{$1}= $2 if not exists $disabled{$1};
+ }
+ }
+ }
+ close DISABLED;
+ }
}
# Read suite.opt file