-- SPDX-FileCopyrightText: © 2022—2026 Vladimir Zorin -- SPDX-License-Identifier: LicenseRef-OWL-1.0-or-later -- Licensed under OWL v1.0+. See LICENSE. --[[ Test runner: run from the pack root as `lilush tests/run.lua`. Each spec runs in its own lilush process because testimony's conclude() exits the interpreter. Set LILGIT_E2E=1 to include the end-to-end smoke test. ]] local specs = { "repos_spec", "render_spec", "cache_spec", "auth_spec", "handle_spec", "e2e_spec" } -- os.execute returns a boolean with LUA52COMPAT, a number otherwise local failed = {} for _, spec in ipairs(specs) do print("--- tests/" .. spec .. ".lua") local r = os.execute("lilush tests/" .. spec .. ".lua") if not (r == true or r == 0) then failed[#failed + 1] = spec end end if #failed > 0 then print("\nFAILED: " .. table.concat(failed, ", ")) os.exit(1) end print("\nAll specs passed.")