Commit 3044ae7f authored by Bruno Haible's avatar Bruno Haible

init.sh: Add possibility to not delete temporary files.

* tests/init.sh (remove_tmp_): If the environment variable KEEP is set
to yes, don't erase the temporary directory.
parent ea7015f6
2016-12-15 Bruno Haible <bruno@clisp.org>
init.sh: Add possibility to not delete temporary files.
* tests/init.sh (remove_tmp_): If the environment variable KEEP is set
to yes, don't erase the temporary directory.
2016-12-16 Paul Eggert <eggert@cs.ucla.edu>
regex: fix integer-overflow bug in never-used code
......@@ -45,6 +45,9 @@
# Running a single test, with verbose output:
# $ make check TESTS=test-foo.sh VERBOSE=yes
#
# Running a single test, keeping the temporary directory:
# $ make check TESTS=test-foo.sh KEEP=yes
#
# Running a single test, with single-stepping:
# 1. Go into a sub-shell:
# $ bash
......@@ -349,11 +352,15 @@ remove_tmp_ ()
{
__st=$?
cleanup_
# cd out of the directory we're about to remove
cd "$initial_cwd_" || cd / || cd /tmp
chmod -R u+rwx "$test_dir_"
# If removal fails and exit status was to be 0, then change it to 1.
rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
if test "$KEEP" = yes; then
echo "Not removing temporary directory $test_dir_"
else
# cd out of the directory we're about to remove
cd "$initial_cwd_" || cd / || cd /tmp
chmod -R u+rwx "$test_dir_"
# If removal fails and exit status was to be 0, then change it to 1.
rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
fi
exit $__st
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment