summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Michaels <[email protected]>2023-10-29 12:04:59 -0700
committerZachary Michaels <[email protected]>2023-10-29 12:04:59 -0700
commitf6b8b4611d94781afcf7ca945ae4cbfce6561455 (patch)
tree8633ffb1dc56e071c33f3f208c51e7ca510d0d4a
parente99d51f3454f0eda98bbf7ffbac0328f9be0a6b0 (diff)
Tests: Build failure conditional error
-rw-r--r--xmake/actions/test/main.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/actions/test/main.lua b/xmake/actions/test/main.lua
index dfbc04038..5958325bc 100644
--- a/xmake/actions/test/main.lua
+++ b/xmake/actions/test/main.lua
@@ -387,7 +387,9 @@ function main()
if testinfo.build_should_fail then
local built, _ = _try_build_target(targetname)
testinfo.passed = not built
- testinfo.errors = "Build succeeded when failure was expected"
+ if built then
+ testinfo.errors = "Build succeeded when failure was expected"
+ end
else
table.insert(targetnames, targetname)
end