Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
22 changes: 22 additions & 0 deletions tests/test_ctest_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down