diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-06-17 22:25:48 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-06-17 22:25:48 -0400 |
commit | d16f92335fb7550d67e95a64e3d836c1ddbf0b40 (patch) | |
tree | dff2ae862a08757984a402700eb64cf326f862a8 /tests.sh | |
parent | b3e536ec24dc091f2e20157d45c3bf7e0190424a (diff) | |
download | bfs-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-x | tests.sh | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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" } |