If build-time tests fail, try 4 more times
To get an idea of whether the failure is reproducible.
This commit is contained in:
parent
3691da8fbf
commit
4b9792d860
|
|
@ -6,6 +6,8 @@ ostree (2016.5-4) UNRELEASED; urgency=medium
|
|||
* Build-depend on procps, used to check for leaked processes
|
||||
* debian/test.sh: factor out our dh_auto_test wrapper, and clean
|
||||
up any stray processes even if the test fails
|
||||
* If build-time tests fail, try 4 more times to get an idea of
|
||||
whether the failure is reproducible
|
||||
|
||||
-- Simon McVittie <smcv@debian.org> Sat, 11 Jun 2016 19:52:40 +0100
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,19 @@ set -e
|
|||
|
||||
export VERBOSE=1
|
||||
|
||||
exit_status=0
|
||||
dh_auto_test || exit_status=1
|
||||
try_tests=5
|
||||
|
||||
failed=0
|
||||
make check || failed=1
|
||||
|
||||
if [ "$failed" -gt 0 ]; then
|
||||
echo "Test failed! Checking how reproducible it is..."
|
||||
for i in $(seq 1 "$(( $try_tests - 1 ))"); do
|
||||
if ! make check; then
|
||||
failed=$(( $failed + 1 ))
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
pkill --full "gpg-agent --homedir /var/tmp/tap-test\\.[^/]+/.*" || :
|
||||
|
||||
|
|
@ -15,6 +26,11 @@ if pgrep lt-ostree || pgrep --full "gpg-agent --homedir /var/tmp/tap-test."; the
|
|||
pgrep lt-ostree | xargs --no-run-if-empty ps ww
|
||||
fi
|
||||
|
||||
exit $exit_status
|
||||
if [ "$failed" -gt 0 ]; then
|
||||
echo "Failed $failed out of $try_tests test runs"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
# vim:set et sw=4 sts=4:
|
||||
|
|
|
|||
Loading…
Reference in New Issue