58 Commits

Author SHA1 Message Date
Wojciech Krywult
9fe0243168 AutomationTool: Fixed 'Launch failed' messages in the editor after terminating a successfully launched game.The problems was caused by us treating all non-zero results as errors while some platforms return different non-zero codes to provide additional information.
Resolved by adding IProcessResult::bExitCodeSuccess virtual property which may be overridden on the affected platforms to explicitly indicate which exit codes are allowed.

#preflight 6462a07a592448f08bde34e4
#rb David.Harvey
#jira UE-178885
#rnx

[CL 25497459 by Wojciech Krywult in ue5-main branch]
2023-05-16 16:56:31 -04:00
Ben Marsh
010075a0b0 UAT: Reduce number of decimal places when logging how long it took to execute an external program.
#preflight none

[CL 25366147 by Ben Marsh in ue5-main branch]
2023-05-06 14:11:41 -04:00
Ben Marsh
cbf077c130 More AutomationTool structured logging changes.
#preflight 6408f4bcb0544ef0b4c2c5c6

[CL 24566694 by Ben Marsh in ue5-main branch]
2023-03-08 16:11:38 -05:00
Ben Marsh
e141cb6196 More UAT structured logging fixes.
#preflight 6408dee3b0544ef0b4bca696

[CL 24564590 by Ben Marsh in ue5-main branch]
2023-03-08 14:32:15 -05:00
Ben Marsh
235eb77726 Change to structured logging in other AutomationTool projects.
#preflight 6408c4478c0039bbf750e861

[CL 24562553 by Ben Marsh in ue5-main branch]
2023-03-08 12:43:35 -05:00
Ben Marsh
89d6613573 UAT: Refactor AutomationUtils and BuildGraph to use structured logging.
#preflight 6407c4c26e1dadfcdab25849

[CL 24553706 by Ben Marsh in ue5-main branch]
2023-03-07 21:23:47 -05:00
PJ Kack
b1764482c1 UAT: Make sure to use the specified unreal executable instead of a hard coded development one when launching the cook on the fly server.
Fix bug where quick launching with cotf from a debug editor failed to launch the cook server due to a missing or old development editor executable.
Since the default executable is the the console -cmd.exe one, implement ShellExecute to open a separate shell for the server output, also fixes duplicated stdout lines in that window.
Improve BuildCookRun log messages for booting and shutting down server and client.

#jira UE-173897, UEENGQA-80955
#rb carlmagnus.nordin
#preflight 63ca9499c503023ab986b09c

[CL 23788926 by PJ Kack in ue5-main branch]
2023-01-20 08:38:42 -05:00
Wojciech Krywult
40dd5fd65a Automation: Added an option to CommandUtils.Run to correctly deal with tools writing wide-char text to the standard output.
While the command prompt always shows such text correctly, the issue becomes apparent when redirecting the output to a file as text would appear as:

T h i s   i s   s o m e   u n i c o d e   o u t p u t

#preflight 637f90c6f514e1ded9cad139
#rb David.Harvey
#rnx

[CL 23260393 by Wojciech Krywult in ue5-main branch]
2022-11-24 11:24:37 -05:00
josh adams
30245001cf - Change Mac to use "dotnet msbuild" to compile C# programs with, instead of msbuild - dotnet is shipped with the engine so is always there. This is to fix builders building with xbuild which is deprecated and going away
- Removed unused MobileDeviceInterface
#jira UE-164616
#rb adam.kinge
#preflight 6352ccfee6096564af79599f

[CL 22693841 by josh adams in ue5-main branch]
2022-10-21 13:25:02 -04:00
ryan hummer
a03ed3200f Adding an option to serialize output to a file instead of converting a StringBuilder to a string.
#rnx
#jira UE-166134
#rb none
#preflight 63445de9e166160bb56d80e8

[CL 22470518 by ryan hummer in ue5-main branch]
2022-10-11 20:55:38 -04:00
jonathan adamczewski
b6ac2aa225 BuildGraph: RunUAT via dotnet & AutomationTool.dll
#jira none
#rnx
#preflight 6259f6a7016074c111fa3d39

[CL 19778495 by jonathan adamczewski in ue5-main branch]
2022-04-15 19:03:08 -04:00
PJ Kack
640a176fd5 UAT: Ctrl-c exit fixes.
In ProcessManager.KillAll() make a local copy of global ActiveProcesses and to avoid calling any external code while iterating the internal global list.
In ProcessResult.StopProcess() make sure to set the ExitCode member from the killed process, else the information is lost forever since the member Proc has already been nulled out.
In CommandUtils.Run() check Result.ProcessObject for null for the case when WaitForExit() returns after StopProcess() has been called from another thread (ctrl-c handler).

#jira none
#rb carlmagnus.nordin
#rnx
#preflight 62441c4dc667881bf4e70722

[CL 19570185 by PJ Kack in ue5-main branch]
2022-03-31 03:25:13 -04:00
PJ Kack
68a9307bf1 UAT: Fix problem of waiting forever to kill client or cook server process when launching with -cookonthefly.
Optimize StopProcess() when called with KillDescendants=true by using the standard Process.Kill(bool entireProcessTree) instead of our own slow KillAllDescendants() implementation.
Kill entire process trees when killing the launched processes from KillAll on uat exit.
Build machines will still call KillAllDescendants as the last fallback just as before.

#jira none
#rb carlmagnus.nordin
#rnx
#preflight 62304a9510686369534217ce

[CL 19383104 by PJ Kack in ue5-main branch]
2022-03-15 04:52:57 -04:00
PJ Kack
72b00cd645 UAT: Don't wait for 2 minutes for output handles to close for processes that does not redirect StdOut/StdErr at all (e.g. by calling Run with Options=ERunOptions.NoStdOutRedirect).
Give ERunOptions.NoStdOutCapture a unique value so that Options.HasFlag(ERunOptions.NoStdOutCapture) returns the expected result.

#jira none
#rb carlmagnus.nordin
#rnx
#preflight 6229dbc7377a9e55bac9ec3a

[CL 19334901 by PJ Kack in ue5-main branch]
2022-03-10 08:46:13 -05:00
aurel cordonnier
34f55d3a4a Merge from Release-Engine-Test @ 17946149 to UE5/Main
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17949667 by aurel cordonnier in ue5-main branch]
2021-10-27 15:14:40 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
jonathan adamczewski
55f53bcc8b ExitCode:
Move enum from AutomationUtils.Automation to BuildUtilities

#jira none
#trivial
#preflight 60ca8a3d78c3b00001f86b24

#ROBOMERGE-SOURCE: CL 16701095 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16701097 by jonathan adamczewski in ue5-release-engine-test branch]
2021-06-17 01:49:34 -04:00
ben marsh
06cca0e4c1 BuildGraph: Add support for passing text files containing environment variables into AWS, Docker, Helm and Spawn tasks. Also add an Aws-AssumeRole task which can assume a role and write a new list of environment variables.
#ROBOMERGE-SOURCE: CL 16341432 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16341434 by ben marsh in ue5-release-engine-test branch]
2021-05-15 12:49:14 -04:00
Ben Marsh
ea34b09df3 BuildGraph: Add tasks for running Git and Docker, and add support for deleting directories from <Delete> tasks.
[CL 16144334 by Ben Marsh in ue5-main branch]
2021-04-28 11:27:19 -04:00
Ben Marsh
89691e43c6 Make LogIndentScope independent of the logger being used. Any loggers that want to use this state for additional formatting can do so with an enricher.
#rb none
#rnx

[CL 14967662 by Ben Marsh in ue5-main branch]
2020-12-28 17:45:35 -04:00
Ben Marsh
6f927647b1 Changing C# code over to using EpicGames.Core over DotNETCommon.
#rb none
#rnx

[CL 14962096 by Ben Marsh in ue5-main branch]
2020-12-21 23:07:37 -04:00
Joakim Lindqvist
e7039d3d35 UBT and UAT now use .NET Core instead of Framework and Mono. This means that we use the same runtime on Windows, Linux and Mac. Further benefits including newer C# features and a lot of intresting features for the future around AOT and Tiered compilation.
Some behavior changes:
Output paths - Both tools are now output to a subdirectory of Binaries/Dotnet, I believe most hardcoded paths have been fixed up but there may be tools that will fail because of this.
UAT Plugin Building - As .NET Core does not support AppDomain unloading, how we build the plugins has changed quite a bit, these are now built before UAT is started rather then by UAT itself. If you just start UAT via RunUAT.bat/sh this should just continue to work.

#rb ben.marsh

[CL 14834347 by Joakim Lindqvist in ue5-main branch]
2020-12-02 06:57:13 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
Ryan Durand
9ef3748747 Updating copyrights for Engine Programs.
#rnx
#rb none
#jira none

#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869242 in //Fortnite/Release-12.00/... via CL 10869536
#ROBOMERGE-BOT: FORTNITE (Main -> Dev-EngineMerge) (v613-10869866)

[CL 10870955 by Ryan Durand in Main branch]
2019-12-26 23:01:54 -05:00
Ben Marsh
3cf7fb39fc Remove #region blocks.
#rb none
#rnx

[CL 8676383 by Ben Marsh in Dev-Build branch]
2019-09-13 14:02:02 -04:00