Skip to content

Commit

Permalink
run tests one assembly at a time
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Nov 14, 2022
1 parent 4ecc06e commit 48f8c8c
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48f8c8c

Please sign in to comment.