From f6b8b4611d94781afcf7ca945ae4cbfce6561455 Mon Sep 17 00:00:00 2001 From: Zachary Michaels Date: Sun, 29 Oct 2023 12:04:59 -0700 Subject: Tests: Build failure conditional error --- xmake/actions/test/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1