File tree Expand file tree Collapse file tree 6 files changed +19
-16
lines changed Expand file tree Collapse file tree 6 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -68,3 +68,7 @@ browserstack-tunnel/BrowserStackLocal -k ${BROWSER_STACK_ACCESS_KEY} ${ARGS} 2>&
68
68
69
69
# Wait for the tunnel to be ready and create the readyfile with the Browserstack PID
70
70
create_ready_file ${! } &
71
+
72
+ # Wait for all sub processes to finish. This ensures that no zombie
73
+ # processes are left over.
74
+ wait
Original file line number Diff line number Diff line change @@ -19,10 +19,5 @@ tunnelProcessId=$(cat ${tunnelReadyFile})
19
19
# we cannot use killall because CircleCI base container images don't have it installed.
20
20
kill ${tunnelProcessId}
21
21
22
- while (ps -p ${tunnelProcessId} & > /dev/null); do
23
- printf " ."
24
- sleep .5
25
- done
26
-
27
22
echo " "
28
- echo " Browserstack tunnel has been shut down "
23
+ echo " Browserstack tunnel interrupt signal has been sent. "
Original file line number Diff line number Diff line change 4
4
# proper exit code.
5
5
set -e
6
6
7
+ # Path to the project directory.
8
+ projectDir=" $( dirname ${0} ) /../.."
9
+
7
10
# Go to project directory.
8
- cd $( dirname ${0} ) /../..
11
+ cd ${projectDir}
9
12
10
13
# Decode access token and make it accessible for child processes.
11
14
export BROWSER_STACK_ACCESS_KEY=` echo ${BROWSER_STACK_ACCESS_KEY} | rev`
12
15
13
16
# Start tunnel and wait for it being ready.
14
- ./scripts/browserstack/start-tunnel.sh
17
+ ./scripts/browserstack/start-tunnel.sh &
15
18
./scripts/browserstack/wait-tunnel.sh
16
19
17
20
# Setup the test platform environment variable that will be read
@@ -24,3 +27,6 @@ yarn gulp ci:test
24
27
# Kill the Browserstack tunnel. This is necessary in order to avoid rate-limit
25
28
# errors that cause the unit tests to be flaky.
26
29
./scripts/browserstack/stop-tunnel.sh
30
+
31
+ # Wait for all sub processes to terminate properly.
32
+ wait
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ cd $(dirname ${0})/../..
11
11
export SAUCE_ACCESS_KEY=` echo ${SAUCE_ACCESS_KEY} | rev`
12
12
13
13
# Start tunnel and wait for it being ready.
14
- ./scripts/saucelabs/start-tunnel.sh
14
+ ./scripts/saucelabs/start-tunnel.sh &
15
15
./scripts/saucelabs/wait-tunnel.sh
16
16
17
17
# Setup the test platform environment variable that will be read
@@ -24,3 +24,6 @@ yarn gulp ci:test
24
24
# Kill the Saucelabs tunnel. This is necessary in order to avoid rate-limit
25
25
# errors that cause the unit tests to be flaky.
26
26
./scripts/saucelabs/stop-tunnel.sh
27
+
28
+ # Wait for all sub processes to terminate properly.
29
+ wait
Original file line number Diff line number Diff line change 35
35
36
36
echo " Starting Sauce Connect in the background. Passed arguments: ${sauceArgs} "
37
37
38
- sauce-connect/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs} &
38
+ sauce-connect/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs}
Original file line number Diff line number Diff line change @@ -19,10 +19,5 @@ tunnelProcessId=$(cat ${tunnelPidFile})
19
19
# we cannot use killall because CircleCI base container images don't have it installed.
20
20
kill ${tunnelProcessId}
21
21
22
- while (ps -p ${tunnelProcessId} & > /dev/null); do
23
- printf " ."
24
- sleep .5
25
- done
26
-
27
22
echo " "
28
- echo " Sauce Connect tunnel has been shut down "
23
+ echo " Sauce Connect tunnel interrupt signal has been sent. "
You can’t perform that action at this time.
0 commit comments