summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-10-07 13:44:56 +0800
committerruki <[email protected]>2023-10-07 13:44:56 +0800
commitcfa128fdc1f18909396f9ae9845e0d9f71377b32 (patch)
tree9484d03554e491b3ad9931c593c5648d137882c0
parentf37804a3a471f560c88e8f9311325037aa4f7083 (diff)
fix extra info
-rw-r--r--tests/actions/test/xmake.lua2
-rw-r--r--xmake/actions/test/main.lua6
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/actions/test/xmake.lua b/tests/actions/test/xmake.lua
index a60d964a2..8f4467293 100644
--- a/tests/actions/test/xmake.lua
+++ b/tests/actions/test/xmake.lua
@@ -9,6 +9,6 @@ for _, file in ipairs(os.files("src/test_*.cpp")) do
add_tests("default")
add_tests("args", {runargs = {"foo", "bar"}})
add_tests("pass_output", {runargs = "foo", pass_outputs = "hello foo"})
- add_tests("fail_output", {fail_outputs = {"hello .*", "hello xmake"}})
+ add_tests("fail_output", {fail_outputs = {"hello2 .*", "hello xmake"}})
end
diff --git a/xmake/actions/test/main.lua b/xmake/actions/test/main.lua
index 8e25bc12e..5fb967b5b 100644
--- a/xmake/actions/test/main.lua
+++ b/xmake/actions/test/main.lua
@@ -290,9 +290,9 @@ function main()
for _, target in ipairs(project.ordertargets()) do
if target:is_binary() or target:script("run") then
for _, name in ipairs(target:get("tests")) do
- name = target:name() .. "/" .. name
- local testinfo = {name = name, target = target}
local extra = target:extraconf("tests", name)
+ local testname = target:name() .. "/" .. name
+ local testinfo = {name = testname, target = target}
if extra then
table.join2(testinfo, extra)
end
@@ -302,7 +302,7 @@ function main()
local group = testinfo.group
if (not group_pattern) or option.get("all") or (group_pattern and group and group:match(group_pattern)) then
- tests[name] = testinfo
+ tests[testname] = testinfo
end
end
end