-
Notifications
You must be signed in to change notification settings - Fork 26
/
tests.proj
33 lines (26 loc) · 1.53 KB
/
tests.proj
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Tests" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="nunit-utils.targets"/>
<Target Name="Tests">
<MSBuild Projects="tests.proj" Targets="IntegrationTests"/>
<MSBuild Projects="tests.proj" Targets="IntegrationTests" Properties="DefineConstants=x86"/>
</Target>
<Target Name="IntegrationTests">
<MSBuild Projects="JetBrains.runAs.IntegrationTests\JetBrains.runAs.IntegrationTests.csproj" Targets="Rebuild" Properties="Configuration=Release;Platform=AnyCPU"/>
<GetNUnitConsolePath BaseDir="$(MSBuildProjectDirectory)\packages">
<Output TaskParameter="PathToNUnitConsole" ItemName="pathToNUnitConsole"/>
</GetNUnitConsolePath>
<Message Text="Path of NUnit console: @(pathToNUnitConsole)" Importance="high"/>
<ItemGroup>
<Assemblies Include="bin\IntegrationTests\Release\JetBrains.runAs.IntegrationTests.dll"/>
</ItemGroup>
<CreateNUnitListOfAssemblies Assemblies="@(Assemblies)" RegexpAssemblyFilter=".*Tests.dll$">
<Output TaskParameter="ListOfAssemblies" ItemName="listOfAssemblies"/>
</CreateNUnitListOfAssemblies>
<Message Text="The list of assemblies: @(listOfAssemblies)" Importance="high"/>
<Exec IgnoreExitCode="True" Command="@(pathToNUnitConsole) @(listOfAssemblies) --noresult --noheader" IgnoreStandardErrorWarningFormat="true">
<Output TaskParameter="ExitCode" ItemName="exitCode"/>
</Exec>
<Error Text="Error while running tests" Condition="@(exitCode) < 0" />
</Target>
</Project>