diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-10-20 13:21:41 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-10-20 13:21:41 -0400 |
commit | 55a1ad42bd172aa235015b88c092a225ec7f4862 (patch) | |
tree | ffe5cc53024ee1a8c9a7c7029671bae7852025c9 /tests/bfs | |
parent | 4ec966263444dfae8837cd73b980cfdb9aabd93f (diff) | |
download | bfs-55a1ad42bd172aa235015b88c092a225ec7f4862.tar.xz |
tests: Add a helper for cleaning scratch
And try to unmount things if the a test left them mounted.
Diffstat (limited to 'tests/bfs')
-rw-r--r-- | tests/bfs/L_capable.sh | 2 | ||||
-rw-r--r-- | tests/bfs/capable.sh | 2 | ||||
-rw-r--r-- | tests/bfs/color_ls.sh | 2 | ||||
-rw-r--r-- | tests/bfs/exec_flush_fprint.sh | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/bfs/L_capable.sh b/tests/bfs/L_capable.sh index e1806b7..f37e1f2 100644 --- a/tests/bfs/L_capable.sh +++ b/tests/bfs/L_capable.sh @@ -1,7 +1,7 @@ skip_unless test "$SUDO" skip_unless test "$UNAME" = "Linux" -rm -rf scratch/* +clean_scratch skip_unless invoke_bfs scratch -quit -capable diff --git a/tests/bfs/capable.sh b/tests/bfs/capable.sh index 964f37f..6dc9bf2 100644 --- a/tests/bfs/capable.sh +++ b/tests/bfs/capable.sh @@ -1,7 +1,7 @@ skip_unless test "$SUDO" skip_unless test "$UNAME" = "Linux" -rm -rf scratch/* +clean_scratch skip_unless invoke_bfs scratch -quit -capable diff --git a/tests/bfs/color_ls.sh b/tests/bfs/color_ls.sh index 79e1db2..33922a8 100644 --- a/tests/bfs/color_ls.sh +++ b/tests/bfs/color_ls.sh @@ -1,4 +1,4 @@ -rm -rf scratch/* +clean_scratch touchp scratch/foo/bar/baz ln -s foo/bar/baz scratch/link ln -s foo/bar/nowhere scratch/broken diff --git a/tests/bfs/exec_flush_fprint.sh b/tests/bfs/exec_flush_fprint.sh index 9756b6a..bf6b62f 100644 --- a/tests/bfs/exec_flush_fprint.sh +++ b/tests/bfs/exec_flush_fprint.sh @@ -1,3 +1,3 @@ # Even non-stdstreams should be flushed -rm -rf scratch/* +clean_scratch bfs_diff basic/a -fprint scratch/foo -exec cat scratch/foo \; |