tests: Support saving temporary directory

This commit is contained in:
Colin Walters 2011-10-14 21:08:09 -04:00
parent 42a3a68d17
commit 5e0d58dd72

View File

@ -25,7 +25,11 @@ cd "$test_tmpdir"
touch "$test_tmpdir/.test$$"
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