diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2011-07-28 12:54:02 +0200 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2011-07-28 12:54:02 +0200 |
commit | 341989469f31225646b4fedf9d42a8f73a4d4801 (patch) | |
tree | caf0716b7ed47ac2e72b415b0bf76ec0abcef0e9 /mysql-test/lib | |
parent | cfe8d893e92340b4c1ec80441d44df21821318f9 (diff) | |
download | mariadb-git-341989469f31225646b4fedf9d42a8f73a4d4801.tar.gz |
Bug #12726039 MTR SHOULD PROVIDE ABILITY TO DISABLE TEST ON SELECTED PLATFORMS
Add extra patterns to look for @<platform>
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 708b8e90fc4..3dcd99f235f 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -317,10 +317,30 @@ sub collect_one_suite($) my %disabled; if ( open(DISABLED, "$testdir/disabled.def" ) ) { + # $^O on Windows considered not generic enough + my $plat= (IS_WINDOWS) ? 'windows' : $^O; + while ( <DISABLED> ) { chomp; - if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) + #diasble the test case if platform matches + if ( /\@/ ) + { + if ( /\@$plat/ ) + { + /^\s*(\S+)\s*\@$plat.*:\s*(.*?)\s*$/ ; + $disabled{$1}= $2; + } + elsif ( /\@!(\S*)/ ) + { + if ( $1 ne $plat) + { + /^\s*(\S+)\s*\@!.*:\s*(.*?)\s*$/ ; + $disabled{$1}= $2; + } + } + } + elsif ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) { $disabled{$1}= $2; } |