Bug #12726039 MTR SHOULD PROVIDE ABILITY TO DISABLE TEST ON SELECTED PLATFORMS
Add extra patterns to look for @<platform>
This commit is contained in:
parent
cfe8d893e9
commit
341989469f
@ -317,10 +317,30 @@ sub collect_one_suite($)
|
|||||||
my %disabled;
|
my %disabled;
|
||||||
if ( open(DISABLED, "$testdir/disabled.def" ) )
|
if ( open(DISABLED, "$testdir/disabled.def" ) )
|
||||||
{
|
{
|
||||||
|
# $^O on Windows considered not generic enough
|
||||||
|
my $plat= (IS_WINDOWS) ? 'windows' : $^O;
|
||||||
|
|
||||||
while ( <DISABLED> )
|
while ( <DISABLED> )
|
||||||
{
|
{
|
||||||
chomp;
|
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;
|
$disabled{$1}= $2;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user