diff options
| author | ruki <[email protected]> | 2025-06-15 22:11:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-06-15 22:11:34 +0800 |
| commit | e24686e7c390d0c52af98a680e0c296e200bb611 (patch) | |
| tree | 1ef4b33b644b56aa11b7734bcd66a02f1e620159 /tests/runner.lua | |
| parent | 0e84aec194e0b2d804b7a9b707c05dbe48645989 (diff) | |
add tests progress
Diffstat (limited to 'tests/runner.lua')
| -rw-r--r-- | tests/runner.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/runner.lua b/tests/runner.lua index b3d578a6f..5b8b0f5f5 100644 --- a/tests/runner.lua +++ b/tests/runner.lua @@ -1,7 +1,8 @@ import("core.base.option") import("test_utils.context", { alias = "test_context" }) -function main(script) +function main(script, opt) + opt = opt or {} if os.isdir(script) then script = path.join(script, "test.lua") @@ -21,7 +22,7 @@ function main(script) local verbose = option.get("verbose") or option.get("diagnosis") -- trace - cprint(">> testing %s ...", path.relative(root)) + cprint(">> [%d/%d]: testing %s ...", opt.index, opt.total, path.relative(root)) -- get test functions local data = import("test", { rootdir = root, anonymous = true }) |
