Files
UnrealEngineUWP/Engine/Source/Developer/LowLevelTestsRunner/Private/Platform/Linux/LinuxTestRunner.cpp
chris constantinescu 72b02c5967 Low Level Tests: code tests built on Catch2 with multi-platform support.
Intended for writing unit, integration, functional and all types of tests.

#jira UEENGQA-49764
#rb Jerome.Delattre


#ROBOMERGE-AUTHOR: chris.constantinescu
#ROBOMERGE-SOURCE: CL 17666358 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17666384 by chris constantinescu in ue5-release-engine-test branch]
2021-09-29 15:50:57 -04:00

40 lines
722 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#if defined(PLATFORM_LINUX)
#include "TestRunner.h"
#include <unistd.h>
const char* GetProcessExecutablePath()
{
static char Buffer[512] = { 0 };
ssize_t Result = readlink("/proc/self/exe", Buffer, sizeof(Buffer));
if (Result > 0 && Result < (sizeof(Buffer) - 1))
{
Buffer[Result] = '\0';
//Cut off the module file
for (int Index = (int)Result; Index >= 0; --Index)
{
if (Buffer[Index] == '/')
{
Buffer[Index + 1] = '\0';
break;
}
}
return Buffer;
}
return nullptr;
}
const char* GetCacheDirectory()
{
return "/var/tmp/playground_test_pds_cache";
}
int main(int argc, const char* argv[])
{
return RunTests(argc, argv);
}
#endif