diff --git a/CMakeLists.txt b/CMakeLists.txt index df13c7ab8..b88b06abc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -780,6 +780,8 @@ if(Python3_Interpreter_FOUND) # three refusals a real pack needed -- a block-32 head refused by name, an untied head given no false oracle, the # trailing zeros counted. It was never registered, so nothing ran it after #1710. add_test(NAME q4nx_tail_head COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/q4nx_tail_head_test.py) + # Without onnx its two refusal arms cannot run: it exits 77, so ctest shows SKIPPED rather than a pass (#1747 review). + set_tests_properties(q4nx_tail_head PROPERTIES SKIP_RETURN_CODE 77) # A member declared in npu/forward/include/q4nx_forward.h and never defined keeps `main` green while a full # `cmake --build` fails at link time (engine#1573: the 3-argument step_batch_embeds). CI cannot catch it -- # .github/workflows/ci.yml builds `--target onebit` only, because a full build wants the private NPU runtime -- diff --git a/tests/q4nx_tail_head_test.py b/tests/q4nx_tail_head_test.py index 0b6f79d0c..41617e386 100755 --- a/tests/q4nx_tail_head_test.py +++ b/tests/q4nx_tail_head_test.py @@ -295,8 +295,17 @@ def main(): synthetic() - print("all q4nx_tail_head checks passed" if not failures else "%d check(s) failed" % failures) - return 1 if failures else 0 + if failures: + print("%d check(s) failed" % failures) + return 1 + # engine#1747 review: the block-32 refusal and the undeclared-tie arm need onnx, and they are the reason this test is + # registered. Without onnx a pass would hide that they never ran, so report SKIPPED to ctest (SKIP_RETURN_CODE 77 in + # CMakeLists.txt) instead. A failing synthetic check still returns 1 above, in either environment. + if not HAVE_ONNX: + print("SKIPPED: the synthetic checks passed, but the two onnx arms (block-32 refusal, undeclared tie) did not run") + return 77 + print("all q4nx_tail_head checks passed") + return 0 if __name__ == "__main__":