Skip to content

Commit 94ab8ac

Browse files
committed
Merge remote-tracking branch 'origin/main' into microbuild
2 parents 961b025 + c3644df commit 94ab8ac

4 files changed

Lines changed: 40 additions & 23 deletions

File tree

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"rollForward": false
1111
},
1212
"dotnet-coverage": {
13-
"version": "18.1.0",
13+
"version": "18.3.1",
1414
"commands": [
1515
"dotnet-coverage"
1616
],
@@ -38,4 +38,4 @@
3838
"rollForward": false
3939
}
4040
}
41-
}
41+
}

.github/actions/publish-artifacts/action.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,46 @@ runs:
1414

1515
- name: 📢 Upload project.assets.json files
1616
if: always()
17-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
17+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
1818
with:
1919
name: projectAssetsJson-${{ runner.os }}
2020
path: ${{ runner.temp }}/_artifacts/projectAssetsJson
2121
continue-on-error: true
2222
- name: 📢 Upload variables
23-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
23+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
2424
with:
2525
name: variables-${{ runner.os }}
2626
path: ${{ runner.temp }}/_artifacts/Variables
2727
continue-on-error: true
2828
- name: 📢 Upload build_logs
2929
if: always()
30-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
30+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
3131
with:
3232
name: build_logs-${{ runner.os }}
3333
path: ${{ runner.temp }}/_artifacts/build_logs
3434
continue-on-error: true
3535
- name: 📢 Upload testResults
3636
if: always()
37-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
37+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
3838
with:
3939
name: testResults-${{ runner.os }}
4040
path: ${{ runner.temp }}/_artifacts/testResults
4141
continue-on-error: true
4242
- name: 📢 Upload coverageResults
4343
if: always()
44-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
44+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
4545
with:
4646
name: coverageResults-${{ runner.os }}
4747
path: ${{ runner.temp }}/_artifacts/coverageResults
4848
continue-on-error: true
4949
- name: 📢 Upload symbols
50-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
50+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
5151
with:
5252
name: symbols-${{ runner.os }}
5353
path: ${{ runner.temp }}/_artifacts/symbols
5454
continue-on-error: true
5555
- name: 📢 Upload deployables
56-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
56+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
5757
with:
5858
name: deployables-${{ runner.os }}
5959
path: ${{ runner.temp }}/_artifacts/deployables

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<!-- Put repo-specific PackageVersion items in this group. -->
1313
</ItemGroup>
1414
<ItemGroup Label="Library.Template">
15-
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
15+
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.3.1" />
1616
<PackageVersion Include="Microsoft.Testing.Extensions.CrashDump" Version="$(MicrosoftTestingPlatformVersion)" />
1717
<PackageVersion Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingPlatformVersion)" />
1818
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="$(MicrosoftTestingPlatformVersion)" />

tools/dotnet-test-cloud.ps1

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,37 @@ $testLogs = Join-Path $ArtifactStagingFolder test_logs
5050

5151
$globalJson = Get-Content $PSScriptRoot/../global.json | ConvertFrom-Json
5252
$isMTP = $globalJson.test.runner -eq 'Microsoft.Testing.Platform'
53+
$extraArgs = @()
54+
$failedTests = 0
55+
5356
if ($isMTP) {
54-
$extraArgs = @()
5557
if ($OnCI) { $extraArgs += '--no-progress' }
58+
59+
$dumpSwitches = @(
60+
,'--hangdump'
61+
,'--hangdump-timeout','120s'
62+
,'--crashdump'
63+
)
64+
$mtpArgs = @(
65+
,'--coverage'
66+
,'--coverage-output-format','cobertura'
67+
,'--diagnostic'
68+
,'--diagnostic-output-directory',$testLogs
69+
,'--diagnostic-verbosity','Information'
70+
,'--results-directory',$testLogs
71+
,'--report-trx'
72+
)
73+
5674
& $dotnet test --solution $RepoRoot `
5775
--no-build `
5876
-c $Configuration `
5977
-bl:"$testBinLog" `
6078
--filter-not-trait 'TestCategory=FailsInCloudTest' `
61-
--coverage `
62-
--coverage-output-format cobertura `
6379
--coverage-settings "$PSScriptRoot/test.runsettings" `
64-
--hangdump `
65-
--hangdump-timeout 60s `
66-
--crashdump `
67-
--diagnostic `
68-
--diagnostic-output-directory $testLogs `
69-
--diagnostic-verbosity Information `
70-
--results-directory $testLogs `
71-
--report-trx `
80+
@mtpArgs `
81+
@dumpSwitches `
7282
@extraArgs
83+
if ($LASTEXITCODE -ne 0) { $failedTests += 1 }
7384

7485
$trxFiles = Get-ChildItem -Recurse -Path $testLogs\*.trx
7586
} else {
@@ -84,15 +95,17 @@ if ($isMTP) {
8495
--blame-crash `
8596
-bl:"$testBinLog" `
8697
--diag "$testDiagLog;TraceLevel=info" `
87-
--logger trx
98+
--logger trx `
99+
@extraArgs
100+
if ($LASTEXITCODE -ne 0) { $failedTests += 1 }
88101

89102
$trxFiles = Get-ChildItem -Recurse -Path $RepoRoot\test\*.trx
90103
}
91104

92105
$unknownCounter = 0
93106
$trxFiles |% {
94107
New-Item $testLogs -ItemType Directory -Force | Out-Null
95-
if (!($_.FullName.StartsWith($testLogs))) {
108+
if (!($_.FullName.StartsWith($testLogs, [StringComparison]::OrdinalIgnoreCase))) {
96109
Copy-Item $_ -Destination $testLogs
97110
}
98111

@@ -117,3 +130,7 @@ $trxFiles |% {
117130
Write-Host "##vso[results.publish type=VSTest;runTitle=$runTitle;publishRunAttachments=true;resultFiles=$_;failTaskOnFailedTests=true;testRunSystem=VSTS - PTR;]"
118131
}
119132
}
133+
134+
if ($failedTests -ne 0) {
135+
exit $failedTests
136+
}

0 commit comments

Comments
 (0)