Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit a25fc5c

Browse files
Being more detailed about the captured error
1 parent 7c464c4 commit a25fc5c

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

scripts/Run-CodeCoverage.ps1

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,37 @@ $opencoverArgs = @(
4444
"-register:user -output:$rootDirectory\coverage.xml"
4545
) -join " "
4646

47-
$codecovDirectory = Join-Path $env:USERPROFILE .nuget\packages\Codecov\1.1.0\tools
47+
$codecovDirectory = Join-Path $env:USERPROFILE .nuget\packages\codecov\1.1.0\tools
4848
$codecov = Join-Path $codecovDirectory codecov.exe
4949
$codecovArgs = "-f $rootDirectory\coverage.xml"
5050

5151
& {
5252
Trap {
53-
Write-Output "Code coverage failed"
53+
Write-Output "OpenCover trapped"
5454
exit 0
5555
}
5656

5757
Run-Process 600 $opencover $opencoverArgs
5858

59-
if($AppVeyor) {
59+
if (!$?) {
60+
Write-Output "OpenCover failed"
61+
exit 0
62+
}
63+
}
64+
65+
if($AppVeyor) {
66+
& {
67+
Trap {
68+
Write-Output "Codecov trapped"
69+
exit 0
70+
}
71+
6072
Push-AppveyorArtifact "$rootDirectory\coverage.xml"
6173
Run-Process 300 $codecov $codecovArgs
62-
}
6374

64-
if (!$?) {
65-
Write-Output "Code coverage failed"
66-
exit 0
75+
if (!$?) {
76+
Write-Output "Codecov failed"
77+
exit 0
78+
}
6779
}
6880
}

0 commit comments

Comments
 (0)