Files
UnrealEngineUWP/Engine/Source/Runtime/Engine/Private/Commandlets/SmokeTestCommandlet.cpp
henrik karlsson a3a1c99681 [Engine]
* Ran IWYU on all cpp files. Re-running IWYU will cause a few breaking changes so will handle that in a separate change

#preflight 63a1fa7c2540a78d27beadb5
#rb none

[CL 23551816 by henrik karlsson in ue5-main branch]
2022-12-20 19:57:49 -05:00

54 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
/*=============================================================================
SmokeTestCommandlet.cpp: Commandled used for smoke testing.
=============================================================================*/
#include "Commandlets/SmokeTestCommandlet.h"
#include "Misc/AutomationTest.h"
#include "Misc/App.h"
#include "Engine/Engine.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(SmokeTestCommandlet)
USmokeTestCommandlet::USmokeTestCommandlet(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
IsClient = false;
IsEditor = false;
LogToConsole = true;
}
int32 USmokeTestCommandlet::Main( const FString& Params )
{
const TCHAR* Parms = *Params;
RequestEngineExit(TEXT("SmokeTestCommandlet Main")); // so CTRL-C will exit immediately
bool bAllSuccessful = FAutomationTestFramework::Get().RunSmokeTests();
return bAllSuccessful ? 0 : 1;
}
IMPLEMENT_SIMPLE_AUTOMATION_TEST(FRunServer, "System.Core.Misc.Run Server", EAutomationTestFlags::CommandletContext | EAutomationTestFlags::SmokeFilter)
bool FRunServer::RunTest(const FString& Parameters)
{
// put various smoke test testing code in here before moving off to their
// own commandlet
if( GEngine && IsRunningDedicatedServer() )
{
// Update FApp::CurrentTime / FApp::DeltaTime while taking into account max tick rate.
GEngine->UpdateTimeAndHandleMaxTickRate();
// Tick the engine.
GEngine->Tick( FApp::GetDeltaTime(), false );
}
return true;
}