Skip to content
Snippets Groups Projects
Commit e3c0db10 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #10534 from owncloud/autotest-cleanuponinterrupt

Restore autotest config on SIGINT or SIGTERM
parents ea8c0bce 6ed174d0
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,16 @@ if [ -f config/config.php ]; then
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
......@@ -220,11 +230,7 @@ fi
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment