1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-05-22 10:15:16 +02:00

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.
This commit is contained in:
David Steele
2018-11-02 08:37:27 -04:00
parent 34c63276cd
commit 1a98bd41b4
3 changed files with 15 additions and 3 deletions
+8
View File
@@ -87,6 +87,14 @@
</release-item> </release-item>
</release-development-list> </release-development-list>
</release-core-list> </release-core-list>
<release-test-list>
<release-development-list>
<release-item>
<p>Mount <id>tmpfs</id> in <file>Vagrantfile</file> instead <file>test.pl</file>.</p>
</release-item>
</release-development-list>
</release-test-list>
</release> </release>
<release date="2018-10-15" version="2.06" title="Checksum Delta Backup and PostgreSQL 11 Support"> <release date="2018-10-15" version="2.06" title="Checksum Delta Backup and PostgreSQL 11 Support">
+7
View File
@@ -46,6 +46,13 @@ Vagrant.configure(2) do |config|
sudo /etc/init.d/virtualbox-guest-utils stop sudo /etc/init.d/virtualbox-guest-utils stop
sudo /usr/sbin/VBoxService --timesync-set-on-restore --timesync-interval 5000 --timesync-set-threshold 1 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 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 \ apt-get install -y libdbd-pg-perl libio-socket-ssl-perl libxml-libxml-perl libxml-checker-perl libperl-critic-perl \
-3
View File
@@ -576,10 +576,7 @@ eval
push(@{$oyProcess}, undef); push(@{$oyProcess}, undef);
} }
executeTest("sudo umount ${strTestPath}", {bSuppressError => true});
executeTest("sudo rm -rf ${strTestPath}/*"); 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}); $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. # Remove old coverage dirs -- do it this way so the dirs stay open in finder/explorer, etc.