X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fselenium%2Fselenium.sh;h=f6bb944e0b144d0b05a64ca378576436397efde1;hb=dfec83932fd38a9086eb5a2e212889ad00f35b0e;hp=4a5c254839f07c47f821b06f31982b7d72459525;hpb=b0494b29097eaff97073f01e3427f2629eedadc1;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/selenium/selenium.sh b/tests/selenium/selenium.sh index 4a5c254839..f6bb944e0b 100755 --- a/tests/selenium/selenium.sh +++ b/tests/selenium/selenium.sh @@ -3,10 +3,13 @@ set -euo pipefail # Check the command before running in background so # that it can actually fail and have a descriptive error hash chromedriver -chromedriver --url-base=/wd/hub --port=4444 & +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