testautomation test closes prematurely
Closed this issue · 5 comments
madebr commented
The testautomation stops in subsystems_referenceCount
, but has still 3 tests to do.
https://github.com/libsdl-org/sdl2-compat/actions/runs/10650456036/job/29521852563#step:14:6499
13: INFO: 09/01/24 00:18:25: ===== Test Suite 23: 'Subsystems' started
13: INFO: 09/01/24 00:18:25: ----- Test Case 23.1: 'subsystems_referenceCount' started
13: INFO: 09/01/24 00:18:25: Test Description: 'Makes sure that subsystem stays until number of quits matches inits.'
13: INFO: 09/01/24 00:18:25: Test Iteration 1: execKey 7538134344330723016
madebr commented
It turns out logging after SDL_Quit
stops working.
After SDL_Quit
, the verbosity is reset to the default SDL_LOG_PRIORITY_ERROR
.
The following patch "fixes" the issue.
--- a/test/testautomation_subsystems.c
+++ b/test/testautomation_subsystems.c
@@ -27,6 +27,7 @@ static void subsystemsTearDown(void *arg)
{
/* Reset each one of the SDL subsystems */
SDL_Quit();
+ SDL_LogSetPriority(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO);
SDLTest_AssertPass("Cleanup of subsystems test completed");
}
slouken commented
Looks great!
madebr commented
Looks great!
Is it? SDL2 does not have this behavior.
This would diverge the SDL2 and SDL2-compat tests.
slouken commented
sdl2-compat resets the logging level to default after SDL_Quit(), this is fine.
slouken commented
Wait, this is sdl2-compat. It should be doing that, can you look and see why that's not working?