Add support for unit testing from console (#665)
This commit is contained in:
parent
810c4bcb0a
commit
174a52e5cd
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<CompileDependsOn Condition="'$(OS)'=='Windows_NT'">BuildNativeAssets;$(CompileDependsOn)</CompileDependsOn>
|
||||
<PackageDependsOn Condition="'$(OS)'=='Windows_NT'">$(PackageDependsOn);PackageNativeProjects</PackageDependsOn>
|
||||
|
||||
<TestDependsOn>$(PackageDependsOn);RunNativeTest</TestDependsOn>
|
||||
<NuGetVerifierRuleFile Condition="'$(OS)' != 'Windows_NT'">$(RepositoryRoot)NuGetPackageVerifier.xplat.json</NuGetVerifierRuleFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -79,4 +79,12 @@
|
|||
WorkingDirectory="$(RepositoryRoot)" />
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@
|
|||
<Project>{4787a64f-9a3e-4867-a55a-70cb4b2b2ffe}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project=".\NativeTests.targets" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</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