-
Notifications
You must be signed in to change notification settings - Fork 61
/
coverage.ps1
29 lines (22 loc) · 1018 Bytes
/
coverage.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$outputDir = ".\tmp"
if (!(Test-Path $outputDir))
{
New-Item -ItemType Directory -Path $outputDir
}
# OpenCover
$openCover = ".\packages\OpenCover.4.5.3207\OpenCover.Console.exe"
$testlib = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe"
$testdll = ".\src\IF.Lastfm.Core.Tests\bin\Debug\IF.Lastfm.Core.Tests.dll"
$integrationTestDll = ".\src\IF.Lastfm.Core.Tests.Integration\bin\Debug\IF.Lastfm.Core.Tests.Integration.dll"
$testargs = "/testcontainer:$testdll /testcontainer:$integrationTestDll "
$output = "$outputDir\coverage.xml"
$openCoverCommand = "$openCover -register:user -mergebyhash `"-target:$testlib`" `"-targetargs:$testargs`" -output:$output"
# ReportGenerator
$repgen = ".\packages\ReportGenerator.2.0.1.0\ReportGenerator.exe"
$reportOutputDir = "$outputDir\report"
$repgenCommand = "$repgen -reports:`"$output`" -targetDir:`"$reportOutputDir`""
# --------
echo "Running OpenCover...\n"
iex $openCoverCommand
echo "\nGenerating report... \n"
iex $repgenCommand