[Tools] testbot/WineRunReconfig: Don't update the TestList if the Reconfig failed.

Francois Gouget fgouget at codeweavers.com
Fri Apr 21 04:16:41 CDT 2017


If we failed to update/rebuild Wine then we will stick with the old Wine
and we should still use the old test list.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/bin/WineRunReconfig.pl | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index a0e56074..8dd7df87 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -399,15 +399,18 @@ elsif (!defined $TAError)
   $TAError = "An error occurred while retrieving the reconfig log: ". $TA->GetLastError();
 }
 
-Debug(Elapsed($Start), " Retrieving the updated test list '$TaskDir/testlist.txt'\n");
-if ($TA->GetFile("testlist.txt", "$TaskDir/testlist.txt"))
+if ($NewStatus eq "completed")
 {
   use File::Copy;
-  copy "$TaskDir/testlist.txt", "$DataDir/latest/testlist.txt";
-}
-elsif (!defined $TAError)
-{
-  $TAError = "An error occurred while retrieving the test list: ". $TA->GetLastError();
+  Debug(Elapsed($Start), " Retrieving the updated test list '$TaskDir/testlist.txt'\n");
+  if ($TA->GetFile("testlist.txt", "$TaskDir/testlist.txt"))
+  {
+    copy "$TaskDir/testlist.txt", "$DataDir/latest/testlist.txt";
+  }
+  elsif (!defined $TAError)
+  {
+    $TAError = "An error occurred while retrieving the test list: ". $TA->GetLastError();
+  }
 }
 
 $TA->Disconnect();
-- 
2.11.0



More information about the wine-patches mailing list