Files
AnyPS5/core/libs/tests/GameModeFixtureLibrary.cpp
T
MarcZX10 72bec771a0 test(libkernel): run the GameMode client against fixture libraries
Build three tiny shared libraries that export the real_gamemode_* symbols
(complete, without real_gamemode_request_end, without
real_gamemode_error_string) and drive the client through them, so no
daemon is needed. Check a missing library, a fall back to the second
library name, request and release once each, a refusal with the library's
reason, a failing release, a missing symbol and a session over the client.
2026-10-29 17:11:33 +00:00

44 lines
594 B
C++

namespace {
int startResult = 0;
int endResult = 0;
int starts = 0;
int ends = 0;
}
extern "C" {
int real_gamemode_request_start() {
++starts;
return startResult;
}
#ifndef FIXTURE_OMIT_END
int real_gamemode_request_end() {
++ends;
return endResult;
}
#endif
#ifndef FIXTURE_OMIT_ERROR_STRING
const char* real_gamemode_error_string() {
return "fixture daemon is not running";
}
#endif
void fixture_configure(int start, int end) {
startResult = start;
endResult = end;
}
int fixture_starts() {
return starts;
}
int fixture_ends() {
return ends;
}
}