Merge pull request #1428 from NahuelGenchi/fix-flip-compute

test(agc): match the unreadable-code error and run the flip compute mode in ctest
This commit is contained in:
Dean
2026-10-09 21:03:47 +13:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
@@ -644,6 +644,12 @@ if(BUILD_TESTING)
set_tests_properties(agc_driver_pm4_failure PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
endif()
add_test(NAME agc_driver_flip_compute COMMAND agc_driver_flip_tests compute)
set_tests_properties(agc_driver_flip_compute PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1" SKIP_RETURN_CODE 77)
if(WIN32)
set_tests_properties(agc_driver_flip_compute PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
endif()
foreach(agcTest IN ITEMS agc_spirv_narrow_constant_store_tests agc_spirv_optimizer_tests agc_driver_constant_store_tests)
if(NOT TARGET ${agcTest})
+2 -2
View File
@@ -193,7 +193,7 @@ void testReset(bool compute) {
if (compute) sceAgcDriverSubmitAcb(0x20, &packet);
else sceAgcDriverSubmitDcb(&packet);
const auto message = expectFailure([] { AgcDriverWaitIdle_nid_postfix(); });
check(message.find(compute ? "registered" : "required shader register") != std::string::npos, "suspend reset wrong queue state");
check(message.find(compute ? "not readable" : "required shader register") != std::string::npos, "suspend reset wrong queue state");
}
}
@@ -203,7 +203,7 @@ int main(int argc, char** argv) {
if (argc == 2) testReset(std::string(argv[1]) == "compute");
else { testFlipAndBoundary(); testFailure(); }
const auto shutdown = expectFailure([] { LibcRunShutdown_nid_postfix(); });
check(shutdown.find(argc == 2 ? (std::string(argv[1]) == "compute" ? "registered" : "required shader register") : "intentional flip failure") != std::string::npos, "shutdown lost worker failure");
check(shutdown.find(argc == 2 ? (std::string(argv[1]) == "compute" ? "not readable" : "required shader register") : "intentional flip failure") != std::string::npos, "shutdown lost worker failure");
std::puts("AGC flip and suspend tests passed");
return 0;
} catch (const std::exception& error) {