mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-27 00:28:14 +00:00
Merge pull request #8654 from xXPBSXx/test/video-out-telemetry-windows
test(libSceVideoOut): run the telemetry tests on Windows
This commit is contained in:
2 files changed
+12
-2
No files matched your search
@@ -291,13 +291,18 @@ if(BUILD_TESTING)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING AND NOT WIN32)
|
||||
if(BUILD_TESTING)
|
||||
add_test_executable(video_out_telemetry_tests tests/Telemetry.cpp)
|
||||
target_include_directories(video_out_telemetry_tests PRIVATE ${LIBS_INCLUDE_DIR} ${ANYPS5_SDL2_INCLUDE_DIR})
|
||||
target_link_libraries(video_out_telemetry_tests PRIVATE libSceVideoOut libSceAgcDriver libkernel libc SDL2-static)
|
||||
set_target_properties(video_out_telemetry_tests PROPERTIES CXX_EXTENSIONS OFF)
|
||||
configure_windows_unwind(video_out_telemetry_tests)
|
||||
add_test(NAME video_out_telemetry COMMAND video_out_telemetry_tests)
|
||||
add_test(NAME video_out_telemetry_caption COMMAND video_out_telemetry_tests caption)
|
||||
set_tests_properties(video_out_telemetry PROPERTIES TIMEOUT 30)
|
||||
set_tests_properties(video_out_telemetry_caption PROPERTIES TIMEOUT 30 SKIP_RETURN_CODE 77 RESOURCE_LOCK videoout_app0 ENVIRONMENT "SDL_VIDEODRIVER=${ANYPS5_VIDEO_OUT_TEST_DRIVER}")
|
||||
if(WIN32)
|
||||
set_tests_properties(video_out_telemetry video_out_telemetry_caption PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
endif()
|
||||
@@ -3,7 +3,12 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#ifdef _WIN32
|
||||
#include <process.h>
|
||||
#define getpid _getpid
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
@@ -109,7 +114,7 @@ void queueOverflowIsCounted() {
|
||||
void contractPadAndPresentLines() {
|
||||
const auto directory = freshDirectory("contract");
|
||||
{
|
||||
auto writer = VideoOutTelemetry::OpenFromEnvironment(directory.c_str(), "abc123");
|
||||
auto writer = VideoOutTelemetry::OpenFromEnvironment(directory.string().c_str(), "abc123");
|
||||
check(writer != nullptr, "variable must open a writer");
|
||||
PadInputState state;
|
||||
state.buttons = 0x4000;
|
||||
|
||||
Reference in new issue
Block a user