diff options
author | William Desportes <williamdes@wdes.fr> | 2020-05-25 00:13:09 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2020-06-10 02:27:22 +0300 |
commit | 4de5bcb2a7d65ee9e12d14b50b4750dbec40634f (patch) | |
tree | a9854a73f215ad18ca6109b636464009eca9b8d8 /test/stop-local-server | |
parent | 28dc4088130cf10d021eefd163ad534ef756fe88 (diff) |
Support selenium-standalone mode and use docker
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test/stop-local-server')
-rwxr-xr-x | test/stop-local-server | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/stop-local-server b/test/stop-local-server new file mode 100755 index 0000000000..f187848f97 --- /dev/null +++ b/test/stop-local-server @@ -0,0 +1,26 @@ +#!/bin/sh + +# Do not run as CGI +if [ -n "$GATEWAY_INTERFACE" ] ; then + echo 'Can not invoke as CGI!' + exit 1 +fi + +set -e +set -x + +if [ "$CI_MODE" != "selenium" ] ; then + echo "Not in CI_MODE=selenium" + exit 0 +fi + +if [ ! -z "$TESTSUITE_BROWSERSTACK_KEY" ] ; then + # Stop BrowserStack Local forwarder + ~/browserstack/BrowserStackLocal --daemon stop +fi + +if [ -f ~/selenium-standalone.pid~ ] ; then + # Stop selenium-standalone server + kill $(cat ~/selenium-standalone.pid~) + rm ~/selenium-standalone.pid~ +fi |