Skip to content

Commit 70ee402

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
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.
1 parent c094ad8 commit 70ee402

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tools/test/travis-ci/functions.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ _fetch_deps()
9393
{
9494
local pkg="${1}"
9595
local dep_list="${2}"
96+
local pid_list=""
97+
98+
local PID;
9699

97100
info "Fetching '${pkg}' archives"
98101

@@ -103,9 +106,17 @@ _fetch_deps()
103106
|| die "Download failed ('${dep}')" \
104107
&& info "Fetched ${deps_url}/${dep}.deb" &
105108

109+
PID=$!
110+
pid_list="${pid_list} ${PID}"
111+
106112
done <<< "${dep_list}"
107113

108-
wait
114+
# Ignoring shellcheck warning, since we need to allow parameter expansion to
115+
# turn the list string into parametesr.
116+
# shellcheck disable=SC2086
117+
wait ${pid_list}
118+
119+
info "Fetch completed."
109120
}
110121

111122

0 commit comments

Comments
 (0)