From c2960006ae1820e94f5d5a7b58252cbdd35bc278 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 30 Oct 2026 19:59:25 -0700 Subject: Set the Lua prerequisite once for every test setup.sh already asks the binary, so the seven scripts that each turned the answer into a prerequisite now share one. test-lib names the missing prerequisite beside every test it skips, so the notes that cgit lacks Lua go, while the ones announcing a fallback stay. Every script that listed the standalone interpreters asked for the same ceiling, so lib.sh now builds that list for all of them. --- tests/t0505-auth.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'tests/t0505-auth.sh') diff --git a/tests/t0505-auth.sh b/tests/t0505-auth.sh index be0f0ce..177a5a6 100755 --- a/tests/t0505-auth.sh +++ b/tests/t0505-auth.sh @@ -13,10 +13,6 @@ CGIT_TEST_NO_CREATE_REPOS=YesPlease . ./setup.sh . "$TEST_OUTPUT_DIRECTORY/extensions/lib.sh" -interpreters=$(ext_lua_interpreters 5) -test -z "$interpreters" && - say 'no standalone lua on the path, unit checks skipped' - for lua in $interpreters do for variant in inline file @@ -37,18 +33,14 @@ test_expect_success 'create a repository with one commit' ' ) ' -if test "$CGIT_HAS_LUA" -eq 1 && - cgit_lua_probe "$PWD/repos/authy/.git" openssl.rand openssl.hmac posix.sys.stat posix.unistd +if cgit_lua_probe "$PWD/repos/authy/.git" openssl.rand openssl.hmac posix.sys.stat posix.unistd then test_set_prereq CGIT_LUA_AUTH elif test "$CGIT_HAS_LUA" -eq 1 then test_set_prereq CGIT_LUA_NOAUTH say 'cgit lua lacks luaossl or luaposix, expecting protected pages refused' -else - say 'cgit built without lua, checks through cgit skipped' fi -test "$CGIT_HAS_LUA" -eq 1 && test_set_prereq CGIT_LUA test_expect_success CGIT_LUA 'point cgit at the unedited auth filter' ' cat >cgitrc <<-EOF -- cgit 2.12.1