Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Switch to MSTest runner (Microsoft.Testing.Platform) #19165

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>

<!-- Enable the MSTest runner, this is an opt-in feature when not using MSTest.Sdk -->
<EnableMSTestRunner>true</EnableMSTestRunner>

<!-- Ensures the .xr.xml files are generated in a proper layout folder -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>

Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<PackageReference Update="Uno.Core.Extensions.Compatibility" Version="4.0.1" />
<PackageReference Update="Uno.Diagnostics.Eventing" Version="2.0.1" />
<PackageReference Update="Uno.Wasm.Bootstrap" Version="9.0.8" />
<PackageReference Update="MSTest" Version="3.6.3" />
<PackageReference Update="MSTest" Version="3.7.0" />
<PackageReference Update="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Update="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Update="MSTest.Analyzers" Version="3.3.1" />
Expand Down
16 changes: 1 addition & 15 deletions src/Uno.UI.Tests/Uno.UI.Unit.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetUnitTests)</TargetFrameworks>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>
<UseUnoXamlParser>true</UseUnoXamlParser>
Expand All @@ -17,21 +18,8 @@
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>
-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>$(DefineConstants);TRACE;DEBUG;HAS_UMBRELLA_BINDING;IS_UNIT_TESTS;HAS_GEOCOORDINATE_WATCHER;HAS_GEOCOORDINATE;HAS_COMPILED_REGEX;HAS_ISTORAGEFILE;HAS_SEMAPHORE;HAS_FILE_IO;IS_UNO;HAS_CRIPPLEDREFLECTION;NET46</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>$(DefineConstants);TRACE;HAS_UMBRELLA_BINDING;IS_UNIT_TESTS;HAS_GEOCOORDINATE_WATCHER;HAS_GEOCOORDINATE;HAS_COMPILED_REGEX;HAS_ISTORAGEFILE;HAS_SEMAPHORE;HAS_FILE_IO;IS_UNO;HAS_CRIPPLEDREFLECTION</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="MSTest" />
Expand Down Expand Up @@ -62,8 +50,6 @@
<Import Project="..\SourceGenerators\Uno.UI.SourceGenerators\Content\Uno.UI.SourceGenerators.props" />
<Import Project="..\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" Condition="'$(SkipUnoResourceGeneration)' == '' " />

<Target Name="BeforeBuildCleanup" BeforeTargets="XamlMarkupCompilePass1" />

<ItemGroup>
<EmbeddedResource Include="Windows_UI_Xaml_Markup\XamlReaderTests\*.xamltest" />
</ItemGroup>
Expand Down
Loading