]> Sergey Matveev's repositories - bfs.git/commitdiff
tests: Always create the scratch directory
authorTavian Barnes <tavianator@tavianator.com>
Fri, 13 Oct 2023 17:52:01 +0000 (13:52 -0400)
committerTavian Barnes <tavianator@tavianator.com>
Fri, 13 Oct 2023 18:17:53 +0000 (14:17 -0400)
Otherwise, some tests that try to check for flag support like

    invoke_bfs scratch -quit -xattr || skip

can be accidentally skipped if ./scratch doesn't exist yet:

    $ ./tests/tests.sh bsd/xattr
    tests skipped: 1

After this patch, we get the expected

    $ ./tests/tests.sh bsd/xattr
    tests passed: 1

tests/tests.sh

index f233f7437596ef1ebdeb45a278303e0b8c13fb2e..61e4aba46ad6e14f346b8a85f83d9f93d627ccd8 100755 (executable)
@@ -437,6 +437,8 @@ function make_rainbow() {
 }
 make_rainbow "$TMP/rainbow"
 
+mkdir "$TMP/scratch"
+
 # Close stdin so bfs doesn't think we're interactive
 exec </dev/null