From c13614e0823be70cf4c18aac3aa65719c306835a Mon Sep 17 00:00:00 2001 From: jesusACD Date: Tue, 24 Nov 2026 21:45:34 -0500 Subject: [PATCH] runtime: register SKIP_RETURN_CODE 77 for vk_xdxr_postbuild_readback (CI-XDXR-POSTBUILD-SKIP-CODE) --- runtime/CMakeLists.txt | 1 + tests/test_ctest_registration.py | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 652003b199..f1c7a229ab 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -4116,6 +4116,7 @@ if(TARGET Vulkan::Headers) endif() endif() add_test(NAME vk_xdxr_postbuild_readback COMMAND vk_xdxr_postbuild_readback_test) + set_tests_properties(vk_xdxr_postbuild_readback PROPERTIES SKIP_RETURN_CODE 77) # Title-placed buffer VAs (device slot 133) and the console VA shaders reach them by (src/title_va_alias.h). add_executable(title_va_alias_test test/title_va_alias_test.cpp) diff --git a/tests/test_ctest_registration.py b/tests/test_ctest_registration.py index fc88e8081a..32fb3bd896 100644 --- a/tests/test_ctest_registration.py +++ b/tests/test_ctest_registration.py @@ -65,6 +65,28 @@ def test_indirect_rt_skips_with_the_ctest_skip_code(self): self.assertEqual(len(skips), 3, f"expected three whole-test SKIP paths, got {len(skips)}") self.assertEqual(skips, [77, 77, 77], "SKIP paths must return 77 for SKIP_RETURN_CODE 77") + def test_xdxr_postbuild_readback_skips_with_the_ctest_skip_code(self): + self.assertIn( + "add_test(NAME vk_xdxr_postbuild_readback COMMAND vk_xdxr_postbuild_readback_test)", + self.cmake, + "vk_xdxr_postbuild_readback_test is built but not registered with ctest", + ) + self.assertIn( + "set_tests_properties(vk_xdxr_postbuild_readback PROPERTIES SKIP_RETURN_CODE 77)", + self.cmake, + "vk_xdxr_postbuild_readback must skip with 77 on a runner without a Vulkan GPU", + ) + src = (ROOT / "runtime" / "test" / "vk_xdxr_postbuild_readback_test.cpp").read_text(encoding="utf-8") + lines = src.splitlines() + skips = [ + int(m.group(1)) + for i, line in enumerate(lines) + if ": skipped (" in line and i + 1 < len(lines) + for m in [re.match(r"\s*return\s+(\d+)\s*;", lines[i + 1])] + if m + ] + self.assertEqual(skips, [77], "vk_xdxr_postbuild_readback skip path must return 77") + def test_whole_test_skips_return_the_skip_code(self): # A test registered with SKIP_RETURN_CODE 77 that prints SKIP and returns 0 is counted as passed although it # checked nothing: bink_audio_test did that for a movie without audio tracks after #1580.