First check that TestUnits was not accidentally set for build and wine:build tasks, and then set it to an empty string (which is not possible from via regular directives) which means any test unit will show up as an error.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/tests/TestWTBS | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/testbot/tests/TestWTBS b/testbot/tests/TestWTBS index 7a5f29f3d..e9fa98edc 100755 --- a/testbot/tests/TestWTBS +++ b/testbot/tests/TestWTBS @@ -361,9 +361,10 @@ sub LoadTestInfo($) SetDefault($TestInfo, "tasks", "Status", "completed"); SetDefault($TestInfo, "tasks", "HasTask", 1); } - if (defined $TestInfo->{"wine:build"}->{TestUnits}) + foreach my $BuildType ("build", "wine:build") { - fail("wine:build.TestUnits should not be set"); + next if (!defined $TestInfo->{$BuildType}->{TestUnits}); + fail("$BuildType.TestUnits should not be set"); }
# Then propagate the defaults @@ -397,8 +398,9 @@ sub LoadTestInfo($) } } } - # Reset the inherited wine:build.TestUnits since it makes no sense - delete $TestInfo->{"wine:build"}->{TestUnits}; + # build and wine:build tasks should not be running tests + $TestInfo->{"build"}->{TestUnits} = ""; + $TestInfo->{"wine:build"}->{TestUnits} = "";
# Automatically check the Task: lines in simple cases foreach my $Build ("build", "wine:build")