Skip to content
Snippets Groups Projects
Commit 9da4a632 authored by Joas Schilling's avatar Joas Schilling
Browse files

Restore the development config after running the tests

parent a0fea16d
No related branches found
No related tags found
No related merge requests found
...@@ -67,11 +67,18 @@ echo ^)^; >> .\tests\autoconfig-mssql.php ...@@ -67,11 +67,18 @@ echo ^)^; >> .\tests\autoconfig-mssql.php
echo localhost:5432:*:oc_autotest:owncloud > %APPDATA%\postgresql\pgpass.conf echo localhost:5432:*:oc_autotest:owncloud > %APPDATA%\postgresql\pgpass.conf
@echo on
:: Back up existing (dev) config if one exists
if exist config\config.php (
copy /y config\config.php config\config-autotest-backup.php
)
:: ::
:: start test execution :: start test execution
:: ::
if [%1] == [] ( if [%1] == [] (
echo "Running on all database backends" @echo "Running on all database backends"
call:execute_tests "sqlite" "%2" call:execute_tests "sqlite" "%2"
call:execute_tests "mysql" "%2" call:execute_tests "mysql" "%2"
call:execute_tests "mssql" "%2" call:execute_tests "mssql" "%2"
...@@ -81,11 +88,18 @@ if [%1] == [] ( ...@@ -81,11 +88,18 @@ if [%1] == [] (
call:execute_tests "%1" "%2" call:execute_tests "%1" "%2"
) )
goto:restore_config
goto:eof goto:eof
:execute_tests :restore_config
@echo on :: Restore existing config
if exist config\config-autotest-backup.php (
copy /y config\config-autotest-backup.php config\config.php
)
goto:eof
:execute_tests
@echo "Setup environment for %~1 testing ..." @echo "Setup environment for %~1 testing ..."
:: back to root folder :: back to root folder
cd %BASEDIR% cd %BASEDIR%
......
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