/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
eng/tools/HelixTestRunner/Program.cs
70 строк
2 KB
Matt Mitchell
Batch small Helix work items to reduce per-item overhead (-53% compute) (#66808)
19 июн 2026, 01:03
Не верифицирован
19 июн 2026, 01:03
a097744
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Globalization; using System.Threading.Tasks; namespace HelixTestRunner; class Program { static async Task Main(string[] args) { try { var options = HelixTestRunnerOptions.Parse(args); var runner = new TestRunner(options); ProcessUtil.PrintMessage($"Configured {runner.Options.Targets.Length} test assembly(ies)."); var keepGoing = runner.SetupEnvironment(); if (keepGoing) { keepGoing = await runner.InstallDotnetToolsAsync(); } if (keepGoing) { if (runner.Options.InstallPlaywright) { keepGoing = runner.InstallPlaywright(); } else { ProcessUtil.PrintMessage("Playwright install skipped."); } } runner.DisplayContents(); if (keepGoing) { if (!await runner.CheckTestDiscoveryAsync()) { ProcessUtil.PrintMessage("RunTest stopping due to test discovery failure."); Environment.Exit(1); return; } ProcessUtil.PrintMessage("Start running tests"); var exitCode = await runner.RunTestsAsync(); ProcessUtil.PrintMessage("Running tests complete"); ProcessUtil.PrintMessage("Uploading test results"); runner.UploadResults(); ProcessUtil.PrintMessage("Test results uploaded"); ProcessUtil.PrintMessage($"Completed Helix job with exit code '{exitCode}'"); Environment.Exit(exitCode); } ProcessUtil.PrintMessage("Tests were not run due to previous failures. Exit code=1"); Environment.Exit(1); } catch (Exception e) { ProcessUtil.PrintMessage($"HelixTestRunner uncaught exception: {e}"); Environment.Exit(1); } } }