diff options
| author | ruki <[email protected]> | 2021-09-18 14:41:17 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-18 14:41:17 +0800 |
| commit | 4767603ee406aa26567edb082745aa3581bd9803 (patch) | |
| tree | b23f36cb8411733361e049e52b3423f038e7c353 /tests/run.lua | |
| parent | dc0319e63ea90ed6028ca8f9455350bf6ca85b66 (diff) | |
fix tests/run
Diffstat (limited to 'tests/run.lua')
| -rw-r--r-- | tests/run.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/run.lua b/tests/run.lua index 572e31e9f..00c18ff07 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -10,9 +10,7 @@ if option.get("verbose") then table.insert(params, "-v") end if option.get("diagnosis") then table.insert(params, "-D") end function _run_test(script) - assert(script:endswith("test.lua")) - os.execv("xmake", table.join("lua", params, path.join(os.scriptdir(), "runner.lua"), script)) end @@ -23,10 +21,14 @@ function _run_test_filter(name) local root = path.absolute(os.scriptdir()) -- find the test script for _, script in ipairs(os.files(path.join(root, "**", name, "**", "test.lua"))) do - table.insert(tests, path.absolute(script)) + if not script:find(".xmake", 1, true) then + table.insert(tests, path.absolute(script)) + end end for _, script in ipairs(os.files(path.join(root, name, "**", "test.lua"))) do - table.insert(tests, path.absolute(script)) + if not script:find(".xmake", 1, true) then + table.insert(tests, path.absolute(script)) + end end for _, script in ipairs(os.files(path.join(root, "**", name, "test.lua"))) do table.insert(tests, path.absolute(script)) |
