mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Add timeout support to ansible-test. (#53302)
* Add timeout support to ansible-test. * Fix ansible-test tar filename filter bug. * Update timeouts used on Shippable. * Kill subprocesses when parent process terminates. * Require explicit use of env --show option.
This commit is contained in:
@@ -116,6 +116,12 @@ function cleanup
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
ansible-test env --dump --show --color -v
|
||||
if [[ "${COVERAGE:-}" ]]; then
|
||||
timeout=60
|
||||
else
|
||||
timeout=45
|
||||
fi
|
||||
|
||||
ansible-test env --dump --show --timeout "${timeout}" --color -v
|
||||
|
||||
"test/utils/shippable/${script}.sh" "${test}"
|
||||
|
||||
@@ -7,5 +7,13 @@ IFS='/:' read -ra args <<< "$1"
|
||||
|
||||
version="${args[1]}"
|
||||
|
||||
if [[ "${COVERAGE:-}" ]]; then
|
||||
timeout=90
|
||||
else
|
||||
timeout=10
|
||||
fi
|
||||
|
||||
ansible-test env --timeout "${timeout}" --color -v
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
ansible-test units --color -v --docker default --python "${version}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
|
||||
|
||||
Reference in New Issue
Block a user