From 70ee402340ebb842ce99dfba474a9f2bc7151a04 Mon Sep 17 00:00:00 2001 From: Cruz Monrreal II Date: Fri, 11 Oct 2019 16:06:01 -0500 Subject: [PATCH] Fixed Travis CI issue where jobs were/are getting stalled while fetching packages. Something on Travis CI's side has changed such that invoking the 'wait' command within a script attempts to wait on some other jobs in addition to those spawned within the CI job. Workaround is to explicitly collect the PIDs for processes spawned within the script and only wait on those. --- tools/test/travis-ci/functions.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/test/travis-ci/functions.sh b/tools/test/travis-ci/functions.sh index c3b3ff053a..7da9d76dac 100644 --- a/tools/test/travis-ci/functions.sh +++ b/tools/test/travis-ci/functions.sh @@ -93,6 +93,9 @@ _fetch_deps() { local pkg="${1}" local dep_list="${2}" + local pid_list="" + + local PID; info "Fetching '${pkg}' archives" @@ -103,9 +106,17 @@ _fetch_deps() || die "Download failed ('${dep}')" \ && info "Fetched ${deps_url}/${dep}.deb" & + PID=$! + pid_list="${pid_list} ${PID}" + done <<< "${dep_list}" - wait + # Ignoring shellcheck warning, since we need to allow parameter expansion to + # turn the list string into parametesr. + # shellcheck disable=SC2086 + wait ${pid_list} + + info "Fetch completed." }