Disable running test.external from Win2D.proj due to vstest bug, and link vstest workarounds to the bugs that track them

This commit is contained in:
Shawn Hargreaves 2018-04-17 20:27:35 +00:00
Родитель 4b6a3b5d09
Коммит db76281437
2 изменённых файлов: 15 добавлений и 14 удалений

Просмотреть файл

@ -52,7 +52,12 @@
</UAPProject>
<UAPProject Include="winrt\test.external\winrt.test.external.uap.vcxproj">
<Platforms>Win32;x64</Platforms>
<!--
Workaround https://github.com/Microsoft/vstest/issues/1534 by temporarily
disabling running winrt.test.external unit tests from the command line.
Note these tests can still be run inside the Visual Studio 2017 IDE.
<AutomatedTests Condition="$(ShouldRunUAPTests)">store</AutomatedTests>
-->
</UAPProject>
<UAPProject Include="winrt\test.nativecomponent\winrt.test.nativecomponent.uap.vcxproj" />
<UAPProject Include="winrt\test.managed\winrt.test.managed.uap.csproj">
@ -291,16 +296,11 @@
</Target>
<!--
Workaround https://github.com/Microsoft/vstest/issues/1533 by deleting the
unnecessary assets.json file after running nuget restore on winrt.test.external.
-->
<Target Name="WorkAroundNuGetRestoreBug">
<!--
Using Visual Studio 2017, version 15.6.0:
- New project / Visual C++ / Windows Universal / Unit Test App (Universal Windows)
- msbuild UnitTestApp1.sln (ok)
- nuget restore UnitTestApp1.sln
- msbuild UnitTestApp1.sln (now fails with error about missing UAP framework reference)
This breaks the winrt.test.external unit test project.
We can work around the issue by deleting the unnecessary assets.json file after running nuget restore.
-->
<ItemGroup>
<FileToDelete Include="obj\winrt.test.external.uap\**\project.assets.json" />
</ItemGroup>

Просмотреть файл

@ -19,13 +19,14 @@
</PropertyGroup>
<Import Project="..\..\build\Win2D.cs.props" />
<PropertyGroup>
<!-- Win2D.common.props tries to gather all obj folders in one place, but overriding
the obj location is not compatible with the MSTest.TestAdapter package, so this
project has to restore the default obj location. When using a customized obj
path, Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll does not get
deployed to the build output location. -->
<!--
Workaround https://github.com/Microsoft/vstest/issues/1535 by undoing the
Win2D.common.props customization that tries to gather all obj folders in one place.
-->
<IntermediateOutputPath>obj</IntermediateOutputPath>
<BaseIntermediateOutputPath>obj</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup>
<PackageCertificateKeyFile>$(AssetDir)TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">