Francois Gouget : testbot/TestWTBS: Allow side-loading of the TestWTBS directives.

Alexandre Julliard julliard at winehq.org
Mon Feb 8 15:45:45 CST 2021


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Feb  8 15:20:43 2021 +0100

testbot/TestWTBS: Allow side-loading of the TestWTBS directives.

This allows checking the results of non-patch jobs, such as
reporttest.exe runs.

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

---

 testbot/tests/TestWTBS | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/testbot/tests/TestWTBS b/testbot/tests/TestWTBS
index 4a4aba9..4837664 100755
--- a/testbot/tests/TestWTBS
+++ b/testbot/tests/TestWTBS
@@ -108,6 +108,7 @@ sub check_opt_val($$)
 }
 
 my $OptJobs;
+my %OptJobInfoPath;
 my $OptMbox;
 while (@ARGV)
 {
@@ -120,6 +121,15 @@ while (@ARGV)
   {
     $OptMbox = check_opt_val($Arg, $OptMbox);
   }
+  elsif ($Arg eq "--job-wtbs")
+  {
+    my $JobId = check_opt_val($Arg, undef);
+    if ($JobId)
+    {
+      my $Path = check_opt_val("$Arg $JobId", $OptJobInfoPath{$JobId});
+      $OptJobInfoPath{$JobId} = $Path if ($Path);
+    }
+  }
   elsif ($Arg eq "--help")
   {
     $Usage = 0;
@@ -163,7 +173,7 @@ if (defined $Usage)
     error("try '$name0 --help' for more information\n");
     exit $Usage;
   }
-  print "Usage: $name0 [--jobs RANGES] [--mbox FILE] [--help]\n";
+  print "Usage: $name0 [--jobs RANGES] [--job-wtbs ID PATH] [--mbox FILE] [--help]\n";
   print "\n";
   print "Automate checking the Wine TestBot test Suite results.\n";
   print "\n";
@@ -179,6 +189,8 @@ if (defined $Usage)
   print "                or of the form 'FIRST..LAST' where FIRST and LAST are either the\n";
   print "                empty string or a job id.\n";
   print "  --mbox FILE   Check the TestBot's emails in this mbox-format file.\n";
+  print "  --job-wtbs ID PATH Use the specified file to load the directives for job ID.\n";
+  print "                This option can be specified multiple times.\n";
   print "  --help        Shows this usage message.\n";
   exit 0;
 }
@@ -1057,6 +1069,11 @@ sub CheckJobTree($;$)
   return if ($CheckedJobs{$JobId});
   $CheckedJobs{$JobId} = 1;
 
+  if (!$TestInfo and $OptJobInfoPath{$JobId})
+  {
+      $TestInfo = LoadTestInfo($OptJobInfoPath{$JobId});
+  }
+
   my ($HasTask, $HasNewFailures);
   my $TestUnits = {};
   my $Email = $Emails{$JobId};




More information about the wine-cvs mailing list