Francois Gouget : testbot/WineTest: Always work around explorer's 'fresh WINEPREFIX' bug.

Alexandre Julliard julliard at winehq.org
Thu Feb 4 16:02:10 CST 2021


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Feb  3 18:58:58 2021 +0100

testbot/WineTest: Always work around explorer's 'fresh WINEPREFIX' bug.

WineTest.pl assumed that the wineprefix had been set up by WineReconfig
so that pre-initializing it to work around explorer's 'fresh WINEPREFIX'
bug (41713) was not necessary. But that's no longer true so make sure
to always fully initialize the wineprefix before starting any test.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48671
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/bin/build/WineTest.pl | 41 +++++++++++++++--------------------------
 1 file changed, 15 insertions(+), 26 deletions(-)

diff --git a/testbot/bin/build/WineTest.pl b/testbot/bin/build/WineTest.pl
index 84ba1cb..dd41fcf 100755
--- a/testbot/bin/build/WineTest.pl
+++ b/testbot/bin/build/WineTest.pl
@@ -63,6 +63,18 @@ sub SetupTest($$)
   my $BaseName = SetupWineEnvironment($Mission);
   InfoMsg "\nRunning $Test in the $BaseName Wine\n";
   InfoMsg "LANG=$ENV{LANG}\n";
+
+  if (!-d $ENV{WINEPREFIX})
+  {
+    # FIXME Wait for the wineserver as a workaround for bug 41713.
+    my $ErrMessage = CreateWinePrefix($Mission, "wait");
+    if (defined $ErrMessage)
+    {
+      LogMsg "Could not create the $BaseName wineprefix: $ErrMessage\n";
+      return 0;
+    }
+  }
+
   return $BaseName;
 }
 
@@ -70,10 +82,9 @@ sub WineTestSuite($$$$)
 {
   my ($Mission, $NoSubmit, $BaseTag, $Args) = @_;
 
-  my $BaseName = SetupTest("WineTest", $Mission);
-
   # Run WineTest. Ignore the exit code since it returns non-zero whenever
   # there are test failures.
+  my $BaseName = SetupTest("WineTest", $Mission);
   my $Tag = SanitizeTag("$BaseTag-$BaseName");
   RunWine($Mission, "winetest.exe",
           "-c -o '$DataDir/$BaseName.report' -t $Tag ". ShArgv2Cmd(@$Args));
@@ -128,20 +139,9 @@ sub TestPatch($$)
     return 1 if (!@TestList);
   }
 
-  my $BaseName = SetupTest("the tests", $Mission);
-  if (!-d $ENV{WINEPREFIX})
-  {
-    # FIXME Wait for the wineserver as a workaround for bug 41713.
-    my $ErrMessage = CreateWinePrefix($Mission, "wait");
-    if (defined $ErrMessage)
-    {
-      LogMsg "Could not create the $BaseName wineprefix: $ErrMessage\n";
-      return 0;
-    }
-  }
-
   # Run WineTest. Ignore the exit code since it returns non-zero whenever
   # there are test failures.
+  my $BaseName = SetupTest("the tests", $Mission);
   RunWine($Mission, "winetest.exe",
           "-c -o '$DataDir/$BaseName.report' -t do.not.submit ".
           join(" ", @TestList));
@@ -177,18 +177,7 @@ sub TestExe($$$)
   my ($Mission, $FileName, $Args) = @_;
 
   my $BaseName = SetupTest("the tests", $Mission);
-  if (!-d $ENV{WINEPREFIX})
-  {
-    # FIXME Wait for the wineserver as a workaround for bug 41713.
-    my $ErrMessage = CreateWinePrefix($Mission, "wait");
-    if (defined $ErrMessage)
-    {
-      LogMsg "Could not create the $BaseName wineprefix: $ErrMessage\n";
-      return 0;
-    }
-  }
-
-  my $TestDir = GetTestDir($Mission);
+  my $TestDir = GetTestDir($Mission); # needs $WINEPREFIX
   if ($TestDir eq ".")
   {
     $FileName = "$DataDir/staging/$FileName";




More information about the wine-cvs mailing list