summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-06-17 22:25:48 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-06-17 22:25:48 -0400
commitd16f92335fb7550d67e95a64e3d836c1ddbf0b40 (patch)
treedff2ae862a08757984a402700eb64cf326f862a8 /tests.sh
parentb3e536ec24dc091f2e20157d45c3bf7e0190424a (diff)
downloadbfs-d16f92335fb7550d67e95a64e3d836c1ddbf0b40.tar.xz
tests.sh: Try a bit harder to clean up scratch
This matters if some directories aren't readable/searchable and we get ^C'd, for example.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests.sh b/tests.sh
index fd8d4a1..65d22ee 100755
--- a/tests.sh
+++ b/tests.sh
@@ -683,10 +683,6 @@ chown "$(id -u):$(id -g)" "$TMP"
# Clean up temporary directories on exit
function cleanup() {
- if [ ! "$CLEAN" ]; then
- return
- fi
-
# Don't force rm to deal with long paths
for dir in "$TMP"/deep/*/*; do
if [ -d "$dir" ]; then
@@ -694,6 +690,9 @@ function cleanup() {
fi
done
+ # In case a test left anything weird in scratch/
+ chmod -R +rX scratch
+
rm -rf "$TMP"
}