]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: ceph-disk: workunit must fail when test fail 5999/head
authorLoic Dachary <ldachary@redhat.com>
Sun, 20 Sep 2015 22:23:26 +0000 (00:23 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 22 Sep 2015 06:46:57 +0000 (08:46 +0200)
Signed-off-by: Joe Julian <me@joejulian.name>
qa/workunits/ceph-disk/ceph-disk.sh

index d364efd4f9567947e02582ed6a0433ddab3c54dd..69bf525baa6dee787e048cfe7034e9a88e4ba303 100755 (executable)
@@ -1,10 +1,26 @@
-source $(dirname $0)/../ceph-helpers-root.sh true
+#!/bin/bash
+if [ -f $(dirname $0)/../ceph-helpers-root.sh ]; then
+    source $(dirname $0)/../ceph-helpers-root.sh
+else
+    echo "$(dirname $0)/../ceph-helpers-root.sh does not exist."
+    exit 1
+fi
+
+install python-pytest || true
+install pytest || true
+
+PATH=$(dirname $0)/..:$PATH
+
+if ! which py.test > /dev/null; then
+    echo "py.test not installed"
+    exit 1
+fi
 
-install python-pytest
-install pytest
 sudo env PATH=$(dirname $0)/..:$PATH py.test -v $(dirname $0)/ceph-disk-test.py
+result=$?
+
 # own whatever was created as a side effect of the py.test run
 # so that it can successfully be removed later on by a non privileged 
 # process
 sudo chown -R $(id -u) $(dirname $0)
-
+exit $result