Francois Gouget : testbot: Always create the Task directory even if there is nothing to stage.

Alexandre Julliard julliard at winehq.org
Wed Nov 22 14:08:25 CST 2017


Module: tools
Branch: master
Commit: 14de13e34f5b8f4fe7201e2501372bed0be9c7ba
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=14de13e34f5b8f4fe7201e2501372bed0be9c7ba

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Nov 22 11:24:33 2017 +0100

testbot: Always create the Task directory even if there is nothing to stage.

Otherwise the Engine will have nowhere to put the error log when forking
the Task's child process. This particularly impacts the Reconfig Tasks
since they neither have a patch nor executable to stage.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/WineTestBot/Steps.pm | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/testbot/lib/WineTestBot/Steps.pm b/testbot/lib/WineTestBot/Steps.pm
index 8c5d4ec..95c0a45 100644
--- a/testbot/lib/WineTestBot/Steps.pm
+++ b/testbot/lib/WineTestBot/Steps.pm
@@ -87,10 +87,9 @@ sub HandleStaging($$)
 {
   my ($self) = @_;
 
-  if (! $self->InStaging)
-  {
-    return undef;
-  }
+  # Always at least create the step's directory
+  my $StepDir = $self->CreateDir();
+  return undef if (! $self->InStaging);
 
   my $FileName = $self->FileName;
   if ($FileName !~ m/^[0-9a-z-]+_(.*)$/)
@@ -99,9 +98,7 @@ sub HandleStaging($$)
   }
   my $BaseName = $1;
   my $StagingFileName = "$DataDir/staging/$FileName";
-  my $StepDir = $self->CreateDir();
-  my $FinalFileName = "$StepDir/$BaseName";
-  if (!move($StagingFileName, $FinalFileName))
+  if (!move($StagingFileName, "$StepDir/$BaseName"))
   {
     return "Could not move the staging file: $!";
   }




More information about the wine-cvs mailing list