-
-
Notifications
You must be signed in to change notification settings - Fork 917
Description
Xmake 版本
2.9.9
操作系统版本和架构
Windows 11 Version 23H2
描述问题
当对嵌套在 namespace 中的 target 调用 add_tests 添加测试后,调用 xmake test 会遇到 No such file or directory 的错误。
期待的结果
执行上述步骤后,xmake test 正常执行。
工程配置
add_rules("mode.debug", "mode.release")
namespace("test", function ()
target("xmake-bug")
add_files("src/*.cpp")
set_kind("binary")
add_tests("default")
end)
附加信息和错误日志
build cache stats:
cache directory: build.build_cache
cache hit rate: 0%
cache hit: 0
cache hit total time: 0.000s
cache miss: 0
cache miss total time: 0.000s
new cached files: 0
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 0
compile total time: 0.000s
running tests ...
[100%]: running.test xmake-bug/default
report of tests:
[100%]: xmake-bug/default .................................... failed 0.000s
errors: build.gens\test\xmake-bug\windows\x64\release\tests\xmake-bug\default.errors.log
0% tests passed, 1 tests failed out of 1, spent 0.000s
error: @programdir\core\main.lua:329: stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:1086]:
[@programdir\actions\test\main.lua:354]: in function '_run_tests'
[@programdir\actions\test\main.lua:495]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:246]:
[@programdir\core\base\task.lua:504]: in function 'run'
[@programdir\core\main.lua:327]: in function 'cotask'
[@programdir\core\base\scheduler.lua:406]:
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:1075: in function 'base/os.raiselevel'
(...tail calls...)
@programdir\core\main.lua:329: in upvalue 'cotask'
@programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>