chore(browserstack): properly teardown tunnel (#1745)

This commit is contained in:
Paul Gschwendtner
2016-11-08 21:27:40 +01:00
committed by Jeremy Elbourn
parent 9bb4809f89
commit 9a7d381a28
3 changed files with 16 additions and 4 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ tunnel.start(function(error) {
});
if (READY_FILE) {
fs.writeFile(READY_FILE, '');
fs.writeFile(READY_FILE, process.pid);
}
}
});
+14 -2
View File
@@ -4,5 +4,17 @@ set -e -o pipefail
echo "Shutting down Browserstack tunnel"
echo "TODO: implement me"
exit 1
PID=$(cat $BROWSER_PROVIDER_READY_FILE);
# Resolving the PID from the readyfile.
kill $PID
while [[ -n `ps -ef | grep $PID | grep -v "grep"` ]]; do
printf "."
sleep .5
done
echo ""
echo "Browserstack tunnel has been shut down"
+1 -1
View File
@@ -34,7 +34,7 @@ teardown_tunnel() {
./scripts/sauce/sauce_connect_teardown.sh
;;
browserstack*)
# ./scripts/browserstack/teardown_tunnel.sh
./scripts/browserstack/teardown_tunnel.sh
;;
*)
;;