Merge pull request #5100 from owncloud/autotest-backupconfig

Added backup for config.php in autotest.sh script
remotes/origin/stable6
Morris Jobke 2013-10-03 23:47:27 +07:00
commit 889a09c8fe
1 changed files with 17 additions and 0 deletions

@ -12,6 +12,16 @@ DATABASEUSER=oc_autotest$EXECUTOR_NUMBER
ADMINLOGIN=admin$EXECUTOR_NUMBER
BASEDIR=$PWD
if ! [ -w config -a -w config/config.php ]; then
echo "Please enable write permissions on config and config/config.php" >&2
exit 1
fi
# Back up existing (dev) config if one exists
if [ -f config/config.php ]; then
mv config/config.php config/config-autotest-backup.php
fi
# use tmpfs for datadir - should speedup unit test execution
if [ -d /dev/shm ]; then
DATADIR=/dev/shm/data-autotest$EXECUTOR_NUMBER
@ -158,6 +168,13 @@ else
execute_tests $1 $2 $3
fi
cd $BASEDIR
# Restore existing config
if [ -f config/config-autotest-backup.php ]; then
mv config/config-autotest-backup.php config/config.php
fi
#
# NOTES on mysql:
# - CREATE DATABASE oc_autotest;