Module: tools
Branch: master
Commit: 1e0aa12923fbb1801cbd0f0d2d2aac334d9c07b7
URL: https://source.winehq.org/git/tools.git/?a=commit;h=1e0aa12923fbb1801cbd0f0…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon May 21 08:11:07 2018 +0200
testbot/CheckForWinetestUpdate: Exit if we cannot replace the latest WineTest.
Otherwise we would create jobs that test the old (presumably already
tested) WineTest and the next CheckWinetestUpdate run will redo it all
anyway.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/CheckForWinetestUpdate.pl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testbot/bin/CheckForWinetestUpdate.pl b/testbot/bin/CheckForWinetestUpdate.pl
index 37bd776..ff8c30c 100755
--- a/testbot/bin/CheckForWinetestUpdate.pl
+++ b/testbot/bin/CheckForWinetestUpdate.pl
@@ -238,6 +238,8 @@ mkdir "$DataDir/latest";
if (!move($StagingFileName, $LatestFileName))
{
LogMsg "Could not move '$StagingFileName' to '$LatestFileName': $!\n";
+ unlink($StagingFileName);
+ exit 1;
}
utime time, $Response->last_modified, $LatestFileName;
Module: tools
Branch: master
Commit: df0f0b69d4f8343cfbbf6a0c23078bd936651fb6
URL: https://source.winehq.org/git/tools.git/?a=commit;h=df0f0b69d4f8343cfbbf6a0…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon May 21 08:10:52 2018 +0200
testbot/CheckForWinetestUpdate: Hard link the latest WineTest.
This is ok because the latest WineTest executable is moved into place
rather than being overwritten.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/CheckForWinetestUpdate.pl | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/testbot/bin/CheckForWinetestUpdate.pl b/testbot/bin/CheckForWinetestUpdate.pl
index a7abec7..37bd776 100755
--- a/testbot/bin/CheckForWinetestUpdate.pl
+++ b/testbot/bin/CheckForWinetestUpdate.pl
@@ -65,21 +65,10 @@ sub AddJob($$$)
{
my ($BaseJob, $LatestBaseName, $Bits) = @_;
- # Create a copy in staging so it can then be moved into the job directory
- my ($fh, $StagingFileName) = OpenNewFile("$DataDir/staging", "_$LatestBaseName");
- if (!$fh)
- {
- LogMsg "Could not create the staging file: $!\n";
- return 0;
- }
- if (!copy("$DataDir/latest/$LatestBaseName", $fh))
- {
- LogMsg "Could not copy '$DataDir/latest/$LatestBaseName' to '$StagingFileName': $!\n";
- close($fh);
- unlink($StagingFileName);
- return 0;
- }
- close($fh);
+ # Create a hard link in staging so it can then be moved into the job
+ # directory. This is ok because the latest file is never overwritten.
+ my $StagingFileName = CreateNewLink("$DataDir/latest/$LatestBaseName",
+ "$DataDir/staging", "_$LatestBaseName");
# First create a new job
my $Jobs = CreateJobs();