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,9 @@ $register_mode = 'user'
5152If ($AppVeyor ) {
5253 $AppVeyorArg = ' -appveyor'
5354 $register_mode = ' Path32'
55+ } ElseIf ($Azure ) {
56+ $AppVeyorArg = ' -vsts'
57+ $register_mode = ' Path32'
5458}
5559
5660& $opencover_console `
@@ -65,7 +69,7 @@ If ($AppVeyor) {
6569 - target:" $xunit_runner_console_net452 " `
6670 - targetargs:" $target_dll -noshadow $AppVeyorArg "
6771
68- If ($AppVeyor -and -not $? ) {
72+ If (( $AppVeyor -or $Azure ) -and -not $? ) {
6973 $host.UI.WriteErrorLine (' Build failed; coverage analysis aborted.' )
7074 Exit $LASTEXITCODE
7175}
@@ -83,7 +87,7 @@ If ($AppVeyor -and -not $?) {
8387 - target:" $xunit_runner_console_net46 " `
8488 - targetargs:" $target_dll_csharp7 -noshadow $AppVeyorArg "
8589
86- If ($AppVeyor -and -not $? ) {
90+ If (( $AppVeyor -or $Azure ) -and -not $? ) {
8791 $host.UI.WriteErrorLine (' Build failed; coverage analysis aborted.' )
8892 Exit $LASTEXITCODE
8993}
@@ -101,7 +105,7 @@ If ($AppVeyor -and -not $?) {
101105 - target:" $xunit_runner_console_net472 " `
102106 - targetargs:" $target_dll_csharp8 -noshadow $AppVeyorArg "
103107
104- If ($AppVeyor -and -not $? ) {
108+ If (( $AppVeyor -or $Azure ) -and -not $? ) {
105109 $host.UI.WriteErrorLine (' Build failed; coverage analysis aborted.' )
106110 Exit $LASTEXITCODE
107111}
0 commit comments