(travis) Stop using the ramdisk for MySQL/Pg data
[dbsrgits/DBIx-Class.git] / maint / travis-ci_scripts / 10_before_install.bash
index 91c0cfb..55acf6e 100755 (executable)
@@ -2,11 +2,18 @@
 
 export SHORT_CIRCUIT_SMOKE
 
-# Stop pre-started RDBMS and sync for some settle time
+# Stop pre-started RDBMS, move their data back to disk (save RAM)
+# sync for some settle time
 run_or_err "Stopping MySQL"       "sudo /etc/init.d/mysql stop"
 run_or_err "Stopping PostgreSQL"  "sudo /etc/init.d/postgresql stop || /bin/true"
 /bin/sync
 
+for d in mysql postgresql ; do
+  sudo rm -rf /var/lib/$d
+  sudo mv /var/ramfs/$d /var/lib/
+  sudo ln -s /var/lib/$d /var/ramfs/$d
+done
+
 # Sanity check VM before continuing
 echo "
 =============================================================================
@@ -62,7 +69,7 @@ fi
 export CACHE_DIR="/tmp/poormanscache"
 
 # these will be installed no matter what, also some extras unless CLEANTEST
-common_packages="libapp-nopaste-perl tree"
+common_packages="libapp-nopaste-perl"
 
 if [[ "$CLEANTEST" = "true" ]]; then