Add support for unit testing from console (#665)
This commit is contained in:
parent
810c4bcb0a
commit
174a52e5cd
|
|
@ -3,7 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CompileDependsOn Condition="'$(OS)'=='Windows_NT'">BuildNativeAssets;$(CompileDependsOn)</CompileDependsOn>
|
<CompileDependsOn Condition="'$(OS)'=='Windows_NT'">BuildNativeAssets;$(CompileDependsOn)</CompileDependsOn>
|
||||||
<PackageDependsOn Condition="'$(OS)'=='Windows_NT'">$(PackageDependsOn);PackageNativeProjects</PackageDependsOn>
|
<PackageDependsOn Condition="'$(OS)'=='Windows_NT'">$(PackageDependsOn);PackageNativeProjects</PackageDependsOn>
|
||||||
|
<TestDependsOn>$(PackageDependsOn);RunNativeTest</TestDependsOn>
|
||||||
<NuGetVerifierRuleFile Condition="'$(OS)' != 'Windows_NT'">$(RepositoryRoot)NuGetPackageVerifier.xplat.json</NuGetVerifierRuleFile>
|
<NuGetVerifierRuleFile Condition="'$(OS)' != 'Windows_NT'">$(RepositoryRoot)NuGetPackageVerifier.xplat.json</NuGetVerifierRuleFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
@ -79,4 +79,12 @@
|
||||||
WorkingDirectory="$(RepositoryRoot)" />
|
WorkingDirectory="$(RepositoryRoot)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="RunNativeTest">
|
||||||
|
<ItemGroup>
|
||||||
|
<Platforms Include="Win32;x64" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Exec Command=""$(VisualStudioMSBuildx86Path)" "$(RepositoryRoot)test\AspNetCoreModuleTests\AspNetCoreModuleTests.vcxproj" /t:Test $(BuildArgs) -p:Platform=%(Platforms.Identity) -bl:$(LogOutputDir)native.%(Platforms.Identity).binlog"
|
||||||
|
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,7 @@
|
||||||
<Project>{4787a64f-9a3e-4867-a55a-70cb4b2b2ffe}</Project>
|
<Project>{4787a64f-9a3e-4867-a55a-70cb4b2b2ffe}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<Import Project=".\NativeTests.targets" />
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<VsTestConsole>$(VCIDEInstallDir)..\CommonExtensions\Microsoft\TestWindow\vstest.console.exe</VsTestConsole>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Target Name="Test" DependsOnTargets="Build">
|
||||||
|
<Exec Command=""$(VsTestConsole)" "$(TargetPath)"" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
||||||
Loading…
Reference in New Issue