From d16f92335fb7550d67e95a64e3d836c1ddbf0b40 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 17 Jun 2019 22:25:48 -0400 Subject: 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. --- tests.sh | 7 +++---- 1 file 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" } -- cgit v1.2.3