You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Motivation: CoreUObject, taskgraph and threads are global constructs and need to be initialized as such and are expensive to setup/teardown before/after multiple single tests. Introduced --global-setup and --no-global-setup to control execution of global test setup. Unit tests that rely heavily on mocking and are designed to run without any global context should use --no-global-setup Other: Removed CoreTestFixture and applied minor fixes wherever things didn't make sense. One particular CoreUObject test was converted but had always failed to run on non-desktop platforms. It needs to be addressed ASAP. #preflight 625873c7e304a95465fc148e #rb Devin.Doucette, Zousar.Shaker [CL 19769262 by chris constantinescu in ue5-main branch]
32 lines
624 B
C++
32 lines
624 B
C++
#include "TestCommon/CoreUtilities.h"
|
|
#include "TestCommon/CoreUObjectUtilities.h"
|
|
|
|
#include "LowLevelTestModule.h"
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
class FGlobalLLTModule : public ILowLevelTestsModule
|
|
{
|
|
public:
|
|
virtual void GlobalSetup() override;
|
|
virtual void GlobalTeardown() override;
|
|
};
|
|
|
|
IMPLEMENT_MODULE(FGlobalLLTModule, GlobalLowLevelTests);
|
|
|
|
void FGlobalLLTModule::GlobalSetup()
|
|
{
|
|
InitTaskGraph();
|
|
InitThreadPool(true);
|
|
#if WITH_COREUOBJECT
|
|
InitCoreUObject();
|
|
#endif
|
|
}
|
|
|
|
void FGlobalLLTModule::GlobalTeardown()
|
|
{
|
|
#if WITH_COREUOBJECT
|
|
CleanupCoreUObject();
|
|
#endif
|
|
CleanupThreadPool();
|
|
CleanupTaskGraph();
|
|
} |