Skip to content

Commit c53e6a3

Browse files
unknownunknown
authored andcommitted
Add code coverage task for Compute
1 parent f1df146 commit c53e6a3

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

AzurePowershell.Test.targets

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,16 @@
400400
ContinueOnError="false" />
401401
</Target>
402402

403+
<Target Name="ComputeCodeCoverage" DependsOnTargets="ForceRestorePackages;Clean;BuildDebug">
404+
<Message Importance="high" Text="Gathering Code Coverage data from Compute tests..." />
405+
<Delete Files="Project.covarage" />
406+
<Exec
407+
Command="pushd .\src\ResourceManager\Compute\Commands.Compute.Test\
408+
.\ComputeCodeCoverage.cmd
409+
popd"
410+
ContinueOnError="false" />
411+
</Target>
412+
403413
<!-- DSC extension related targets -->
404414
<Target Name="TestDSCExtension_x64">
405415
<Message Importance="high" Text="Running DSC extension BVT x64 tests..." />
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@echo off
2+
3+
set "ROOTDIR=..\..\..\..\"
4+
set "VSTOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\"
5+
6+
set "VSINSTR="%VSTOOLSDIR%vsinstr.exe""
7+
set "VSPERFCMD="%VSTOOLSDIR%VSPerfCmd.exe""
8+
set "RESULT="%ROOTDIR%Project.coverage""
9+
set "DLL="%ROOTDIR%src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.dll""
10+
set "TEST="%ROOTDIR%src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.Test.dll""
11+
set "XUNIT="%ROOTDIR%packages\xunit.runner.console.2.0.0\tools\xunit.console.x86.exe""
12+
13+
%VSINSTR% /COVERAGE %DLL%
14+
15+
%VSPERFCMD% /start:COVERAGE /OUTPUT:%RESULT%
16+
17+
%XUNIT% %TEST%
18+
19+
%VSPERFCMD% /SHUTDOWN

0 commit comments

Comments
 (0)