I am setting up a CI pipeline for a project and I am running into an issue with executing RunUAT from powershell.
I have this .bat which does work as intended
SET engine_version=5.7
SET script_temp=gen_temp.txt
:: Find the installed directory for the specified engine version using PowerShell and store it in a temporary file
powershell -command "& { (Get-ItemProperty 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\EpicGames\Unreal Engine\%engine_version%' -Name 'InstalledDirectory' ).'InstalledDirectory' }" > %script_temp%
:: Read the path from the temporary file into a batch variable
SET /p UE_PATH=< %script_temp%
:: Clean up the temporary file
DEL %script_temp%
:: Verify the path
IF DEFINED UE_PATH (
ECHO Unreal Engine %engine_version% found at: %UE_PATH%
) ELSE (
ECHO Unreal Engine %engine_version% installation path not found in the registry.
ECHO Please ensure the engine is installed via the Epic Games Launcher and the version number is correct.
)
set skip_args=-skipcook -skipstage -skippackage
set project_args=-project="%CD%\LichLight.uproject" -platform=Win64
set build_args=-unattended -nosound -nullrhi -build="%UE_PATH%" -test="UE.EditorAutomation"
set test_args=-RunTest="Project.Functional Tests" -ReportExportPath="C:\LichLightTests\"
set command="%UE_PATH%\Engine\Build\BatchFiles\RunUAT.bat" RunUnreal %skip_args% %project_args% %build_args% %test_args%
call %command%
Then I have this .ps1 which is intended to do the same thing. It does run and pass the tests all the same, however, it fails to output the test result files
param(
[string]$Engine_Version="5.7",
[string]$Output_Path="C:\LichLightTests\"
)
#Find the installed directory for the specified engine version using PowerShell and store it in a temporary file
$UE_PATH = (Get-ItemProperty -Path "HKLM:\SOFTWARE\EpicGames\Unreal Engine\$Engine_Version" -Name 'InstalledDirectory').InstalledDirectory
$args = @(
"RunUnreal"
"-skipcook"
"-skipstage"
"-skippackage"
"-project=$PSScriptRoot\LichLight.uproject"
"-platform=Win64"
"-unattended"
"-nosound"
"-nullrhi"
"-build=$UE_path"
"-test=UE.EditorAutomation"
"-RunTest=Project.Functional Tests"
"-ReportExportPath=$Output_Path"
)
Start-Process -FilePath "$UE_path\Engine\Build\BatchFiles\RunUAT.sh" -ArgumentList $args
The failing logs
##### No Gauntlet Events were fired during this test!
UE.EditorAutomation(RunTest=Project.Functional) (Win64 Development Editor) result=Passed
How to run locally: (RunUAT RunUnreal -Test="UE.EditorAutomation" -skipcook -skipstage -skippackage -project="B:\Projects\LichLight\LichLight\LichLight.uproject" -unattended -nosound -nullrhi -build="B:\GameDevPrograms\UE5\UE_5.7" -RunTest="Project.Functional")
Arguments used:
RunUAT
RunUnreal
-Test="UE.EditorAutomation"
-skipcook
-skipstage
-skippackage
-project="B:\Projects\LichLight\LichLight\LichLight.uproject"
-unattended
-nosound
-nullrhi
-build="B:\GameDevPrograms\UE5\UE_5.7"
-RunTest="Project.Functional"
BUILD SUCCESSFUL
Attempting to execute Tests(ReportExportPath=C:\LichLightTests\)
==============================================================================
Failed to find command Tests
(see C:\Users\sharp\AppData\Roaming\Unreal Engine\AutomationTool\Logs\B+GameDevPrograms+UE5+UE_5.7\Log.txt for full exception trace)
AutomationException: Failed to find command Tests
at AutomationTool.Automation.ExecuteAsync(List`1 CommandsToExecute, Dictionary`2 Commands)
at AutomationTool.Automation.ExecuteAsync(List`1 CommandsToExecute, Dictionary`2 Commands)
at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies)
==============================================================================
AutomationTool executed for 0h 1m 41s
AutomationTool exiting with ExitCode=1 (Error_Unknown)
Can anyone tell me what the issue is that is preventing the output files from populating?