Francois Gouget : testbot/WineRunTask: Better deal with single test unit executables.

Alexandre Julliard julliard at winehq.org
Tue Jun 13 14:40:13 CDT 2017


Module: tools
Branch: master
Commit: 440f41dad071bf8007311429e68a980cb0d82245
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=440f41dad071bf8007311429e68a980cb0d82245

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue Jun 13 10:14:55 2017 +0200

testbot/WineRunTask: Better deal with single test unit executables.

If a Wine test executable has a single test unit, then one can upload
and run it without a parameter. In that case TestLauncher does not the
test unit name and thus does not print it on the start line. So
WineRunTask ends up with $CurrentUnit="" and must account for it when
it compares it to the test unit of skip lines.
This should also be factored when determining whether the test output
follows the Wine test standards.

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

---

 testbot/bin/WineRunTask.pl | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 7122c57..cd74119 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -477,7 +477,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
     sub CheckUnit($$)
     {
       my ($Unit, $Type) = @_;
-      if ($Unit eq $CurrentUnit)
+      if ($Unit eq $CurrentUnit or $CurrentUnit eq "")
       {
         $IsWineTest = 1;
       }
@@ -600,10 +600,14 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
              ($CurrentUnit ne "" and
               $Line =~ /($CurrentUnit)(?:\.c)?:\d+:? Tests? skipped: /))
       {
+        my $Unit = $1;
         # Don't complain and don't count misplaced skips. Only complain if they
         # are misreported (see CloseTestUnit). Also TestLauncher uses the wrong
         # name in its skip message when skipping tests.
-        $LineSkips++ if ($1 eq $CurrentUnit or $1 eq $CurrentDll);
+        if ($Unit eq $CurrentUnit or $CurrentUnit eq "" or $Unit eq $CurrentDll)
+        {
+          $LineSkips++;
+        }
       }
       elsif ($Line =~ /^Fatal: test '([_a-z0-9]+)' does not exist/)
       {




More information about the wine-cvs mailing list