Merging The Engine directory from //UE4/Dev-Main to //UE4/Dev-Editor upto CL 4698813

#rb none

[CL 4720826 by Chris Gagnon in Dev-Editor branch]
This commit is contained in:
Chris Gagnon
2019-01-14 16:55:55 -05:00
parent 1057c9fa07
commit 1a3bf5caf1
1291 changed files with 66495 additions and 21234 deletions

View File

@@ -239,9 +239,11 @@ protected:
*
* @param InCommandline The commandline that the child process should use
* @param bMinimized Starts the process with the window minimized
* @param Type If we are not in Dev Editor mode, the Game/Server processes are separate - specify which here
* @return Returns a pointer to the new processes handling struct
*/
virtual TWeakPtr<FUnitTestProcess> StartUE4UnitTestProcess(FString InCommandline, bool bMinimized=true);
virtual TWeakPtr<FUnitTestProcess> StartUE4UnitTestProcess(FString InCommandline, bool bMinimized=true,
EBuildTargets::Type Type=EBuildTargets::Game);
/**
* Shuts-down/cleans-up a child process tied to the unit test

View File

@@ -1165,7 +1165,7 @@ void UClientUnitTest::StartUnitTestServer()
ServerParameters += FString::Printf(TEXT(" -BeaconPort=%i -NUTMonitorBeacon"), ServerBeaconPort);
}
ServerHandle = StartUE4UnitTestProcess(ServerParameters);
ServerHandle = StartUE4UnitTestProcess(ServerParameters, true, EBuildTargets::Server);
if (ServerHandle.IsValid())
{

View File

@@ -205,6 +205,9 @@ FOutBunch* UMinimalClient::CreateChannelBunchByName(const FName& ChName, int32 C
check(UnitConn->Channels[ChIndex] == nullptr);
}
// Hack to force IsNetReady
UnitConn->QueuedBits = -(MAX_PACKET_SIZE * 8);
if (ControlChan != nullptr && ControlChan->IsNetReady(false))
{
int32 BunchSequence = ++UnitConn->OutReliable[ChIndex];
@@ -215,7 +218,9 @@ FOutBunch* UMinimalClient::CreateChannelBunchByName(const FName& ChName, int32 C
ReturnVal->Time = 0.0;
ReturnVal->ReceivedAck = false;
ReturnVal->PacketId = 0;
PRAGMA_DISABLE_DEPRECATION_WARNINGS
ReturnVal->bDormant = false;
PRAGMA_ENABLE_DEPRECATION_WARNINGS
ReturnVal->Channel = nullptr;
ReturnVal->ChIndex = ChIndex;
ReturnVal->ChName = ChName;
@@ -294,7 +299,10 @@ bool UMinimalClient::SendRawBunch(FOutBunch& Bunch, bool bAllowPartial/*=false*/
NewBunch->bReliable = Bunch.bReliable;
NewBunch->bOpen = Bunch.bOpen;
NewBunch->bClose = Bunch.bClose;
PRAGMA_DISABLE_DEPRECATION_WARNINGS
NewBunch->bDormant = Bunch.bDormant;
PRAGMA_ENABLE_DEPRECATION_WARNINGS
NewBunch->CloseReason = Bunch.CloseReason;
NewBunch->bIsReplicationPaused = Bunch.bIsReplicationPaused;
NewBunch->ChIndex = Bunch.ChIndex;
NewBunch->ChName = Bunch.ChName;

View File

@@ -102,6 +102,14 @@ public:
DumpRPCsHandle = FProcessEventHook::Get().AddGlobalRPCHook(FOnProcessNetEvent::CreateStatic(&FNetcodeUnitTest::DumpRPC));
}
// Add earlier log trace opportunity (execcmds is sometimes too late)
FString TraceStr;
if (FParse::Value(FCommandLine::Get(), TEXT("LogTrace="), TraceStr) && TraceStr.Len() > 0)
{
GLogTraceManager->AddLogTrace(TraceStr);
}
// Hack-override the log category name
#if !NO_LOGGING
class FLogOverride : public FLogCategoryBase

View File

@@ -77,7 +77,7 @@ TWeakPtr<FUnitTestProcess> UProcessUnitTest::StartUnitTestProcess(FString Path,
verify(FPlatformProcess::CreatePipe(ReturnVal->ReadPipe, ReturnVal->WritePipe));
UNIT_LOG(ELogType::StatusImportant, TEXT("Starting process with parameters: %s"), *InCommandline);
UNIT_LOG(ELogType::StatusImportant, TEXT("Starting process '%s' with parameters: %s"), *Path, *InCommandline);
ReturnVal->ProcessHandle = FPlatformProcess::CreateProc(*Path, *InCommandline, true, bMinimized, false, &ReturnVal->ProcessID,
0, NULL, ReturnVal->WritePipe);
@@ -91,16 +91,32 @@ TWeakPtr<FUnitTestProcess> UProcessUnitTest::StartUnitTestProcess(FString Path,
}
else
{
UNIT_LOG(ELogType::StatusFailure, TEXT("Failed to start process"));
UNIT_LOG(ELogType::StatusFailure, TEXT("Failed to start process: %s (%s)"), *Path, *InCommandline);
}
return ReturnVal;
}
TWeakPtr<FUnitTestProcess> UProcessUnitTest::StartUE4UnitTestProcess(FString InCommandline, bool bMinimized/*=true*/)
TWeakPtr<FUnitTestProcess> UProcessUnitTest::StartUE4UnitTestProcess(FString InCommandline, bool bMinimized/*=true*/,
EBuildTargets::Type Type/*=EBuildTargets::Game*/)
{
TWeakPtr<FUnitTestProcess> ReturnVal = NULL;
FString GamePath = FPlatformProcess::GenerateApplicationPath(FApp::GetName(), FApp::GetBuildConfiguration());
TWeakPtr<FUnitTestProcess> ReturnVal = nullptr;
FString TargetExecutable = FApp::GetName();
#if UE_BUILD_DEVELOPMENT && !WITH_EDITOR
// Development modes other than Dev Editor, must target the separate Server process
if (Type == EBuildTargets::Server)
{
TargetExecutable = TargetExecutable.Replace(TEXT("Game"), TEXT("Server"));
UNIT_LOG(, TEXT("Targeting server process '%s'. If this fails, make sure you compiled Development Server and cooked it in UnrealFrontend."),
*TargetExecutable);
}
FString GamePath = FPaths::Combine(FPlatformMisc::ProjectDir(), TEXT("Binaries"), FPlatformProcess::GetBinariesSubdirectory(), TargetExecutable);
#else
FString GamePath = FPlatformProcess::GenerateApplicationPath(TargetExecutable, FApp::GetBuildConfiguration());
#endif
ReturnVal = StartUnitTestProcess(GamePath, InCommandline, bMinimized);

View File

@@ -63,9 +63,11 @@ UUnitTestCommandlet::UUnitTestCommandlet(const FObjectInitializer& ObjectInitial
int32 UUnitTestCommandlet::Main(const FString& Params)
{
// @todo #JohnBLowPri: Fix StandaloneRenderer support for static builds
// @todo #JohnBLowPri: Fix StandaloneRenderer support for static builds (this is very hard to do,
// getting the game renderer going with commandlets, is very tricky)
#if IS_MONOLITHIC
UE_LOG(LogUnitTest, Log, TEXT("NetcodeUnitTest commandlet not currently supported in static/monolithic builds"));
UE_LOG(LogUnitTest, Log, TEXT("NetcodeUnitTest commandlet not currently supported in static/monolithic builds. ")
TEXT("You must disable the externs in SlateOpenGLExtensions.cpp to hack-unblock monolithic builds."));
#else
GIsRequestingExit = false;