diff options
| author | ruki <[email protected]> | 2023-10-07 00:45:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-10-07 00:45:08 +0800 |
| commit | e6373510a1fc487dd6652a5bc1cd74a966a8749c (patch) | |
| tree | dcbd83f3cc32da90c39b1836a07548897c0da85e /xmake/actions/test/main.lua | |
| parent | 621d6df885bc9ee832221f968ffcb07399d791fa (diff) | |
get tests
Diffstat (limited to 'xmake/actions/test/main.lua')
| -rw-r--r-- | xmake/actions/test/main.lua | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/xmake/actions/test/main.lua b/xmake/actions/test/main.lua index 22748b388..667ae2a0e 100644 --- a/xmake/actions/test/main.lua +++ b/xmake/actions/test/main.lua @@ -211,6 +211,25 @@ function main() -- load targets project.load_targets() + -- get tests + local tests = {} + for _, target in ipairs(project.ordertargets()) do + if target:is_binary() or target:script("run") then + for name, argv in pairs(target:get("tests")) do + local extra = target:extraconf("tests", name) + print(name, extra) + tests[name] = table.join({argv = table.wrap(argv)}, extra) + end + --[[ + local group = target:get("group") + if (target:is_default() and not group_pattern) or option.get("all") or (group_pattern and group and group:match(group_pattern)) then + table.insert(targets, target) + end]] + end + end +-- print(tests) + + --[[ -- check targets first local targetname local group_pattern = option.get("group") @@ -249,6 +268,6 @@ function main() end -- leave project directory - os.cd(oldir) + os.cd(oldir)]] end |
