master - tests: simplify teardown
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7a64a157e13154a9b6a37a12a8d50a8e63f51478 Commit: 7a64a157e13154a9b6a37a12a8d50a8e63f51478 Parent: 7f8d942268161abcb56700c027f82a87f20f0abf Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Apr 22 11:03:31 2015 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Apr 22 11:18:31 2015 +0200
tests: simplify teardown
If TESTNAME has not been created yet, avoid running complex teardown.
--- test/lib/aux.sh | 4 ++++ test/lib/utils.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-)
test/lib/aux.sh +4 -0
@@ -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
test/lib/utils.sh +1 -1
@@ -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