tests: Support saving temporary directory

This commit is contained in:
Colin Walters 2011-10-14 21:08:09 -04:00
parent 42a3a68d17
commit 5e0d58dd72
1 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,11 @@ cd "$test_tmpdir"
touch "$test_tmpdir/.test$$" touch "$test_tmpdir/.test$$"
die () { die () {
test -f "$test_tmpdir/.test$$" && rm -rf "$test_tmpdir" if test -z "$HT_TESTS_SAVE_TEMPS"; then
test -f "$test_tmpdir/.test$$" && rm -rf "$test_tmpdir"
else
echo "Temporary files saved in $test_tmpdir"
fi
} }
trap 'die' EXIT trap 'die' EXIT