mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +01:00
Opt into Microsoft.Build.RunVSTest to run tests within MSBuild (#32166)
This commit is contained in:
@@ -44,6 +44,20 @@
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Add ability to run tests via "msbuild /t:Test" -->
|
||||
<Sdk Name="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
||||
<PropertyGroup>
|
||||
<VSTestLogger>trx</VSTestLogger>
|
||||
<!--
|
||||
RunVSTest by default uses %VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe,
|
||||
but some of the CI scenarios don't define %VSINSTALLDIR%, so be explicit about where to look for vstest.
|
||||
Note: $(VsInstallRoot) is a built-in MSBuild property, so should always be defined.
|
||||
-->
|
||||
<VSTestToolPath>$(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\TestWindow</VSTestToolPath>
|
||||
<!-- No arm64 agents to run the tests. -->
|
||||
<RunVSTest Condition="'$(Platform)' == 'ARM64'">false</RunVSTest>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- MSBuildCache -->
|
||||
<PropertyGroup>
|
||||
<!-- Off by default -->
|
||||
@@ -74,6 +88,12 @@
|
||||
E:\;
|
||||
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
||||
|
||||
<!-- Unit tests of low-priv processes, eg the preview handler tests, may log to this location. -->
|
||||
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
||||
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
|
||||
$(USERPROFILE)\AppData\LocalLow\Microsoft\PowerToys\**;
|
||||
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
||||
|
||||
<!--
|
||||
This repo uses a common output directory with many projects writing duplicate outputs. Allow everything, but note this costs some performance in the form of requiring
|
||||
the cache to use copies instead of hardlinks when pulling from cache.
|
||||
|
||||
Reference in New Issue
Block a user