Francois Gouget : testbot/TestWTBS: Fix the TestUnits check in case of build errors.

Alexandre Julliard julliard at winehq.org
Fri Jan 22 15:44:42 CST 2021


Module: tools
Branch: master
Commit: b47c3dd0180168c53c267972a32821c16cca4a30
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=b47c3dd0180168c53c267972a32821c16cca4a30

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Jan 22 17:02:47 2021 +0100

testbot/TestWTBS: Fix the TestUnits check in case of build errors.

In case of a build error the TestUnits check must be skipped on Wine VMs
since the test units list is built from the test reports.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/tests/TestWTBS | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/testbot/tests/TestWTBS b/testbot/tests/TestWTBS
index cc3037f..01f46bf 100755
--- a/testbot/tests/TestWTBS
+++ b/testbot/tests/TestWTBS
@@ -514,6 +514,12 @@ sub CheckTask($$$$)
   {
     is($Task->Status, $TaskInfo->{Status}, "Check Status of task ". TaskKeyStr($Task));
   }
+  if ($Task->Status =~ /^bad/)
+  {
+    # It makes no sense to check which test units were run in case of a build
+    # error.
+    $TestUnits->{$TaskType}->{"*skipped*"} = 1;
+  }
 
   my $ReportCount = 0;
   foreach my $LogName (@{GetLogFileNames($Task->GetDir())})
@@ -670,6 +676,8 @@ sub CheckJobTree($)
         $HasTask->{$Type} ||= 0;
         is($HasTask->{$Type}, $TypeInfo->{HasTask}, "Check the presence of $Type tasks for job ". $Job->Id);
       }
+
+      next if ($TestUnits->{$Type}->{"*skipped*"});
       if (CheckValue($TypeInfo->{TestUnits}))
       {
         foreach my $TestUnit (split / +/, $TypeInfo->{TestUnits})




More information about the wine-cvs mailing list