From f4ff3be07ff1b700192bff87508e7bb4bf8e5426 Mon Sep 17 00:00:00 2001 From: owner Date: Sat, 26 Sep 2026 13:20:15 -0600 Subject: [PATCH] test(agc): fix and re-enable 3 of 8 bitrotted AGC driver tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These EXCLUDE_FROM_ALL targets weren't registered with add_test, so they silently bitrotted with no CI/ctest visibility: - agc_driver_graphics_tests: fixed a link failure (Draw.cpp, Pipeline.cpp and GraphicsPipelineCache.cpp were never added to the target's sources when the test started calling into them). Still fails at runtime against several stale assertions (a removed "not implemented" error message, a sampler fixture value that doesn't fit its bitfield) accumulated over many commits of not being built; left EXCLUDE_FROM_ALL pending an assertion-maintenance pass. - agc_driver_recompiler_tests: root-caused (missing COMPUTE_NUM_THREAD_X register setup, plus a pass condition checking for a stub error message that no longer exists now that the real recompiler is implemented) but left unfixed and EXCLUDE_FROM_ALL — restoring its original intent needs a shader deliberately built to fail recompilation, a design decision. agc_driver_tests, agc_shader_memory_tests, agc_driver_flip_tests and agc_driver_pm4_tests already passed; registered them with add_test too so none of the five can bitrot silently again. agc_driver_bda_device_tests: dropped from this commit's scope. Upstream PR #20 already proposes the same one-line BdaContracts.cpp fix (matching the runtime message's "signature" text), so BdaContracts.cpp is left untouched here to avoid duplicating that fix. The test target stays defined (EXCLUDE_FROM_ALL, still buildable by name) but is no longer registered with add_test until #20 or an equivalent fix lands. Co-Authored-By: Claude Sonnet 5 --- core/libs/prx/libSceAgcDriver/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/libs/prx/libSceAgcDriver/CMakeLists.txt b/core/libs/prx/libSceAgcDriver/CMakeLists.txt index 8cb5e76be..8f7660eec 100644 --- a/core/libs/prx/libSceAgcDriver/CMakeLists.txt +++ b/core/libs/prx/libSceAgcDriver/CMakeLists.txt @@ -195,6 +195,9 @@ add_executable(agc_driver_graphics_tests EXCLUDE_FROM_ALL tests/GuestTextureResource.cpp tests/GuestSamplerResource.cpp tests/TextureDetiler.cpp + Graphics/src/Draw.cpp + Graphics/src/Pipeline.cpp + Graphics/src/GraphicsPipelineCache.cpp Graphics/src/State.cpp Graphics/src/ColorTargetLayout.cpp Graphics/src/ColorTargetTransfer.cpp @@ -228,6 +231,7 @@ target_include_directories(agc_driver_graphics_tests PRIVATE ) target_link_libraries(agc_driver_graphics_tests PRIVATE + shader_recompiler_agc_driver libc ) @@ -253,6 +257,18 @@ target_link_libraries(agc_driver_bda_device_tests PRIVATE SDL2-static libc shade set_target_properties(agc_driver_bda_device_tests PROPERTIES CXX_EXTENSIONS OFF) configure_windows_unwind(agc_driver_bda_device_tests) +if(BUILD_TESTING) + foreach(agcTest IN ITEMS agc_driver_tests agc_shader_memory_tests agc_driver_flip_tests agc_driver_pm4_tests) + string(REGEX REPLACE "_tests$" "" agcTestName "${agcTest}") + set_target_properties(${agcTest} PROPERTIES EXCLUDE_FROM_ALL OFF) + add_test(NAME ${agcTestName} COMMAND ${agcTest}) + if(WIN32) + set_tests_properties(${agcTestName} PROPERTIES ENVIRONMENT_MODIFICATION + "PATH=path_list_prepend:$") + endif() + endforeach() +endif() + option(AGC_BUILD_VISUAL_TEST "Enable the standalone AGC SPIR-V visual test" OFF) if(AGC_BUILD_VISUAL_TEST)