summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2018-03-18 11:31:07 -0400
committerTavian Barnes <tavianator@tavianator.com>2018-03-18 12:34:08 -0400
commit3edbc453a86f10ddcc9fc5d2535aff07b40d2f8e (patch)
tree203064921f65c693eb588a197edef39a2ff27851 /tests.sh
parentf1216d4f9448225e145438477b9b1c2556744d64 (diff)
downloadbfs-3edbc453a86f10ddcc9fc5d2535aff07b40d2f8e.tar.xz
tests: Work around broken rm in cleanup
BusyBox rm, for example, doesn't handle long paths properly, so give it some help. C.f. http://lists.busybox.net/pipermail/busybox/2018-March/086302.html
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 31135ab..16750b6 100755
--- a/tests.sh
+++ b/tests.sh
@@ -33,6 +33,13 @@ function cleanup() {
return
fi
+ # Don't force rm to deal with long paths
+ for dir in "$TMP"/deep/*/*; do
+ if [ -d "$dir" ]; then
+ (cd "$dir" && rm -rf *)
+ fi
+ done
+
rm -rf "$TMP"
}
trap cleanup EXIT