From 3b387d81e63893ed3fe3b45e3721fbcfb1c5dde0 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 19 Oct 2022 10:29:05 -0400 Subject: tests: Split test cases into separate files --- docs/BUILDING.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'docs/BUILDING.md') diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 932845b..5219160 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -107,27 +107,28 @@ Testing $ make check -Most of the testsuite is implemented in the file [`tests.sh`](/tests.sh). -This script contains hundreds of separate test cases. -Most of them are *snapshot tests* which compare `bfs`'s output to a known-good copy saved under [`tests`](/tests). +The test harness is implemented in the file [`tests/tests.sh`](/tests/tests.sh). +Individual test cases are found in `tests/*/*.sh`. +Most of them are *snapshot tests* which compare `bfs`'s output to a known-good copy saved under the matching `tests/*/*.out`. You can pass the name of a particular test case (or a few) to run just those tests. For example: - $ ./tests/tests.sh test_basic + $ ./tests/tests.sh posix/basic If you need to update the reference snapshot, pass `--update`. It can be handy to generate the snapshot with a different `find` implementation to ensure the output is correct, for example: - $ ./tests/tests.sh test_basic --bfs=find --update + $ ./tests/tests.sh posix/basic --bfs=find --update But keep in mind, other `find` implementations may not be correct. To my knowledge, no other implementation passes even the POSIX-compatible subset of the tests: $ ./tests/tests.sh --bfs=find --posix ... - tests passed: 89 - tests failed: 5 + tests passed: 90 + tests skipped: 3 + tests failed: 6 Run -- cgit v1.2.3