summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-23 13:06:44 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-23 13:06:44 -0400
commitd2d5e5ad2e4b61493d27bfe8c9341fd81f703ae9 (patch)
treed2f69694f7a3bb7f3383b700ffe4f06188b493b6
parent62415c0d1530f271ce9d417fa075ac00b9473f1e (diff)
downloadbfs-d2d5e5ad2e4b61493d27bfe8c9341fd81f703ae9.tar.xz
tests/bfs/printf_color: Fix race condition
Invoking bfs in the top directory can lead it to explore other tests' scratch directories, so explicitly exclude them.
-rw-r--r--tests/bfs/printf_color.out1
-rw-r--r--tests/bfs/printf_color.sh2
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/bfs/printf_color.out b/tests/bfs/printf_color.out
index 6641e9a..77d21c3 100644
--- a/tests/bfs/printf_color.out
+++ b/tests/bfs/printf_color.out
@@ -1,4 +1,5 @@
. $'./rainbow/\e[1m' $'\e[0m' $'./rainbow/\e[1m/'$'\e[0m' $'rainbow/\e[1m/'$'\e[0m'
+. . . .
. . rainbow ./rainbow rainbow
. ./rainbow exec.sh ./rainbow/exec.sh rainbow/exec.sh
. ./rainbow $'\e[1m' $'./rainbow/\e[1m' $'rainbow/\e[1m'
diff --git a/tests/bfs/printf_color.sh b/tests/bfs/printf_color.sh
index 7bb38c2..3641ddb 100644
--- a/tests/bfs/printf_color.sh
+++ b/tests/bfs/printf_color.sh
@@ -1 +1 @@
-bfs_diff -color -path './rainbow*' -printf '%H %h %f %p %P %l\n'
+bfs_diff -color -exclude \( -depth 1 -not -name rainbow \) -printf '%H %h %f %p %P %l\n'