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/t0401-serve.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/t0401-serve.sh') diff --git a/tests/t0401-serve.sh b/tests/t0401-serve.sh index 341bbb6..4a2d08b 100755 --- a/tests/t0401-serve.sh +++ b/tests/t0401-serve.sh @@ -9,8 +9,13 @@ test_description='Check the preview server splits CGI output correctly' CGIT_TEST_NO_CREATE_REPOS=YesPlease . ./setup.sh -command -v python3 >/dev/null 2>&1 || { - skip_all='Skipping preview server tests: python3 not found' +# serve.py uses syntax that came with Python 3.8. +test_lazy_prereq PYTHON ' + python3 -c "import sys; sys.exit(sys.version_info < (3, 8))" +' + +test_have_prereq PYTHON || { + skip_all='Skipping preview server tests: no python3 3.8 or later' test_done } -- cgit 2.12.1