Francois Gouget : testbot/TestWTBS: The build tasks should not have test units.
Alexandre Julliard
julliard at winehq.org
Mon Mar 1 15:28:34 CST 2021
Module: tools
Branch: master
Commit: 13c4f85d07932c56461716f1997b0f9dab87f1e7
URL: https://source.winehq.org/git/tools.git/?a=commit;h=13c4f85d07932c56461716f1997b0f9dab87f1e7
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Mar 1 16:24:33 2021 +0100
testbot/TestWTBS: The build tasks should not have test units.
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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/tests/TestWTBS | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/testbot/tests/TestWTBS b/testbot/tests/TestWTBS
index 1467c4b..29c11d6 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
@@ -396,8 +397,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")
More information about the wine-cvs
mailing list