diff options
author | Bob Arnson <bob@firegiant.com> | 2025-02-14 22:29:39 -0500 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2025-03-03 14:25:07 -0500 |
commit | ca6e44d496b0c589fdaabad69a00643f539c47cd (patch) | |
tree | edf84727cecfc03092a2851b465d97622c5048eb /src/ext/DirectX | |
parent | ba7fd5837ea149b2e319cc577fad27ce1162a064 (diff) | |
download | wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.tar.gz wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.tar.bz2 wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.zip |
Convert ext\ to MSTest and traversal projects.
- Move ext\ unit tests to MSTest.
- MSBuildify ext projects with MSTest execution.
- Fork test support projects for MSTest:
- WixInternal.TestSupport
- WixInternal.Core.TestPackage
Diffstat (limited to 'src/ext/DirectX')
4 files changed, 26 insertions, 31 deletions
diff --git a/src/ext/DirectX/directx.cmd b/src/ext/DirectX/directx.cmd deleted file mode 100644 index 56889513..00000000 --- a/src/ext/DirectX/directx.cmd +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | @setlocal | ||
2 | @pushd %~dp0 | ||
3 | |||
4 | @set _C=Debug | ||
5 | :parse_args | ||
6 | @if /i "%1"=="release" set _C=Release | ||
7 | @if not "%1"=="" shift & goto parse_args | ||
8 | |||
9 | @echo DirectX.wixext build %_C% | ||
10 | |||
11 | :: Restore | ||
12 | msbuild -t:Restore -p:Configuration=%_C% -tl -nologo -warnaserror || exit /b | ||
13 | |||
14 | :: Build | ||
15 | msbuild -t:Build -p:Configuration=%_C% -tl -nologo -warnaserror test\WixToolsetTest.DirectX\WixToolsetTest.DirectX.csproj || exit /b | ||
16 | |||
17 | :: Test | ||
18 | dotnet test -c %_C% --no-build test\WixToolsetTest.DirectX || exit /b | ||
19 | |||
20 | :: Pack | ||
21 | msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror wixext\WixToolset.DirectX.wixext.csproj || exit /b | ||
22 | |||
23 | @popd | ||
24 | @endlocal | ||
diff --git a/src/ext/DirectX/directx_t.proj b/src/ext/DirectX/directx_t.proj new file mode 100644 index 00000000..17b147ef --- /dev/null +++ b/src/ext/DirectX/directx_t.proj | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.Build.Traversal"> | ||
5 | <ItemGroup> | ||
6 | <ProjectReference Include="test\WixToolsetTest.DirectX\WixToolsetTest.DirectX.csproj" /> | ||
7 | <ProjectReference Include="wixext\WixToolset.DirectX.wixext.csproj" Targets="Pack" Properties="NoBuild=true" /> | ||
8 | </ItemGroup> | ||
9 | |||
10 | <Target Name="WixClean" BeforeTargets="Restore" Condition="'$(SuppressWixClean)' != 'true'"> | ||
11 | <RemoveDir Directories="$(RootBuildFolder)directx.wixext" /> | ||
12 | <RemoveDir Directories="$(USERPROFILE)\.nuget\packages\wixtoolset.directx.wixext" Condition="'$(NUGET_PACKAGES)' == ''" /> | ||
13 | <RemoveDir Directories="$(NUGET_PACKAGES)\wixtoolset.directx.wixext" Condition="'$(NUGET_PACKAGES)' != ''" /> | ||
14 | |||
15 | <Delete Files="$(ArtifactsFolder)WixToolset.DirectX.wixext.*.nupkg" /> | ||
16 | </Target> | ||
17 | </Project> | ||
diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs b/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs index 64013ca6..dceaaec5 100644 --- a/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs +++ b/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs | |||
@@ -3,14 +3,15 @@ | |||
3 | namespace WixToolsetTest.DirectX | 3 | namespace WixToolsetTest.DirectX |
4 | { | 4 | { |
5 | using System.Linq; | 5 | using System.Linq; |
6 | using WixInternal.TestSupport; | 6 | using Microsoft.VisualStudio.TestTools.UnitTesting; |
7 | using WixInternal.Core.TestPackage; | 7 | using WixInternal.MSTestSupport; |
8 | using WixInternal.Core.MSTestPackage; | ||
8 | using WixToolset.DirectX; | 9 | using WixToolset.DirectX; |
9 | using Xunit; | ||
10 | 10 | ||
11 | [TestClass] | ||
11 | public class DirectXExtensionFixture | 12 | public class DirectXExtensionFixture |
12 | { | 13 | { |
13 | [Fact] | 14 | [TestMethod] |
14 | public void CanBuildUsingPixelShaderVersion() | 15 | public void CanBuildUsingPixelShaderVersion() |
15 | { | 16 | { |
16 | var folder = TestData.Get(@"TestData\UsingPixelShaderVersion"); | 17 | var folder = TestData.Get(@"TestData\UsingPixelShaderVersion"); |
diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj b/src/ext/DirectX/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj index 31a35320..c13f3300 100644 --- a/src/ext/DirectX/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj +++ b/src/ext/DirectX/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj | |||
@@ -1,10 +1,10 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 | ||
4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="MSTest.Sdk"> |
5 | <PropertyGroup> | 5 | <PropertyGroup> |
6 | <TargetFramework>net6.0</TargetFramework> | 6 | <TargetFramework>net6.0</TargetFramework> |
7 | <IsWixTestProject>true</IsWixTestProject> | 7 | <IsWixMSTestProject>true</IsWixMSTestProject> |
8 | </PropertyGroup> | 8 | </PropertyGroup> |
9 | 9 | ||
10 | <ItemGroup> | 10 | <ItemGroup> |
@@ -19,6 +19,7 @@ | |||
19 | </ItemGroup> | 19 | </ItemGroup> |
20 | 20 | ||
21 | <ItemGroup> | 21 | <ItemGroup> |
22 | <PackageReference Include="WixInternal.Core.TestPackage" /> | 22 | <PackageReference Include="WixInternal.MSTestSupport" /> |
23 | <PackageReference Include="WixInternal.Core.MSTestPackage" /> | ||
23 | </ItemGroup> | 24 | </ItemGroup> |
24 | </Project> | 25 | </Project> |