Skip to content

Commit

Permalink
Opencover and Code coverage improvements (PowerShell#4550)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapatwardhan authored and daxian-dbw committed Aug 14, 2017
1 parent 7b8c6e7 commit b953ab1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ $jsonFile = "$outputBaseFolder\CC.json"

try
{
## This is required so we do not keep on merging coverage reports.
if(Test-Path $outputLog)
{
Remove-Item $outputLog -Force -ErrorAction SilentlyContinue
}

$oldErrorActionPreference = $ErrorActionPreference
$ErrorActionPreference = 'Stop'
Write-LogPassThru -Message "Starting downloads."
Expand Down Expand Up @@ -264,9 +270,5 @@ finally

## Disable the cleanup till we stabilize.
#Remove-Item -recurse -force -path $outputBaseFolder

## This is required so we do not keep on merging coverage reports.
Remove-Item $outputLog -Force -ErrorAction SilentlyContinue

$ErrorActionPreference = $oldErrorActionPreference
}
2 changes: 1 addition & 1 deletion test/tools/OpenCover/OpenCover.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ function CreateOpenCoverCmdline($target, $outputLog, $targetArgs)
"-hideskipped:all",
"-mergeoutput",
"-filter:`"+[*]* -[Microsoft.PowerShell.PSReadLine]*`"",
"-targetargs:`"-EncodedCommand $base64targetArgs`""
"-targetargs:`"-NoProfile -EncodedCommand $base64targetArgs`""

$cmdlineAsString = $cmdline -join " "

Expand Down

0 comments on commit b953ab1

Please sign in to comment.