From 4c428b0412c4c0334a2bae1a90e8f494c5d05ce6 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 08:32:12 -1000 Subject: Let a test run require the tools it must not skip Nothing could make a missing prerequisite fail. A host without pkg-config builds without Lua, and make test then passed with every Lua test skipped and the lua pass of t0201 never run. The whole-script skips become named prerequisites so the same list covers them, and the strace probe now traces the file class of calls the tests use, so an strace too old for it skips rather than fails. --- tests/setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/setup.sh') diff --git a/tests/setup.sh b/tests/setup.sh index 68b7a5b..c61fa85 100644 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -145,6 +145,13 @@ then fi unset cgit_version cgit_flags +# A run that has to cover everything names the prerequisites it cannot go +# without in CGIT_TEST_REQUIRE, and the library then stops a script that finds +# one missing rather than skip the tests that need it. Lua is asked about at +# once, as a few scripts leave whole tests out when cgit has none. +GIT_TEST_REQUIRE_PREREQ="$GIT_TEST_REQUIRE_PREREQ $CGIT_TEST_REQUIRE" +test_have_prereq CGIT_LUA || : + # Creates a repository holding the given number of one file commits. A third # argument asks for a variant, either testplus for a file and a branch whose # names have to be escaped in a URL, or commit-graph for a written commit graph. -- cgit 2.12.1