[4/5] testbot/WineRunTask: Nest the timeouts so each of them is correctly detected.
Francois Gouget
fgouget at codeweavers.com
Fri Mar 29 08:04:00 CDT 2013
---
testbot/bin/WineRunTask.pl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 6a48df8..589cced 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -252,6 +252,8 @@ if (!$TA->SendFile("$BinDir/windows/$TestLauncher", $TestLauncher, 0))
FatalError "Can't copy TestLauncher to VM: $ErrMessage\n",
$FullErrFileName, $Job, $Step, $Task;
}
+
+my $Timeout = $Task->Timeout;
my $Script = "\@echo off\r\nset WINETEST_DEBUG=" . $Step->DebugLevel .
"\r\n";
if ($Step->ReportSuccessfulTests)
@@ -260,7 +262,10 @@ if ($Step->ReportSuccessfulTests)
}
if ($Step->Type eq "single")
{
- $Script .= "$TestLauncher -t " . $Task->Timeout . " $FileName ";
+ $Script .= "$TestLauncher -t $Timeout $FileName ";
+ # Add 1 second to the timeout so the client-side Wait() does not time out
+ # right before $TestLauncher does.
+ $Timeout += 1;
my $CmdLineArg = $Task->CmdLineArg;
if ($CmdLineArg)
{
@@ -308,7 +313,7 @@ if (!$TA->SendFileFromString($Script, "script.bat", $TestAgent::SENDFILE_EXE))
}
my $Pid = $TA->Run(["./script.bat"], 0);
-if (!$Pid or !defined $TA->Wait($Pid, $Task->Timeout))
+if (!$Pid or !defined $TA->Wait($Pid, $Timeout))
{
$ErrMessage = $TA->GetLastError();
}
--
1.7.10.4
More information about the wine-patches
mailing list