]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Trap termination so we can capture logs on teuthology timeout
authorDavid Zafman <dzafman@redhat.com>
Mon, 27 Aug 2018 15:56:56 +0000 (08:56 -0700)
committerDavid Zafman <dzafman@redhat.com>
Mon, 10 Sep 2018 19:23:07 +0000 (12:23 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
qa/standalone/ceph-helpers.sh

index e68425cba19528660730d0259e32d0689ddb535c..66fa7582bb71c99426d6be6d1009d3db4ed2aac6 100755 (executable)
@@ -131,6 +131,9 @@ function setup() {
     if [ $(ulimit -n) -le 1024 ]; then
         ulimit -n 4096 || return 1
     fi
+    if [ -z "$LOCALRUN" ]; then
+        trap "teardown $dir 1" TERM HUP INT
+    fi
 }
 
 function test_setup() {