diff options
author | William Desportes <williamdes@wdes.fr> | 2021-02-09 00:45:08 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2021-02-09 04:01:23 +0300 |
commit | fda5195be7dc84ad5c2a76d0899e11efed06766f (patch) | |
tree | 0aa64719b9943d3cac0a384759dd04df8e0537fe /test/stop-local-server | |
parent | f4684ee691e55d2310398c4d92d4e9a473cf105d (diff) |
Fix logs system and temp dir for tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test/stop-local-server')
-rwxr-xr-x | test/stop-local-server | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/stop-local-server b/test/stop-local-server index f187848f97..d7fb884e06 100755 --- a/test/stop-local-server +++ b/test/stop-local-server @@ -14,6 +14,8 @@ if [ "$CI_MODE" != "selenium" ] ; then exit 0 fi +SELENIUM_TEMPDIR="$(cat /tmp/last_temp_dir_phpMyAdminTests)" + if [ ! -z "$TESTSUITE_BROWSERSTACK_KEY" ] ; then # Stop BrowserStack Local forwarder ~/browserstack/BrowserStackLocal --daemon stop @@ -24,3 +26,19 @@ if [ -f ~/selenium-standalone.pid~ ] ; then kill $(cat ~/selenium-standalone.pid~) rm ~/selenium-standalone.pid~ fi + +if [ ! -z "${SELENIUM_TEMPDIR}" ] && [ -f "${SELENIUM_TEMPDIR}/nginx.pid" ]; then + # Stop nginx server + kill $(cat "${SELENIUM_TEMPDIR}/nginx.pid") +fi + +if [ ! -z "${SELENIUM_TEMPDIR}" ] && [ -f "${SELENIUM_TEMPDIR}/php-fpm.pid" ]; then + # Stop php-fpm server + kill $(cat "${SELENIUM_TEMPDIR}/php-fpm.pid") +fi + +if [ ! -z "${SELENIUM_TEMPDIR}" ] && [ -d "${SELENIUM_TEMPDIR}" ]; then + # Delete the temporary folder + rm -rf "${SELENIUM_TEMPDIR}" + echo "Deleted temporary dir: ${SELENIUM_TEMPDIR}" +fi |