[Helix] Capture more output/errors in test runner (#20919)
This commit is contained in:
parent
01ca6a74ca
commit
f3c2c1c5b3
|
|
@ -98,7 +98,7 @@ namespace RunTests
|
|||
Console.WriteLine($"'{process.StartInfo.FileName} {process.StartInfo.Arguments}' completed with exit code '{process.ExitCode}'");
|
||||
if (throwOnError && process.ExitCode != 0)
|
||||
{
|
||||
processLifetimeTask.TrySetException(new InvalidOperationException($"Command {filename} {arguments} returned exit code {process.ExitCode}"));
|
||||
processLifetimeTask.TrySetException(new InvalidOperationException($"Command {filename} {arguments} returned exit code {process.ExitCode} output: {outputBuilder.ToString()}"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -120,22 +120,28 @@ namespace RunTests
|
|||
|
||||
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
|
||||
$"nuget add source {Options.HELIX_WORKITEM_ROOT} --configfile NuGet.config",
|
||||
environmentVariables: EnvironmentVariables);
|
||||
environmentVariables: EnvironmentVariables,
|
||||
outputDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.Error.WriteLine);
|
||||
|
||||
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
|
||||
"nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --configfile NuGet.config",
|
||||
environmentVariables: EnvironmentVariables);
|
||||
environmentVariables: EnvironmentVariables,
|
||||
outputDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.Error.WriteLine);
|
||||
|
||||
// Write nuget sources to console, useful for debugging purposes
|
||||
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
|
||||
"nuget list source",
|
||||
environmentVariables: EnvironmentVariables,
|
||||
outputDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.WriteLine);
|
||||
errorDataReceived: Console.Error.WriteLine);
|
||||
|
||||
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
|
||||
$"tool install dotnet-ef --global --version {Options.EfVersion}",
|
||||
environmentVariables: EnvironmentVariables);
|
||||
environmentVariables: EnvironmentVariables,
|
||||
outputDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.Error.WriteLine);
|
||||
|
||||
// ';' is the path separator on Windows, and ':' on Unix
|
||||
Options.Path += RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ";" : ":";
|
||||
|
|
@ -219,7 +225,7 @@ namespace RunTests
|
|||
commonTestArgs + " --TestCaseFilter:\"Quarantined=true\"",
|
||||
environmentVariables: EnvironmentVariables,
|
||||
outputDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.Error.WriteLine,
|
||||
throwOnError: false);
|
||||
|
||||
if (result.ExitCode != 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue