Francois Gouget : testbot/TestWTBS: Automatically check the 'Task:' build and wine lines.
Alexandre Julliard
julliard at winehq.org
Fri Jan 29 14:54:33 CST 2021
Module: tools
Branch: master
Commit: 6e74b064f686a77b36341f72eec86c33acf86c5b
URL: https://source.winehq.org/git/tools.git/?a=commit;h=6e74b064f686a77b36341f72eec86c33acf86c5b
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Fri Jan 29 05:03:04 2021 +0100
testbot/TestWTBS: Automatically check the 'Task:' build and wine lines.
The automatic checks only cover the simple cases which is the majority,
thus allowing to simplify the TestWTBS directives.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/tests/TestWTBS | 37 +++++++++++++++++++++++++++++++++----
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/testbot/tests/TestWTBS b/testbot/tests/TestWTBS
index 6f78406..bc4e0d9 100755
--- a/testbot/tests/TestWTBS
+++ b/testbot/tests/TestWTBS
@@ -362,14 +362,43 @@ sub LoadTestInfo($)
foreach my $TaskType (@$TaskTypes)
{
my $TaskInfo = $TestInfo->{$TaskType};
- if (!defined $TaskInfo->{$Field})
- {
- $TaskInfo->{$Field} = $SrcVal;
- }
+ next if (defined $TaskInfo->{$Field});
+ # Copy arrays to avoid side-effects when adding built-in defaults
+ $TaskInfo->{$Field} = ref($SrcVal) eq "ARRAY" ? [ @$SrcVal ] : $SrcVal;
}
}
}
+ # Automatically check the Task: lines in simple cases
+ # Make sure no test is run for build tasks
+ my $GrepV = ($TestInfo->{build}->{"report.GrepV"} ||= []);
+ push @$GrepV, '.';
+ $GrepV = ($TestInfo->{build}->{"log.GrepV"} ||= []);
+ push @$GrepV, '^Task: tests$';
+ if (($TestInfo->{build}->{Status} || "") =~ /^bad(?:build|patch)$/ or
+ $TestInfo->{build}->{HasTimeout})
+ {
+ push @$GrepV, '^Task: ok$';
+ }
+ else
+ {
+ my $Grep = ($TestInfo->{build}->{"log.Grep"} ||= []);
+ push @$Grep, '^Task: ok$';
+ }
+
+ # Note: Depending on where the timeout occurs, the wine task log may or
+ # may not have a 'Task: ok' line.
+ if (($TestInfo->{wine}->{Status} || "") eq "completed" and
+ !$TestInfo->{wine}->{HasTimeout})
+ {
+ my $Grep = ($TestInfo->{wine}->{"log.Grep"} ||= []);
+ if (CheckValue($TestInfo->{wine}->{TestUnits}))
+ {
+ push @$Grep, '^Task: tests$';
+ }
+ push @$Grep, '^Task: ok$';
+ }
+
# Validate and fix the Grep* fields
foreach my $GrepType ("Grep", "GrepV")
{
More information about the wine-cvs
mailing list