Module: tools
Branch: master
Commit: 1db323cfd1f448bc976342d3d293e1b1caeab995
URL: https://source.winehq.org/git/tools.git/?a=commit;h=1db323cfd1f448bc976342d…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Feb 6 15:13:36 2020 +0100
testbot/UpdateTaskLogs: Fix error handling for the task.log and testbot.log renames.
The code checks that the target filename does not exist (so rename()
does not clobber it), so it's very unlikely that the error is that the
destination already exists.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/UpdateTaskLogs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/UpdateTaskLogs b/testbot/bin/UpdateTaskLogs
index e1da826..c6f7b75 100755
--- a/testbot/bin/UpdateTaskLogs
+++ b/testbot/bin/UpdateTaskLogs
@@ -351,12 +351,17 @@ sub ProcessTaskLogs($$$)
"old_log.err" => "old_testbot.log");
while (my ($OldName, $NewName) = each %LogMap)
{
- if (-f "$TaskDir/$OldName" and !-f "$TaskDir/$NewName" and
- !rename("$TaskDir/$OldName", "$TaskDir/$NewName"))
+ next if (!-f "$TaskDir/$OldName");
+ if (-f "$TaskDir/$NewName")
{
Error TaskKeyStr($Task) .": Could not rename $OldName because $NewName already exists\n";
$Rc = 1;
}
+ elsif (!rename("$TaskDir/$OldName", "$TaskDir/$NewName"))
+ {
+ Error TaskKeyStr($Task) .": Could not rename $OldName to $NewName: $!\n";
+ $Rc = 1;
+ }
}
# testbot.log is the only log which we expect to be empty.
Module: tools
Branch: master
Commit: 8ce2a0aca63da9f2c36b33f2c03405332908a2c2
URL: https://source.winehq.org/git/tools.git/?a=commit;h=8ce2a0aca63da9f2c36b33f…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Feb 6 15:13:18 2020 +0100
testbot/UpdateTaskLogs: Fix deletion of the new per-task reference reports.
$ReportNames had the wrong scope, causing it to be undefined when the
time came to delete the per-task reference reports.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/UpdateTaskLogs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/bin/UpdateTaskLogs b/testbot/bin/UpdateTaskLogs
index 051dbe5..e1da826 100755
--- a/testbot/bin/UpdateTaskLogs
+++ b/testbot/bin/UpdateTaskLogs
@@ -321,7 +321,7 @@ sub ProcessTaskLogs($$$)
{
# Upgrade the naming scheme of the task's old reference reports,
# delete those that are not meant to exist.
- my ($ErrMessage, $ReportNames, $_TaskMissions) = $Task->GetReportNames();
+ (my $ErrMessage, $ReportNames, my $_TaskMissions) = $Task->GetReportNames();
if ($ErrMessage)
{
Error "$ErrMessage\n";
Module: tools
Branch: master
Commit: 4c5ed9bbc5f9fbb1fbee33522fd8fde98d687578
URL: https://source.winehq.org/git/tools.git/?a=commit;h=4c5ed9bbc5f9fbb1fbee335…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Feb 6 15:12:44 2020 +0100
testbot/UpdateTaskLogs: MoveRefReport() is not given .err files.
So there is no point allowing for a .err extension in the regexp
splitting the report filename.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/UpdateTaskLogs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/bin/UpdateTaskLogs b/testbot/bin/UpdateTaskLogs
index 4fe6ff3..051dbe5 100755
--- a/testbot/bin/UpdateTaskLogs
+++ b/testbot/bin/UpdateTaskLogs
@@ -270,7 +270,7 @@ sub MoveRefReport($$;$)
$NewDir ||= $RefDir;
my $NewName = $RefName;
- if ($RefName =~ /^([a-zA-Z0-9_]+)_((?:exe|win|wow)(?:32|64)[a-zA-Z0-9_]*\.report(?:\.err)?)$/)
+ if ($RefName =~ /^([a-zA-Z0-9_]+)_((?:exe|win|wow)(?:32|64)[a-zA-Z0-9_]*\.report)$/)
{
# We don't know which job generated this reference log.
# So use a fixed, arbitrary JobId.