]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-prs: fix bug with timeout 774/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 4 Jul 2017 14:19:40 +0000 (16:19 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 4 Jul 2017 14:24:16 +0000 (16:24 +0200)
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 <gabrioux@redhat.com>
ceph-ansible-prs/build/build

index 8cd43fa2cb00d991ba8867c8322294a7d07e139f..285c0167b4fe8c3f67c8f961364c286a44316466 100644 (file)
@@ -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