Skip to content

Commit

Permalink
Terminate background smoke tests on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
kim committed Aug 8, 2023
1 parent ceb1f43 commit 8505299
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/run-smoke-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ TESTS_NAME=()
TESTS_PROJECT_PATH=()
TESTS_CONFIG_FILE=()

if [ "$RUN_PARALLEL" == "true" ] ; then
# Make sure background tests are torn down even if we don't get to `wait`
# for them (e.g. on ^C).
trap 'x="$(jobs -pr)"; [ -n "$x"] && kill "$x"' SIGINT SIGTERM EXIT
fi

for smoke_test in "${TESTS[@]}" ; do
if [ ${#EXCLUDE_TESTS[@]} -ne 0 ] && list_contains "$smoke_test" "${EXCLUDE_TESTS[@]}"; then
echo "Skipping test $smoke_test"
Expand Down

0 comments on commit 8505299

Please sign in to comment.