Francois Gouget : testbot: Always update the VM guest time after a revert.
Alexandre Julliard
julliard at winehq.org
Sun Oct 27 14:19:43 CDT 2019
Module: tools
Branch: master
Commit: de71fa30a51a81128688dda2c7912a33e5d5f8da
URL: https://source.winehq.org/git/tools.git/?a=commit;h=de71fa30a51a81128688dda2c7912a33e5d5f8da
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Thu Oct 24 14:12:05 2019 +0200
testbot: Always update the VM guest time after a revert.
All VMs support it nowadays and having the current time is important not
only for the tests but also for builds (due to a ccache bug).
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/bin/LibvirtTool.pl | 16 ++++++++++++++++
testbot/bin/WineRunTask.pl | 13 -------------
testbot/bin/WineRunWineTest.pl | 13 -------------
3 files changed, 16 insertions(+), 26 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index d590191..127c15c 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -420,6 +420,22 @@ sub SetupTestAgentd($$$$)
# A side effect is that it will force TestAgentd.exe.old to stay around.
}
+ # Always update the guest's system time
+ # This is needed not only for the tests (date is important when checking
+ # HTTPS certificates), but also for the build (if the time moves forward
+ # during the build some ccache versions will return a compilation error).
+ if (!$TA->SetTime())
+ {
+ # Not a fatal error. Try the next port in case the VM runs a privileged
+ # TestAgentd daemon there.
+ my $PrivilegedTA = $VM->GetAgent(1);
+ if (!$PrivilegedTA->SetTime())
+ {
+ FatalError("Unable to set the VM system time: ". $PrivilegedTA->GetLastError() ."\n");
+ }
+ $PrivilegedTA->Disconnect();
+ }
+
if ($Booting and $VM->Type eq "wine")
{
# Make sure the X session has had time to start
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 81a2996..1ee1c12 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -433,19 +433,6 @@ my $Mission = $Missions->[0]->{Missions}->[0];
#
my $TA = $VM->GetAgent();
-Debug(Elapsed($Start), " Setting the time\n");
-if (!$TA->SetTime())
-{
- # Not a fatal error. Try the next port in case the VM runs a privileged
- # TestAgentd daemon there.
- my $PrivilegedTA = $VM->GetAgent("privileged");
- if (!$PrivilegedTA->SetTime())
- {
- LogTaskError("Unable to set the VM system time: ". $PrivilegedTA->GetLastError() .". Maybe the TestAgentd process is missing the required privileges.\n");
- $PrivilegedTA->Disconnect();
- }
-}
-
my $FileName = $Step->FileName;
Debug(Elapsed($Start), " Sending '". $Step->GetFullFileName() ."'\n");
if (!$TA->SendFile($Step->GetFullFileName(), $FileName, 0))
diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl
index ff5317c..a2297cb 100755
--- a/testbot/bin/WineRunWineTest.pl
+++ b/testbot/bin/WineRunWineTest.pl
@@ -432,19 +432,6 @@ $TaskMissions = $Missions->[0];
# Setup the VM
#
my $TA = $VM->GetAgent();
-Debug(Elapsed($Start), " Setting the time\n");
-if (!$TA->SetTime())
-{
- # Not a fatal error. Try the next port in case the VM runs a privileged
- # TestAgentd daemon there.
- my $PrivilegedTA = $VM->GetAgent(1);
- if (!$PrivilegedTA->SetTime())
- {
- LogTaskError("Unable to set the VM system time: ". $PrivilegedTA->GetLastError() .". Maybe the TestAgentd process is missing the required privileges.\n");
- $PrivilegedTA->Disconnect();
- }
-}
-
my $FileName = $Step->FileName;
if (defined $FileName)
{
More information about the wine-cvs
mailing list