Skip to content

Commit 1f7a0b2

Browse files
committed
build(travis): gracefully shut down the sauce connect tunnel after the tests are done running
This is to prevent sauce connect tunnel leaks. Closes angular#12921
1 parent a665550 commit 1f7a0b2

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ script:
6161
- ./scripts/travis/build.sh
6262

6363
after_script:
64+
- ./scripts/travis/tear_down_browser_provider.sh
6465
- ./scripts/travis/print_logs.sh
6566

6667
notifications:

lib/browserstack/teardown_tunnel.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -e -o pipefail
4+
5+
6+
echo "Shutting down Browserstack tunnel"
7+
echo "TODO: implement me"
8+
exit 1

lib/saucelabs/teardown_tunnel.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -e -o pipefail
4+
5+
6+
echo "Shutting down Sauce Connect tunnel"
7+
8+
killall sc
9+
10+
while [[ -n `ps -ef | grep "bin/sc" | grep -v "grep"` ]]; do
11+
printf "."
12+
sleep .5
13+
done
14+
15+
echo ""
16+
echo "Sauce Connect tunnel has bee shut down"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
# Has to be run from project root directory.
3+
4+
./lib/${BROWSER_PROVIDER}/teardown_tunnel.sh

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy