Files
gen1recomp/tests/run_modkit.lua
T
johnjohto 08e8dfc416 Make ROM-free test tiers actually run on Windows (#267)
Suite discovery, the extension-point catalog scan, mod test-dir pickup,
and the meta-coverage corpus all shelled out to ls/find/test -d, which do
not exist in cmd.exe. Every listing came back empty on Windows, so tiers
ran 0 suites and still reported ALL TESTS PASSED.

Add portable probes to tests/fs_io.lua (same Unix commands on
Linux/macOS; dir /b and a shell-free rename-self existence check on
Windows) and rewire the four call sites to them. 15/15 engine suites and
2/2 modkit suites now genuinely run and pass on Windows.

Fixes #266

Co-authored-by: johnjohto <johnjohto@users.noreply.github.com>
2026-07-27 07:06:53 -04:00

23 lines
751 B
Lua

-- T4 mod-SDK tier: the public mod API exercised headlessly against the
-- fixture dataset, plus any tests a shipped mod carries in its own
-- tests/ directory. No ROM, no display.
-- luajit tests/run_modkit.lua
package.path = "./?.lua;./?/init.lua;" .. package.path
local Runner = require("tests.tier_runner")
local dirs = { "tests/modkit/cases" }
-- mods ship their own tests (21-testing-and-ci "how mods ship their own
-- tests"); pick up every mods/<id>/tests directory that exists
local FsIo = require("tests.fs_io")
for _, name in ipairs(FsIo.listDir("mods")) do
if not name:find(".", 1, true) then
local dir = "mods/" .. name .. "/tests"
if FsIo.isDir(dir) then dirs[#dirs + 1] = dir end
end
end
Runner.main(dirs, "modkit")