From 48f8c8ceb0846ea0453481679eebdc56c4968722 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Mon, 14 Nov 2022 10:46:24 -0700 Subject: [PATCH] run tests one assembly at a time --- azure-pipelines.yml | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d66ad08bb2..0a05c562e9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -278,11 +278,40 @@ stages: DOTNET_INTERACTIVE_FRONTEND_NAME: CI - pwsh: | - for ($i=1; $i -le 5; $i++) { - Write-Host "Running tests, attempt $i" - dotnet test -l trx --no-build --blame-hang-timeout 15m --blame-hang-dump-type full --blame-crash -c $env:BUILDCONFIG --results-directory $env:BUILDSOURCESDIRECTORY/artifacts/TestResults/$env:BUILDCONFIG - if ($LASTEXITCODE -eq 0) { - break + $normalTestAssemblies = @( + "Microsoft.DotNet.Interactive.ApiCompatibility.Tests", + "Microsoft.DotNet.Interactive.AspNetCore.Tests", + "Microsoft.DotNet.Interactive.Browser.Tests", + "Microsoft.DotNet.Interactive.CSharp.Tests", + "Microsoft.DotNet.Interactive.CSharpProject.Tests", + "Microsoft.DotNet.Interactive.Documents.Tests", + "Microsoft.DotNet.Interactive.ExtensionLab.Tests", + "Microsoft.DotNet.Interactive.FSharp.Tests", + "Microsoft.DotNet.Interactive.Formatting.Tests", + "Microsoft.DotNet.Interactive.Journey.Tests", + "Microsoft.DotNet.Interactive.Jupyter.Tests", + "Microsoft.DotNet.Interactive.Kql.Tests", + "Microsoft.DotNet.Interactive.Mermaid.Tests", + "Microsoft.DotNet.Interactive.PowerShell.Tests", + "Microsoft.DotNet.Interactive.SqlServer.Tests", + "Microsoft.DotNet.Interactive.Telemetry.Tests", + "dotnet-interactive.Tests", + # + # this one frequently crashes + # + "Microsoft.DotNet.Interactive.Tests" + ) + foreach ($testAssembly in $normalTestAssemblies) { + Write-Host "Testing assembly $testAssembly" + for ($i=1; $i -le 5; $i++) { + Write-Host "Running attempt $i" + dotnet test $env:BUILDSOURCESDIRECTORY/src/$testAssembly/ -l trx --no-build --blame-hang-timeout 15m --blame-hang-dump-type full --blame-crash -c $env:BUILDCONFIG --results-directory $env:BUILDSOURCESDIRECTORY/artifacts/TestResults/$env:BUILDCONFIG + if ($LASTEXITCODE -eq 0) { + break + } + } + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE } } exit $LASTEXITCODE