From 02d43f315754aa245b9020436a639a56fbe43fbc Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 4 Jul 2017 16:19:40 +0200 Subject: [PATCH] ceph-ansible-prs: fix bug with timeout it will always return 0 even if tox return an error. We must check wether the expression is not true instead. Signed-off-by: Guillaume Abrioux --- ceph-ansible-prs/build/build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ceph-ansible-prs/build/build b/ceph-ansible-prs/build/build index 8cd43fa2..285c0167 100644 --- a/ceph-ansible-prs/build/build +++ b/ceph-ansible-prs/build/build @@ -15,4 +15,7 @@ restart_libvirt_services # the $SCENARIO var is injected by the job template. It maps # to an actual, defined, tox environment -timeout 5h $VENV/tox -rv -e=$RELEASE-$SCENARIO --workdir=$WORKDIR -- --provider=libvirt || echo "ERROR: Job didn't complete before the timeout has been exceeded (5h)." +if ! timeout 5h $VENV/tox -rv -e=$RELEASE-$SCENARIO --workdir=$WORKDIR -- --provider=libvirt; then + echo "ERROR: Job didn't complete before the timeout exceeded (5h)." + exit 1 +fi -- 2.47.3