From: Andreas Dilger Date: Fri, 22 Jun 2018 15:42:41 +0000 (-0400) Subject: tests: don't unlink test image if SKIP_UNLINK set X-Git-Tag: v1.44.3-rc1~40 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0647f84998bc7eebdde19ae38bb22156b2a0b34e;p=tools%2Fe2fsprogs.git tests: don't unlink test image if SKIP_UNLINK set Don't register a trap to unlink $TMPFILE at the test exit if SKIP_UNLINK is set. Otherwise, this makes it difficult to debug a failing test. Signed-off-by: Andreas Dilger Signed-off-by: Theodore Ts'o --- diff --git a/tests/test_one.in b/tests/test_one.in index c1f18dc..664cf86 100644 --- a/tests/test_one.in +++ b/tests/test_one.in @@ -61,7 +61,7 @@ rm -f $test_name.ok $test_name.failed #echo -e -n "$test_name: $test_description:\r" TMPFILE=$(mktemp ${TMPDIR:-/tmp}/e2fsprogs-tmp-$test_name.XXXXXX) -trap 'rm -f $TMPFILE ; exit' 1 2 15 +[ "$SKIP_UNLINK" != "true" ] && trap 'rm -f $TMPFILE ; exit' 1 2 15 start=$SECONDS if [ -f $test_dir/script ]; then