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:
Matt Clay
2019-03-05 11:58:13 -08:00
committed by GitHub
parent 44b347aef5
commit a8d829d9c3
9 changed files with 218 additions and 20 deletions

View File

@@ -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}"

View File

@@ -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"} \