Updated repo.targets to run only E2ETests when nano node is run

This commit is contained in:
Kiran Challa 2017-05-03 23:08:10 -07:00
parent 670ad82d5b
commit a658915842
1 changed files with 12 additions and 4 deletions

View File

@ -1,7 +1,15 @@
<Project>
<Target Name="_RunNanoTests" DependsOnTargets="Restore" Condition="'$(RUN_TESTS_ON_NANO)' == 'true'">
<MSBuild Targets="VSTest"
Projects="$(MSBuildThisFileDirectory)..\test\MusicStore.E2ETests\MusicStore.E2ETests.csproj"
Properties="Configuration=$(Configuration);VSTestLogger=trx;VSTestTestCaseFilter=E2ETests=NanoServer" />
<PropertyGroup>
<MusicStoreE2ETestProject>$(RepositoryRoot)test\MusicStore.E2ETests\MusicStore.E2ETests.csproj</MusicStoreE2ETestProject>
</PropertyGroup>
<Target Name="_FilterTestProjects" BeforeTargets="TestProjects" Condition="'$(VSTestTestCaseFilter)'=='E2Etests=NanoServer'">
<ItemGroup>
<ProjectsToTest Remove="@(ProjectsToTest)" />
<ProjectsToTest Include="$(MusicStoreE2ETestProject)" />
</ItemGroup>
<Error Text="Could not find test projects to run" Condition="@(ProjectsToTest->Count()) == 0" />
</Target>
</Project>