mv config/config.php config/config-autotest-backup.php
fi
+function restore_config {
+ # Restore existing config
+ if [ -f config/config-autotest-backup.php ]; then
+ mv config/config-autotest-backup.php config/config.php
+ fi
+}
+
+# restore config on exit, even when killed
+trap restore_config SIGINT SIGTERM
+
# use tmpfs for datadir - should speedup unit test execution
if [ -d /dev/shm ]; then
DATADIR=/dev/shm/data-autotest$EXECUTOR_NUMBER
cd $BASEDIR
-# Restore existing config
-if [ -f config/config-autotest-backup.php ]; then
- mv config/config-autotest-backup.php config/config.php
-fi
-
+restore_config
#
# NOTES on mysql:
# - CREATE DATABASE oc_autotest;