DarkRadiant: master 78775c12

Author Committer Branch Timestamp Parent
orbweaver orbweaver master 24.12.2025 15:18 master 4a0288c5
Changeset Disable initialisation of the Python module in unit tests

For an unknown reason, repeatedly initialising and finalising the Python
interpreter hundreds of times, as happens in unit tests, causes an
eventual std::exception and crash on Linux. This in turn causes the unit
test run to abort and fail, even though there is no actual problem with
whatever test happens to have triggered the crash.

Since none of the unit tests actually need Python functionality, this is
worked around by simply disabling initialisation of the ScriptingSystem
module in unit tests, via a new virtual method isPythonDisabled exposed
by the ApplicationContext.
mod - include/imodule.h Diff File
mod - plugins/script/ScriptingSystem.cpp Diff File
mod - plugins/script/ScriptingSystem.h Diff File
mod - radiant/ui/script/ScriptUserInterfaceModule.cpp Diff File
mod - test/RadiantTest.h Diff File
mod - test/TestContext.h Diff File