-
Notifications
You must be signed in to change notification settings - Fork 0
/
RunTests.bat
56 lines (46 loc) · 1.56 KB
/
RunTests.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@echo off
setlocal
set ROOTPATH=%~dp0
pushd %ROOTPATH%
REM Default to Unreal Engine 5, but can be overriden to UE4
if [%1] == [] (
set ENGINE=5
) else (
set ENGINE=%1
)
if "%ENGINE%" == "4" (
set UE4EDITOR="C:\Program Files\Epic Games\UE_4.27\Engine\Binaries\Win64\UE4Editor-Cmd.exe"
) else if "%ENGINE%" == "5" (
set UE4EDITOR="C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\Win64\UnrealEditor-Cmd.exe"
) else (
echo Engine version '%ENGINE%' need to be 4 or 5
exit /b 1
)
if not exist %UE4EDITOR% (
echo %UE4EDITOR% not found
exit /b
)
for %%a in (*.uproject) do set "UPROJECT=%CD%\%%a"
if not defined UPROJECT (
echo *.uproject file not found
exit /b
)
for %%i in ("%UPROJECT%") do (
set PROJECT=%%~ni
)
REM see https://docs.unrealengine.com/en-US/Programming/Basics/CommandLineArguments
REM see UnrealEngine\Engine\Source\Editor\UnrealEd\Private\UnrealEdSrv.cpp
REM -unattended: Set as unattended. Disable anything requiring feedback from user.
REM -NullRHI: disable rendering of the Editor
REM NOTE: cannot redirect std output to a file since we are not using a Commandlet here
echo.
echo %TIME% Running Unit Tests (~30s, logs in Game\Saved\Logs)
echo on
%UE4EDITOR% %UPROJECT% -ExecCmds="Automation RunTests PlasticSCM" -TestExit="Automation Test Queue Empty" -Unattended -NullRHI -Log -Log=RunTests.log
@echo off
if %errorlevel% neq 0 (
echo %TIME% ERROR: Exit code %ERRORLEVEL% for command RunTests
exit /b %errorlevel%
)
echo %TIME% Exit code %ERRORLEVEL% for command RunTests
popd