22 [switch ]$Debug ,
33 [switch ]$NoBuild ,
44 [switch ]$NoReport ,
5- [switch ]$AppVeyor
5+ [switch ]$AppVeyor ,
6+ [switch ]$Azure
67)
78
89If (-not $NoBuild ) {
@@ -51,6 +52,8 @@ $register_mode = 'user'
5152If ($AppVeyor ) {
5253 $AppVeyorArg = ' -appveyor'
5354 $register_mode = ' Path32'
55+ } ElseIf ($Azure ) {
56+ $register_mode = ' Path32'
5457}
5558
5659& $opencover_console `
@@ -63,9 +66,9 @@ If ($AppVeyor) {
6366 - excludebyfile:* \* Designer.cs `
6467 - output:" $report_folder \OpenCover.StyleCopAnalyzers.xml" `
6568 - target:" $xunit_runner_console_net452 " `
66- - targetargs:" $target_dll -noshadow $AppVeyorArg "
69+ - targetargs:" $target_dll -noshadow $AppVeyorArg -xml StyleCopAnalyzers.xunit.xml "
6770
68- If ($AppVeyor -and -not $? ) {
71+ If (( $AppVeyor -or $Azure ) -and -not $? ) {
6972 $host.UI.WriteErrorLine (' Build failed; coverage analysis aborted.' )
7073 Exit $LASTEXITCODE
7174}
@@ -81,9 +84,9 @@ If ($AppVeyor -and -not $?) {
8184 - output:" $report_folder \OpenCover.StyleCopAnalyzers.xml" `
8285 - mergebyhash - mergeoutput `
8386 - target:" $xunit_runner_console_net46 " `
84- - targetargs:" $target_dll_csharp7 -noshadow $AppVeyorArg "
87+ - targetargs:" $target_dll_csharp7 -noshadow $AppVeyorArg -xml StyleCopAnalyzers.CSharp7.xunit.xml "
8588
86- If ($AppVeyor -and -not $? ) {
89+ If (( $AppVeyor -or $Azure ) -and -not $? ) {
8790 $host.UI.WriteErrorLine (' Build failed; coverage analysis aborted.' )
8891 Exit $LASTEXITCODE
8992}
@@ -99,9 +102,9 @@ If ($AppVeyor -and -not $?) {
99102 - output:" $report_folder \OpenCover.StyleCopAnalyzers.xml" `
100103 - mergebyhash - mergeoutput `
101104 - target:" $xunit_runner_console_net472 " `
102- - targetargs:" $target_dll_csharp8 -noshadow $AppVeyorArg "
105+ - targetargs:" $target_dll_csharp8 -noshadow $AppVeyorArg -xml StyleCopAnalyzers.CSharp8.xunit.xml "
103106
104- If ($AppVeyor -and -not $? ) {
107+ If (( $AppVeyor -or $Azure ) -and -not $? ) {
105108 $host.UI.WriteErrorLine (' Build failed; coverage analysis aborted.' )
106109 Exit $LASTEXITCODE
107110}
0 commit comments