diff --git a/eng/helix/content/RunTests/Program.cs b/eng/helix/content/RunTests/Program.cs index ab753f4381..349ab29b8a 100644 --- a/eng/helix/content/RunTests/Program.cs +++ b/eng/helix/content/RunTests/Program.cs @@ -16,6 +16,10 @@ namespace RunTests var keepGoing = runner.SetupEnvironment(); if (keepGoing) + { + keepGoing = await runner.InstallDotnetDump(); + } + if (keepGoing) { keepGoing = await runner.InstallAspNetAppIfNeededAsync(); } @@ -23,10 +27,6 @@ namespace RunTests { keepGoing = runner.InstallAspNetRefIfNeeded(); } - if (keepGoing) - { - keepGoing = await runner.InstallDotnetDump(); - } runner.DisplayContents(); diff --git a/eng/helix/content/RunTests/TestRunner.cs b/eng/helix/content/RunTests/TestRunner.cs index 921686ffb1..a5e64c947f 100644 --- a/eng/helix/content/RunTests/TestRunner.cs +++ b/eng/helix/content/RunTests/TestRunner.cs @@ -123,14 +123,16 @@ namespace RunTests environmentVariables: EnvironmentVariables, outputDataReceived: Console.WriteLine, errorDataReceived: Console.Error.WriteLine, - throwOnError: false); + throwOnError: false, + cancellationToken: new CancellationTokenSource(TimeSpan.FromMinutes(2)).Token); 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, outputDataReceived: Console.WriteLine, errorDataReceived: Console.Error.WriteLine, - throwOnError: false); + throwOnError: false, + cancellationToken: new CancellationTokenSource(TimeSpan.FromMinutes(2)).Token); // Write nuget sources to console, useful for debugging purposes await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet", @@ -138,14 +140,16 @@ namespace RunTests environmentVariables: EnvironmentVariables, outputDataReceived: Console.WriteLine, errorDataReceived: Console.Error.WriteLine, - throwOnError: false); + throwOnError: false, + cancellationToken: new CancellationTokenSource(TimeSpan.FromMinutes(2)).Token); await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet", $"tool install dotnet-ef --version {Options.EfVersion} --tool-path {Options.HELIX_WORKITEM_ROOT}", environmentVariables: EnvironmentVariables, outputDataReceived: Console.WriteLine, errorDataReceived: Console.Error.WriteLine, - throwOnError: false); + throwOnError: false, + cancellationToken: new CancellationTokenSource(TimeSpan.FromMinutes(2)).Token); // ';' is the path separator on Windows, and ':' on Unix Options.Path += RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ";" : ":";