forked from yanhamu/Gnome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.bat
42 lines (33 loc) · 1.09 KB
/
test.bat
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
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
nuget install -Verbosity quiet -OutputDirectory packages -Version 4.6.519 OpenCover
nuget install -Verbosity quiet -OutputDirectory packages -Version 3.0.2 ReportGenerator
set OPENCOVER=%cd%/packages/OpenCover.4.6.519/tools/OpenCover.Console.exe
set REPORTGENERATOR=%cd%/packages/ReportGenerator.3.0.2/tools/ReportGenerator.exe
set CONFIG=Debug
set DOTNET_BUILD_ARGS=-c %CONFIG%
set DOTNET_TEST_ARGS=%DOTNET_BUILD_ARGS%
echo CLI args: %DOTNET_BUILD_ARGS%
echo Restoring
dotnet restore
echo Building
dotnet build %DOTNET_BUILD_ARGS%
echo Testing
set coverage=coverage
rmdir %coverage% /S /Q
mkdir %coverage%
echo Calculating coverage with OpenCover
%OPENCOVER% ^
-target:"c:\Program Files\dotnet\dotnet.exe" ^
-targetargs:"test -f netcoreapp2.0 %DOTNET_TEST_ARGS%" ^
-mergeoutput ^
-hideskipped:File ^
-output:%coverage%/coverage.xml ^
-oldStyle ^
-filter:"+[Gnome*]* -[*Tests]*" ^
-searchdirs:%testdir%/bin/%CONFIG%/netcoreapp2.0 ^
-register:user
echo Generating HTML report
%REPORTGENERATOR% ^
-reports:%coverage%/coverage.xml ^
-targetdir:%coverage% ^
-verbosity:Error