From 1a98bd41b48b2619b318639faeeb688481dbc07e Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 2 Nov 2018 08:37:27 -0400 Subject: [PATCH] Mount tmpfs in Vagrantfile instead test.pl. Mounting/unmounting tmpfs on /home/[user]/test takes time, forces at least 3GB of memory to be available for tests, and makes it harder to preserve data between tests. Instead, move mounting of tmpfs to the Vagrantfile and add it to fstab so it survives reboots. --- doc/xml/release.xml | 8 ++++++++ test/Vagrantfile | 7 +++++++ test/test.pl | 3 --- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 7c40b4b57..861c046e4 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -87,6 +87,14 @@ + + + + +

Mount tmpfs in Vagrantfile instead test.pl.

+
+
+
diff --git a/test/Vagrantfile b/test/Vagrantfile index b18e71d79..87532c779 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -46,6 +46,13 @@ Vagrant.configure(2) do |config| sudo /etc/init.d/virtualbox-guest-utils stop sudo /usr/sbin/VBoxService --timesync-set-on-restore --timesync-interval 5000 --timesync-set-threshold 1 + # Mount tmpfs at /home/vagrant/test for faster testing + #--------------------------------------------------------------------------------------------------------------------------- + echo 'Mount tmpfs' && date + sudo -u vagrant mkdir -p -m 770 /home/vagrant/test + echo 'tmpfs /home/vagrant/test tmpfs size=2560M 0 1' >> /etc/fstab + mount -a + #--------------------------------------------------------------------------------------------------------------------------- echo 'Install Perl Modules' && date apt-get install -y libdbd-pg-perl libio-socket-ssl-perl libxml-libxml-perl libxml-checker-perl libperl-critic-perl \ diff --git a/test/test.pl b/test/test.pl index b1329d0bb..8b76b92d1 100755 --- a/test/test.pl +++ b/test/test.pl @@ -576,10 +576,7 @@ eval push(@{$oyProcess}, undef); } - executeTest("sudo umount ${strTestPath}", {bSuppressError => true}); executeTest("sudo rm -rf ${strTestPath}/*"); - $oStorageTest->pathCreate($strTestPath, {strMode => '0770', bIgnoreExists => true}); - executeTest("sudo mount -t tmpfs -o size=2560M test ${strTestPath}"); $oStorageTest->pathCreate($strCoveragePath, {strMode => '0770', bIgnoreMissing => true, bCreateParent => true}); # Remove old coverage dirs -- do it this way so the dirs stay open in finder/explorer, etc.