dotnet-installer/build/test/TestAssetProjects.targets
Piotr Puszkiewicz a477fe7253 Incremental build of test projects (#3859)
* If restore incrementality fails, clean out all lock files to re-enable incrementality.

* Incremental build of TestProjects

* Remove reduntant build of test projects

* Fix CI

* Fix list of executable tests

* Msi tests on net46

* Path Separators

* PR Feedback

* Win Diag

* Let's try a hack!

* And another!

* Mor Diag

* McHack

* Slashety slash slash

* One more hack
2016-07-15 00:20:23 -07:00

60 lines
No EOL
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="SetupTestAssetProjectData"
DependsOnTargets="AssociateTestAssetInputFilesWithProject">
</Target>
<Target Name="AssociateTestAssetInputFilesWithProject"
DependsOnTargets="IdentifyTestAssetInputFilesForProject;"
Outputs="%(TestAssetProjects.ProjectPath)">
<PropertyGroup>
<CurrentProject>%(TestAssetProjects.ProjectPath)</CurrentProject>
</PropertyGroup>
<ItemGroup>
<TestAssetProjects Condition=" '%(ProjectPath)' == '$(CurrentProject)' ">
<BuildInputs>@(TestAssetProjectInputs)</BuildInputs>
</TestAssetProjects>
</ItemGroup>
</Target>
<Target Name="IdentifyTestAssetInputFilesForProject"
DependsOnTargets="SetupBuildTestAssetProjectInputs;"
Outputs="%(TestAssetProjects.ProjectPath)">
<ItemGroup>
<TestAssetProjectInputs Include="%(TestAssetProjects.BuildInputIncludeFilter)"
Exclude="%(TestAssetProjects.BuildInputExcludeFilter)">
<ProjectPath>%(TestAssetProjects.ProjectPath)</ProjectPath>
</TestAssetProjectInputs>
</ItemGroup>
</Target>
<Target Name="SetupBuildTestAssetProjectInputs">
<ItemGroup>
<NoAutoBuildTestAssets Include="TestAssets$(PathSeparator)TestProjects$(PathSeparator)**$(PathSeparator).noautobuild" />
<NoAutoBuildTestAssetProjects Include="%(NoAutoBuildTestAssets.RelativeDir)project.json" />
<PreTestAssetProjects Include="TestAssets$(PathSeparator)TestProjects$(PathSeparator)**$(PathSeparator)project.json"/>
<TestAssetProjects Include="%(PreTestAssetProjects.RelativeDir)project.json"
Exclude="@(NoAutoBuildTestAssetProjects)"/>
<TestAssetProjects>
<BuildInputIncludeFilter>%(RelativeDir)**/*.*</BuildInputIncludeFilter>
<BuildInputExcludeFilter>%(RelativeDir)bin/**/*.*;%(RelativeDir)obj/**/*.*</BuildInputExcludeFilter>
<ProjectDir>$([System.IO.Directory]::GetParent(%(Identity)))</ProjectDir>
<ProjectPath>%(Identity)</ProjectPath>
</TestAssetProjects>
<TestAssetProjects>
<OutputName>$([System.IO.Path]::GetFileName(%(ProjectDir)))</OutputName>
<OutputName Condition=" '%(RelativeDir)' == 'TestAssets/TestProjects/AppWithOutputAssemblyName/' ">MyApp</OutputName>
<OutputName Condition=" '%(RelativeDir)' == 'TestAssets/TestProjects/TestAppWithContentPackage/' ">AppWithContentPackage</OutputName>
</TestAssetProjects>
<TestAssetProjects>
<BuildOutput>%(TestAssetProjects.RelativeDir)bin/$(Configuration)/netcoreapp1.0/%(TestAssetProjects.OutputName).dll</BuildOutput>
</TestAssetProjects>
</ItemGroup>
</Target>
</Project>