]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: functional tests teardown must be run on error
authorLoic Dachary <loic@dachary.org>
Mon, 17 Mar 2014 15:44:14 +0000 (16:44 +0100)
committerLoic Dachary <loic@dachary.org>
Mon, 17 Mar 2014 15:48:53 +0000 (16:48 +0100)
otherwise daemons will keep running and interfere with tests happening
afterwards.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/test/mon/mon-test-helpers.sh

index 3ed178438bd0274faa3194424bb01c89cb248e7f..d228569edd4d1f14ab82aa1bc9b56b6857b28a01 100644 (file)
@@ -102,6 +102,12 @@ function main() {
 
     set -x
     setup $dir || return 1
-    run $dir || return 1
+    local code
+    if run $dir ; then
+        code=0
+    else
+        code=1
+    fi
     teardown $dir || return 1
+    return $code
 }