]> sourceware.org Git - lvm2.git/commitdiff
tests: simplify teardown
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 22 Apr 2015 09:03:31 +0000 (11:03 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 22 Apr 2015 09:18:31 +0000 (11:18 +0200)
If TESTNAME has not been created yet, avoid running complex teardown.

test/lib/aux.sh
test/lib/utils.sh

index 737050d51008940f549e9382644ae4cb64f14776..15a689ad530eb3b58a91c9bb4d43d46a6c4ae4c8 100644 (file)
@@ -254,6 +254,8 @@ kill_listed_processes() {
 teardown() {
        echo -n "## teardown..."
 
+       if test -f TESTNAME ; then
+
        kill_listed_processes
 
        kill_sleep_kill_ LOCAL_LVMETAD ${LVM_VALGRIND_LVMETAD:-0}
@@ -277,6 +279,8 @@ teardown() {
 
        echo -n .
 
+       fi
+
        test -n "$TESTDIR" && {
                cd "$TESTOLDPWD"
                rm -rf "$TESTDIR" || echo BLA
index 87152a43491bffbdb8d402cfd21adabd81cbf04d..a6106323f4b2007eb4701e673a534d25371a8d33 100644 (file)
@@ -134,7 +134,7 @@ STACKTRACE() {
 
        test -f SKIP_THIS_TEST && exit 200
 
-       test -z "$LVM_TEST_NODEBUG" && {
+       test -z "$LVM_TEST_NODEBUG" -a -f TESTNAME && {
                local name
                local idx
                for i in debug.log* ; do
This page took 0.037248 seconds and 5 git commands to generate.