Merge pull request #76878 from RedworkDE/tests-fix-errors

Fix various errors when running the unit tests
This commit is contained in:
Rémi Verschelde 2023-05-09 19:28:54 +02:00
commit 6bca6beea3
No known key found for this signature in database
GPG key ID: C3336907360768E1
9 changed files with 22 additions and 21 deletions

View file

@ -613,8 +613,6 @@ void Main::test_cleanup() {
TextServerManager::get_singleton()->get_interface(i)->cleanup();
}
EngineDebugger::deinitialize();
ResourceLoader::remove_custom_loaders();
ResourceSaver::remove_custom_savers();
@ -626,6 +624,7 @@ void Main::test_cleanup() {
GDExtensionManager::get_singleton()->deinitialize_extensions(GDExtension::INITIALIZATION_LEVEL_SCENE);
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_SCENE);
unregister_platform_apis();
unregister_driver_types();
unregister_scene_types();
@ -636,8 +635,12 @@ void Main::test_cleanup() {
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_SERVERS);
unregister_server_types();
EngineDebugger::deinitialize();
OS::get_singleton()->finalize();
if (packed_data) {
memdelete(packed_data);
}
if (translation_server) {
memdelete(translation_server);
}
@ -653,16 +656,13 @@ void Main::test_cleanup() {
if (globals) {
memdelete(globals);
}
if (packed_data) {
memdelete(packed_data);
}
if (engine) {
memdelete(engine);
}
unregister_core_driver_types();
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
unregister_core_extensions();
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
unregister_core_types();
OS::get_singleton()->finalize_core();