diff --git a/core/libs/prx/libSceVideoOut/CMakeLists.txt b/core/libs/prx/libSceVideoOut/CMakeLists.txt index 5f3b3e9ce..0598a8d29 100644 --- a/core/libs/prx/libSceVideoOut/CMakeLists.txt +++ b/core/libs/prx/libSceVideoOut/CMakeLists.txt @@ -76,7 +76,7 @@ if(BUILD_TESTING) target_link_libraries(guest_video_out_resolution_status_tests PRIVATE libSceVideoOut libSceAgcDriver libkernel libc) configure_windows_unwind(guest_video_out_resolution_status_tests) add_test(NAME guest_video_out_resolution_status COMMAND guest_video_out_resolution_status_tests) - set_tests_properties(guest_video_out_resolution_status PROPERTIES TIMEOUT 20) + set_tests_properties(guest_video_out_resolution_status PROPERTIES TIMEOUT 20 SKIP_RETURN_CODE 77) if(WIN32) set_tests_properties(guest_video_out_resolution_status PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$") diff --git a/core/libs/prx/libSceVideoOut/tests/Flip.cpp b/core/libs/prx/libSceVideoOut/tests/Flip.cpp index 7b0522c1f..1c25c64f9 100644 --- a/core/libs/prx/libSceVideoOut/tests/Flip.cpp +++ b/core/libs/prx/libSceVideoOut/tests/Flip.cpp @@ -563,7 +563,10 @@ int main(int argc, char** argv) { std::fprintf(stderr, "%s\n", error.what()); try { LibcRunShutdown_nid_postfix(); } catch (const std::exception& shutdown) { std::fprintf(stderr, "shutdown: %s\n", shutdown.what()); } - if (std::string(error.what()).find("Vulkan support") != std::string::npos && !std::getenv("ANYPS5_REQUIRE_DISPLAY")) return 77; + if (std::string(error.what()).find("Vulkan support") != std::string::npos && !std::getenv("ANYPS5_REQUIRE_DISPLAY")) { + std::printf("skipped, no display or Vulkan device: %s\n", error.what()); + return 77; + } return 1; } } diff --git a/core/libs/tests/GuestVideoOutResolutionStatus.cpp b/core/libs/tests/GuestVideoOutResolutionStatus.cpp index f9eba796a..0e81b766c 100644 --- a/core/libs/tests/GuestVideoOutResolutionStatus.cpp +++ b/core/libs/tests/GuestVideoOutResolutionStatus.cpp @@ -1,5 +1,6 @@ #include "SceTypes.hpp" #include "prx/libc/include/Shutdown.hpp" +#include #include #include #include @@ -27,7 +28,14 @@ static bool Rejects(int handle, VideoOutResolutionStatus* status) { } int main() { - const int handle = sceVideoOutOpen(SYSTEM_USER, MAIN_BUS, 0, nullptr); + int handle = 0; + try { + handle = sceVideoOutOpen(SYSTEM_USER, MAIN_BUS, 0, nullptr); + } catch (const std::runtime_error& error) { + if (std::getenv("ANYPS5_REQUIRE_DISPLAY") != nullptr) throw; + std::printf("skipped, no display or Vulkan device: %s\n", error.what()); + return 77; + } Require(handle > 0); VideoOutResolutionStatus status; diff --git a/tools/check_skips.py b/tools/check_skips.py index 5b2098c83..b4e999b93 100644 --- a/tools/check_skips.py +++ b/tools/check_skips.py @@ -3,7 +3,7 @@ import re import xml.etree.ElementTree as ET from pathlib import Path -DEVICE_LIMITATION = re.compile(r"skipped,.*(subgroup|the device has no|the device reports)", re.IGNORECASE) +DEVICE_LIMITATION = re.compile(r"skipped,.*(subgroup|the device has no|the device reports|no display)", re.IGNORECASE) WINDOWS_PREFIX = "agc" @@ -36,7 +36,7 @@ if __name__ == "__main__": expected = f"any {WINDOWS_PREFIX}* test, which the runner has no Vulkan driver for" else: unexpected = [name for name, output in found if not DEVICE_LIMITATION.search(output)] - expected = "any test that reports the device limitation it needs, such as narrow subgroups or a missing extension" + expected = "any test that reports the device limitation it needs, such as narrow subgroups, a missing extension or no display for a Vulkan window" for name in unexpected: print(f"error: {name} skipped") if unexpected: