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
5 changes: 3 additions & 2 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1655,6 +1655,7 @@ if(BUILD_TESTING)
endif()
if(WIN32 AND TARGET dstorage_test)
add_test(NAME dstorage COMMAND dstorage_test)
set_tests_properties(dstorage PROPERTIES TIMEOUT 120)
endif()
if(WIN32 AND TARGET xgameruntime_test)
add_test(NAME xgameruntime COMMAND xgameruntime_test)
Expand Down Expand Up @@ -3556,7 +3557,7 @@ if(TARGET Vulkan::Headers)
target_compile_definitions(dxgi_host_parity_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
target_compile_options(dxgi_host_parity_test PRIVATE /W4 /permissive- /utf-8)
add_test(NAME dxgi_host_parity COMMAND dxgi_host_parity_test)
set_tests_properties(dxgi_host_parity PROPERTIES SKIP_RETURN_CODE 77)
set_tests_properties(dxgi_host_parity PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 120)

# Host-parity test for DXGI waitable swap chain frame-latency semaphore behavior.
add_executable(dxgi_waitable_latency_test test/dxgi_waitable_latency_test.cpp)
Expand All @@ -3565,7 +3566,7 @@ if(TARGET Vulkan::Headers)
target_compile_options(dxgi_waitable_latency_test PRIVATE /W4 /permissive- /utf-8)
add_test(NAME dxgi_waitable_latency COMMAND dxgi_waitable_latency_test)
set_tests_properties(dxgi_waitable_latency PROPERTIES
SKIP_RETURN_CODE 77
SKIP_RETURN_CODE 77 TIMEOUT 120
FAIL_REGULAR_EXPRESSION "Validation Error;VUID-")

# Synthetic (no GPU): VulkanSwapchain's DXGI BufferCount contract when Vulkan returns more images than the
Expand Down
9 changes: 9 additions & 0 deletions tests/test_ctest_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ def test_a_named_skip_code_counts_by_its_value(self):
src.write_text('std::printf("SKIP: none\\n");\nreturn kUnknown;\n', encoding="utf-8", newline="\n")
self.assertEqual(whole_test_skips_not_77(cmake, Path(tmp)), [("test/a_test.cpp:2", "kUnknown")])

def test_host_parity_and_storage_tests_have_timeouts(self):
for test_name in ("dstorage", "dxgi_host_parity", "dxgi_waitable_latency"):
m = re.search(
r"set_tests_properties\(\s*" + test_name + r"\b[^)]*TIMEOUT\s+[1-9]\d*",
self.cmake,
re.S,
)
self.assertIsNotNone(m, f"{test_name} must have an explicit TIMEOUT property")


def whole_test_skips_not_77(cmake_text, runtime_dir):
"""[(source:line, code)] for a SKIP print directly followed by `return N;` (N != 77) in the sources of a test
Expand Down
Loading