From: addshore Date: Thu, 7 Jun 2018 16:20:59 +0000 (+0100) Subject: Don't use killall in selenium.sh X-Git-Tag: 1.34.0-rc.0~5095 X-Git-Url: https://git.cyclocoop.org/%27%20.%20%24this-%3EgetSkin%28%29-%3EescapeSearchLink%28%29%20.%20%27?a=commitdiff_plain;h=ae5f5b84c2ebdea86e64d00ee42e1410c3f835df;p=lhc%2Fweb%2Fwiklou.git Don't use killall in selenium.sh git bash for windows apparently doesn't have killall by default, so instead get the PID of the chrome driver we start and kill that specifically. Change-Id: I8a9a773a7d3dc23807dc3ec12f5b3ef03661c9e3 --- diff --git a/tests/selenium/selenium.sh b/tests/selenium/selenium.sh index 4a5c254839..93f03b4926 100755 --- a/tests/selenium/selenium.sh +++ b/tests/selenium/selenium.sh @@ -4,9 +4,12 @@ set -euo pipefail # that it can actually fail and have a descriptive error hash chromedriver chromedriver --url-base=/wd/hub --port=4444 & +CHROME_DRIVER_PID=$! +echo chromedriver running with PID $CHROME_DRIVER_PID # Make sure it is killed to prevent file descriptors leak function kill_chromedriver() { - killall chromedriver > /dev/null + # Use kill instead of killall to increase chances of this working on Windows + kill $CHROME_DRIVER_PID > /dev/null } trap kill_chromedriver EXIT npm run selenium-test