Francois Gouget : testbot/Build: Only download TestLauncher*.exe after updates.
Alexandre Julliard
julliard at winehq.org
Thu Sep 19 10:29:15 CDT 2019
Module: tools
Branch: master
Commit: 9f5a6cfc18d7b720fbf134b98c52997762fdd642
URL: https://source.winehq.org/git/tools.git/?a=commit;h=9f5a6cfc18d7b720fbf134b98c52997762fdd642
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Thu Sep 19 15:08:36 2019 +0200
testbot/Build: Only download TestLauncher*.exe after updates.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/bin/WineRunReconfig.pl | 9 ++++++++-
testbot/lib/Build/Utils.pm | 15 +++++++++++++++
testbot/lib/WineTestBot/LogUtils.pm | 4 ++++
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index b3c9508..bef9a59 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -389,10 +389,11 @@ if (!defined $TA->Wait($Pid, $Task->Timeout, 60))
}
}
+my $Summary;
Debug(Elapsed($Start), " Retrieving 'Reconfig.log'\n");
if ($TA->GetFile("Reconfig.log", "$TaskDir/log"))
{
- my $Summary = ParseTaskLog("$TaskDir/log");
+ $Summary = ParseTaskLog("$TaskDir/log");
if ($Summary->{Task} eq "ok")
{
# We must have gotten the full log and the build did succeed.
@@ -435,6 +436,12 @@ if ($NewStatus eq "completed")
"latest/wine-parentsrc.txt")
{
my $BaseName = basename($FileName);
+ if ($FileName !~ m~^latest/~ and !$Summary->{$BaseName} and
+ -f "$DataDir/latest/$BaseName")
+ {
+ # This file was not updated to there is no point redownloading it.
+ next;
+ }
Debug(Elapsed($Start), " Retrieving '$TaskDir/$BaseName'\n");
if ($TA->GetFile($FileName, "$TaskDir/$BaseName"))
{
diff --git a/testbot/lib/Build/Utils.pm b/testbot/lib/Build/Utils.pm
index 57a5f4b..50d5735 100644
--- a/testbot/lib/Build/Utils.pm
+++ b/testbot/lib/Build/Utils.pm
@@ -33,6 +33,7 @@ our @EXPORT = qw(GetToolName InfoMsg LogMsg Error
SetupWineEnvironment RunWine CreateWinePrefix);
use Digest::SHA;
+use File::Basename;
use File::Path;
use WineTestBot::Config;
@@ -237,6 +238,13 @@ sub GetTestLauncher($)
sub BuildTestLauncher()
{
+ my %Files;
+ foreach my $Bits ("32", "64")
+ {
+ $Files{"Path$Bits"} = GetTestLauncher({Build => "win$Bits"});
+ $Files{"Before$Bits"} = GetMTime($Files{"Path$Bits"});
+ }
+
InfoMsg "\nRebuilding TestLauncher\n";
my $CPUCount = GetCPUCount();
system("cd '$::RootDir/src/TestLauncher' && set -x && ".
@@ -247,6 +255,13 @@ sub BuildTestLauncher()
return !1;
}
+ foreach my $Bits ("32", "64")
+ {
+ if ($Files{"Before$Bits"} != GetMTime($Files{"Path$Bits"}))
+ {
+ LogMsg "Updated ". basename($Files{"Path$Bits"}) ."\n";
+ }
+ }
return 1;
}
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index a18c463..3b1c356 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -107,6 +107,10 @@ sub ParseTaskLog($)
$Summary->{Task} = "badpatch";
last; # Should be the last and most specific message
}
+ elsif ($Line =~ /^Task: Updated ([a-zA-Z0-9.]+)$/)
+ {
+ $Summary->{$1} = "updated";
+ }
elsif ($Line =~ /^Task: / or _IsPerlError($Line))
{
$Summary->{Task} = "failed";
More information about the wine-cvs
mailing list