You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
BuildGraph: Reformat output from Docker to allow regular pattern matchers to work correctly, and add an MSTest event matcher.
#preflight none [CL 20580176 by Ben Marsh in ue5-main branch]
This commit is contained in:
@@ -10,6 +10,7 @@ using System.Xml;
|
||||
using AutomationTool;
|
||||
using UnrealBuildBase;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace AutomationTool.Tasks
|
||||
{
|
||||
@@ -172,10 +173,14 @@ namespace AutomationTool.Tasks
|
||||
}
|
||||
|
||||
string WorkingDir = isStagingEnabled ? StagingDir.FullName : BaseDir.FullName;
|
||||
await SpawnTaskBase.ExecuteAsync("docker", Arguments.ToString(), EnvVars: EnvVars, WorkingDir: WorkingDir);
|
||||
await SpawnTaskBase.ExecuteAsync("docker", Arguments.ToString(), EnvVars: EnvVars, WorkingDir: WorkingDir, SpewFilterCallback: FilterOutput);
|
||||
}
|
||||
}
|
||||
|
||||
static Regex FilterOutputPattern = new Regex(@"^#\d+ (?:\d+\.\d+ )?");
|
||||
|
||||
static string FilterOutput(string Line) => FilterOutputPattern.Replace(Line, "");
|
||||
|
||||
/// <summary>
|
||||
/// Output this task out to an XML writer.
|
||||
/// </summary>
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace AutomationTool.Tasks
|
||||
/// <summary>
|
||||
/// Execute a command
|
||||
/// </summary>
|
||||
protected static Task<IProcessResult> ExecuteAsync(string Exe, string Arguments, string WorkingDir = null, Dictionary<string, string> EnvVars = null, bool LogOutput = true, int ErrorLevel = 1, string Input = null)
|
||||
protected static Task<IProcessResult> ExecuteAsync(string Exe, string Arguments, string WorkingDir = null, Dictionary<string, string> EnvVars = null, bool LogOutput = true, int ErrorLevel = 1, string Input = null, ProcessResult.SpewFilterCallbackType SpewFilterCallback = null)
|
||||
{
|
||||
if (WorkingDir != null)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ namespace AutomationTool.Tasks
|
||||
Options &= ~CommandUtils.ERunOptions.AllowSpew;
|
||||
}
|
||||
|
||||
IProcessResult Result = CommandUtils.Run(Exe, Arguments, Env: EnvVars, WorkingDir: WorkingDir, Options: Options, Input: Input);
|
||||
IProcessResult Result = CommandUtils.Run(Exe, Arguments, Env: EnvVars, WorkingDir: WorkingDir, Options: Options, Input: Input, SpewFilterCallback: SpewFilterCallback);
|
||||
if (Result.ExitCode < 0 || Result.ExitCode >= ErrorLevel)
|
||||
{
|
||||
throw new AutomationException("{0} terminated with an exit code indicating an error ({1})", Path.GetFileName(Exe), Result.ExitCode);
|
||||
|
||||
Reference in New Issue
Block a user