61 lines
2.8 KiB
XML
61 lines
2.8 KiB
XML
<!--
|
|
###############################################################################
|
|
#
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
#
|
|
###############################################################################
|
|
|
|
Projects that are test console apps should import this targets file.
|
|
|
|
-->
|
|
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Contracts\Test.Contracts\app.csproj"/>
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Libraries\UnitTest\UnitTestLib.csproj"/>
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Libraries\UnitTest\UnitTestTemplate.csproj">
|
|
<ExcludeFromNativeReferences>true</ExcludeFromNativeReferences>
|
|
</ProjectReference>
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Libraries\Transform\Transform.csproj"/>
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Applications\Transforms\AppTransforms.csproj">
|
|
<ExcludeFromNativeReferences>true</ExcludeFromNativeReferences>
|
|
</ProjectReference>
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Libraries\Console\Console.App.csproj"/>
|
|
</ItemGroup>
|
|
|
|
<!-- this wires the test profile generation into the target dependency graph -->
|
|
<PropertyGroup>
|
|
<UseMsilRewrite>true</UseMsilRewrite>
|
|
<BuildDependsOn>$(BuildDependsOn);MakeTestProfile</BuildDependsOn>
|
|
<MsilRewrite>GenerateTestJig</MsilRewrite><!-- todo: allow for multiple -->
|
|
<ApplicationCategory>Test</ApplicationCategory>
|
|
<REGSVR32 Condition="'$(PROCESSOR_ARCHITECTURE)'=='x86'">$(BUILDDIR)\x86_any\regsvr32.exe</REGSVR32>
|
|
<REGSVR32 Condition="'$(PROCESSOR_ARCHITECTURE)'=='AMD64'">$(BUILDDIR)\x64_any\regsvr32.exe</REGSVR32>
|
|
</PropertyGroup>
|
|
|
|
<!-- include source file with AppMain -->
|
|
<ItemGroup>
|
|
<Compile Include="$(SINGULARITY_ROOT)\Libraries\UnitTest\TestApplication.sg"/>
|
|
</ItemGroup>
|
|
|
|
<Target Name="MakeTestProfile"
|
|
DependsOnTargets="BuildPrelimAssembly"
|
|
Inputs="$(PreSourceAssemblyPath)"
|
|
Outputs="$(OutputPath)\$(AssemblyName).tst"
|
|
>
|
|
<Exec Command=""$(BUILDDIR)\mktests.exe" /out:"$(OutputPath)\$(AssemblyName).tst" "$(PreSourceAssemblyPath)" "/>
|
|
</Target>
|
|
|
|
<Target Name="GenerateTestJig"
|
|
DependsOnTargets="BuildPrelimAssembly"
|
|
Inputs="$(PreRewriteAssemblyPath);$(LIBSDIR)\UnitTestTemplate.dll"
|
|
Outputs="$(OutputAssemblyPath)"
|
|
>
|
|
<Exec Command=""$(BUILDDIR)\transform\transform.exe" $(TRANSFORM_FLAGS) -t "$(LIBSDIR)\UnitTestTemplate.dll" -o "$(OutputAssemblyPath)" -d "$(OutputAssemblySymbolPath)" "$(PreRewriteAssemblyPath)" > "$(OutputAssemblyPath).log""/>
|
|
</Target>
|
|
|
|
<Import Project="App.targets"/>
|
|
|
|
</Project>
|