Skip to content

Commit

Permalink
Convert WixToolsetTest.Sdk to MSTest.***
Browse files Browse the repository at this point in the history
***Does not include a full conversion to traversal projects. The wix
segment already uses traversal projects extensively so there isn't a
significant per win, especially compared to the effort required...but
MSTest's method-level parallelism cuts test run time in half (~60->~30).
  • Loading branch information
barnson committed Mar 3, 2025
1 parent 6f1cde5 commit 6ca404f
Show file tree
Hide file tree
Showing 10 changed files with 138 additions and 136 deletions.
2 changes: 1 addition & 1 deletion src/internal/SetBuildNumber/Directory.Packages.props.pp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</ItemGroup>

<ItemGroup>
<PackageVersion Include="MSTest.TestFramework" Version="3.7.3" />
<PackageVersion Include="MSTest.TestFramework" Version="3.8.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/internal/WixBuildFinalize/WixBuildFinalize.proj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetFramework>net472</TargetFramework>
</PropertyGroup>

<Target Name="ZipPdbs" BeforeTargets="AfterBuild">
<Target Name="ZipPdbs" BeforeTargets="AfterBuild" Condition=" '$(Configuration)' == 'Release' ">
<ZipDirectory
SourceDirectory="$(PdbsFolder)"
DestinationFile="$(ArtifactsFolder)\wix-pdbs.$(Version).zip"
Expand Down
10 changes: 10 additions & 0 deletions src/internal/WixInternal.MSTestSupport/WixAssert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ public static void All<T>(IEnumerable<T> collection, Func<T, bool> predicate)
Assert.IsTrue(collection.All(predicate));
}

public static void Any<T>(IEnumerable<T> collection, Func<T, bool> predicate)
{
Assert.IsTrue(collection.Any(predicate));
}

public static void NotEmpty<T>(IEnumerable<T> collection)
{
Assert.IsTrue(collection.Count() > 0);
}

public static void Empty<T>(IEnumerable<T> collection)
{
Assert.AreEqual(0, collection.Count());
Expand Down
2 changes: 0 additions & 2 deletions src/internal/internal.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WixInternal.TestSupport.Nat
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixInternal.BaseBuildTasks.Sources", "WixInternal.BaseBuildTasks.Sources\WixInternal.BaseBuildTasks.Sources.csproj", "{6B654490-AB0D-4F94-B564-DAA80044D5A3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixInternal.XunitTestSupport", "WixInternal.XunitTestSupport\WixInternal.XunitTestSupport.csproj", "{AF7C4730-583B-46F8-9BB6-16D1F0330932}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixInternal.MSTestSupport", "WixInternal.MSTestSupport\WixInternal.MSTestSupport.csproj", "{E70898F2-8D08-4FCE-9CFF-EF1792FCA2E2}"
EndProject
Global
Expand Down
11 changes: 1 addition & 10 deletions src/testresultfilelist.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
build/logs/TestResults/api.trx
build/logs/TestResults/burn.trx
build/logs/TestResults/libs.trx
build/logs/TestResults/tools.trx
build/logs/TestResults/wix.trx
build/logs/TestResults/WixToolsetTest.BurnE2E.trx
build/logs/TestResults/util.wixext.trx
build/logs/TestResults/bal.wixext.trx
build/logs/TestResults/WixToolsetTest.MsiE2E.trx
build/logs/TestResults/WixToolsetTest.WixE2ETests.trx
build/logs/TestResults/*.trx
Loading

0 comments on commit 6ca404f

Please # to comment.