[1/2] testbot/build: Don't force WineTestBot to be installed in the same location on the build VM and the WineTestBot server.

Francois Gouget fgouget at codeweavers.com
Mon Dec 17 03:01:24 CST 2012


---

The VMware API forced us to use absolute paths so we used the same paths 
on the WineTestBot server and on the build VM. However now we can simply 
use paths relative to where testagentd is running.

 testbot/bin/WineRunBuild.pl    |   15 +++++++--------
 testbot/bin/WineRunReconfig.pl |    8 +++-----
 testbot/doc/INSTALL.txt        |    3 ++-
 3 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index 9fd23a7..faf777e 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -237,14 +237,14 @@ if (defined($ErrMessage))
 }
 my $FileName = $Step->FileName;
 $ErrMessage = $VM->CopyFileFromHostToGuest("$StepDir/$FileName",
-                                           "$DataDir/staging/$FileName");
+                                           "staging/$FileName");
 if (defined($ErrMessage))
 {
   FatalError "Can't copy patch to VM: $ErrMessage\n",
              $FullErrFileName, $Job, $Step, $Task;
 }
 my $Script = "#!/bin/sh\n";
-$Script .= "$BinDir/build/Build.pl $FileName " . $Step->FileType .
+$Script .= "../bin/build/Build.pl $FileName " . $Step->FileType .
            " $BaseName 32";
 if ($Run64)
 {
@@ -254,15 +254,14 @@ $Script .= "\n";
 $ErrMessage = $VM->RunScriptInGuestTimeout($Script, $Task->Timeout);
 if (defined($ErrMessage))
 {
-  $VM->CopyFileFromGuestToHost("$LogDir/Build.log",
-                               $FullRawlogFileName);
+  $VM->CopyFileFromGuestToHost("Build.log", $FullRawlogFileName);
   ProcessRawlog($FullRawlogFileName, $FullLogFileName, $FullErrFileName);
   FatalError "Failure running script in VM: $ErrMessage\n",
              $FullErrFileName, $Job, $Step, $Task;
 }
 
-$ErrMessage = $VM->CopyFileFromGuestToHost("$LogDir/Build.log",
-                                           $FullRawlogFileName);
+$ErrMessage = $VM->CopyFileFromGuestToHost("Build.log", $FullRawlogFileName);
+LogMsg "263 ErrMessage=[", $ErrMessage || "<undef>", "]\n";
 if (defined($ErrMessage))
 {
   FatalError "Can't copy log from VM: $ErrMessage\n", $FullErrFileName,
@@ -285,11 +284,11 @@ foreach my $OtherStep (@{$Job->Steps->GetItems()})
       my $TestExecutable;
       if ($Step->FileType ne "patchprograms")
       {
-        $TestExecutable = "$DataDir/build-mingw$Bits/dlls/$BaseName/tests/${BaseName}_test.exe";
+        $TestExecutable = "build-mingw$Bits/dlls/$BaseName/tests/${BaseName}_test.exe";
       }
       else
       {
-        $TestExecutable = "$DataDir/build-mingw$Bits/programs/$BaseName/tests/${BaseName}.exe_test.exe";
+        $TestExecutable = "build-mingw$Bits/programs/$BaseName/tests/${BaseName}.exe_test.exe";
       }
       $ErrMessage = $VM->CopyFileFromGuestToHost($TestExecutable,
                                                  "$OtherStepDir/$OtherFileName");
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 47ac72e..4f86e10 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -198,19 +198,17 @@ if (defined($ErrMessage))
   FatalError "Can't set VM status to running: $ErrMessage\n",
              $FullErrFileName, $Job, $Step, $Task;
 }
-my $Script = "#!/bin/sh\n$BinDir/build/Reconfig.pl\n";
+my $Script = "#!/bin/sh\n../bin/build/Reconfig.pl\n";
 $ErrMessage = $VM->RunScriptInGuestTimeout($Script, $Task->Timeout);
 if (defined($ErrMessage))
 {
-  $VM->CopyFileFromGuestToHost("$LogDir/Reconfig.log",
-                               $FullRawlogFileName);
+  $VM->CopyFileFromGuestToHost("Reconfig.log", $FullRawlogFileName);
   ProcessRawlog($FullRawlogFileName, $FullLogFileName, $FullErrFileName);
   FatalError "Failure running script in VM: $ErrMessage\n",
              $FullErrFileName, $Job, $Step, $Task;
 }
 
-$ErrMessage = $VM->CopyFileFromGuestToHost("$LogDir/Reconfig.log",
-                                           $FullRawlogFileName);
+$ErrMessage = $VM->CopyFileFromGuestToHost("Reconfig.log", $FullRawlogFileName);
 if (defined($ErrMessage))
 {
   FatalError "Can't copy log from VM: $ErrMessage\n", $FullErrFileName,
diff --git a/testbot/doc/INSTALL.txt b/testbot/doc/INSTALL.txt
index b780de0..f57ed17 100644
--- a/testbot/doc/INSTALL.txt
+++ b/testbot/doc/INSTALL.txt
@@ -144,7 +144,8 @@ Dependencies:
 - In the winehq account, run Reconfig.pl.
   Check $HOME/tools/testbot/log/Reconfig.log to make sure it
   succeeded.
-- Start the TestAgent server: ./bin/build/testagentd PORT SRCHOST
+- Start the TestAgent server from the var directory:
+    cd $HOME/tools/testbot/var && ../bin/build/testagentd PORT SRCHOST
   Where PORT is the $AgentPort that was configured in ConfigLocal.pl
   on the WineTestBot server, and SRCHOST is either omitted or the hostname
   of the WineTestBot server.
-- 
1.7.10.4




More information about the wine-patches mailing list