Skip to content

Commit 6eb15a3

Browse files
committed
Fix test results publishing
1 parent 33b6df9 commit 6eb15a3

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

azure-pipelines.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ jobs:
4747
filePath: build/opencover-report.ps1
4848
arguments: '$(_debugArg) -NoBuild -NoReport -Azure'
4949

50+
- task: PublishTestResults@2
51+
displayName: Publish test results
52+
inputs:
53+
testResultsFormat: xUnit
54+
testResultsFiles: 'build/*.xml'
55+
5056
- task: PublishBuildArtifacts@1
5157
displayName: Publish build logs
5258
inputs:

build/opencover-report.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ If ($AppVeyor) {
5353
$AppVeyorArg = '-appveyor'
5454
$register_mode = 'Path32'
5555
} ElseIf ($Azure) {
56-
$AppVeyorArg = '-vsts'
5756
$register_mode = 'Path32'
5857
}
5958

@@ -67,7 +66,7 @@ If ($AppVeyor) {
6766
-excludebyfile:*\*Designer.cs `
6867
-output:"$report_folder\OpenCover.StyleCopAnalyzers.xml" `
6968
-target:"$xunit_runner_console_net452" `
70-
-targetargs:"$target_dll -noshadow $AppVeyorArg"
69+
-targetargs:"$target_dll -noshadow $AppVeyorArg -xml StyleCopAnalyzers.xunit.xml"
7170

7271
If (($AppVeyor -or $Azure) -and -not $?) {
7372
$host.UI.WriteErrorLine('Build failed; coverage analysis aborted.')
@@ -85,7 +84,7 @@ If (($AppVeyor -or $Azure) -and -not $?) {
8584
-output:"$report_folder\OpenCover.StyleCopAnalyzers.xml" `
8685
-mergebyhash -mergeoutput `
8786
-target:"$xunit_runner_console_net46" `
88-
-targetargs:"$target_dll_csharp7 -noshadow $AppVeyorArg"
87+
-targetargs:"$target_dll_csharp7 -noshadow $AppVeyorArg -xml StyleCopAnalyzers.CSharp7.xunit.xml"
8988

9089
If (($AppVeyor -or $Azure) -and -not $?) {
9190
$host.UI.WriteErrorLine('Build failed; coverage analysis aborted.')
@@ -103,7 +102,7 @@ If (($AppVeyor -or $Azure) -and -not $?) {
103102
-output:"$report_folder\OpenCover.StyleCopAnalyzers.xml" `
104103
-mergebyhash -mergeoutput `
105104
-target:"$xunit_runner_console_net472" `
106-
-targetargs:"$target_dll_csharp8 -noshadow $AppVeyorArg"
105+
-targetargs:"$target_dll_csharp8 -noshadow $AppVeyorArg -xml StyleCopAnalyzers.CSharp8.xunit.xml"
107106

108107
If (($AppVeyor -or $Azure) -and -not $?) {
109108
$host.UI.WriteErrorLine('Build failed; coverage analysis aborted.')

0 commit comments

Comments
 (0)