+ Try tweaking time sync settings to prevent clock drift rather than restarting VBoxService on every test run.
+
diff --git a/test/Vagrantfile b/test/Vagrantfile
index 1b8a705d9..86df97cf0 100644
--- a/test/Vagrantfile
+++ b/test/Vagrantfile
@@ -40,10 +40,12 @@ Vagrant.configure(2) do |config|
echo 'supersede domain-name-servers 8.8.8.8;' >> /etc/dhcp/dhclient.conf
/etc/init.d/networking restart
- # If builds fail with 'modification time in the future', the following command will sync the vm clock with the host
+ # Set time sync settings so builds don't fail with clock drift errors
#---------------------------------------------------------------------------------------------------------------------------
- echo 'Start Time Sync Service' && date
- sudo /usr/sbin/VBoxService --timesync-set-start
+ echo 'Time Sync Settings' && date
+ /etc/init.d/virtualbox-guest-utils stop
+ /usr/sbin/VBoxService --timesync-set-on-restore 1 --timesync-interval 5000 --timesync-set-threshold 1
+ /etc/init.d/virtualbox-guest-utils start
#---------------------------------------------------------------------------------------------------------------------------
echo 'Install Perl Modules' && date
diff --git a/test/test.pl b/test/test.pl
index 456191514..75c92c87d 100755
--- a/test/test.pl
+++ b/test/test.pl
@@ -396,16 +396,6 @@ eval
exit 0;
}
- # Sync time to prevent build failures when running on VirtualBox.
- &log(INFO, "sync vbox time");
- my $strVBoxService = '/usr/sbin/VBoxService';
-
- if ($oStorageTest->exists($strVBoxService))
- {
- executeTest("sudo killall VBoxService");
- executeTest("sudo ${strVBoxService} --timesync-set-start");
- }
-
# Build CI configuration
if (!$bNoCiConfig)
{