From 16f6a68d0bb1a0d5892a8cef10b835acc4e2a317 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 31 Jan 2020 21:43:14 +1100 Subject: Add failing test for compiling a WixStdBa bundle. --- Bal.wixext.sln | 14 ++++++++ nuget.config | 1 + src/test/WixToolsetTest.Bal/BalExtensionFixture.cs | 35 ++++++++++++++++++ .../TestData/WixStdBa/Bundle.wxs | 15 ++++++++ .../WixToolsetTest.Bal/WixToolsetTest.Bal.csproj | 42 ++++++++++++++++++++++ .../WixToolsetTest.Bal.v3.ncrunchproject | 5 +++ 6 files changed, 112 insertions(+) create mode 100644 src/test/WixToolsetTest.Bal/BalExtensionFixture.cs create mode 100644 src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs create mode 100644 src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj create mode 100644 src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject diff --git a/Bal.wixext.sln b/Bal.wixext.sln index e74e99c3..84c30661 100644 --- a/Bal.wixext.sln +++ b/Bal.wixext.sln @@ -25,6 +25,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.ManagedHost" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.FullFramework4MBA", "src\test\examples\FullFramework4MBA\Example.FullFramework4MBA.csproj", "{44297646-706D-4508-8E96-1B35B109694C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Bal", "src\test\WixToolsetTest.Bal\WixToolsetTest.Bal.csproj", "{89D479FC-20DA-44D8-AE38-48F063223498}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -147,6 +149,18 @@ Global {44297646-706D-4508-8E96-1B35B109694C}.Release|x64.Build.0 = Release|Any CPU {44297646-706D-4508-8E96-1B35B109694C}.Release|x86.ActiveCfg = Release|Any CPU {44297646-706D-4508-8E96-1B35B109694C}.Release|x86.Build.0 = Release|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|Any CPU.Build.0 = Debug|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|x64.ActiveCfg = Debug|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|x64.Build.0 = Debug|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|x86.ActiveCfg = Debug|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|x86.Build.0 = Debug|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|Any CPU.ActiveCfg = Release|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|Any CPU.Build.0 = Release|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x64.ActiveCfg = Release|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x64.Build.0 = Release|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x86.ActiveCfg = Release|Any CPU + {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/nuget.config b/nuget.config index 06a49261..837b3770 100644 --- a/nuget.config +++ b/nuget.config @@ -2,6 +2,7 @@ + diff --git a/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs b/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs new file mode 100644 index 00000000..c5a25948 --- /dev/null +++ b/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs @@ -0,0 +1,35 @@ +// 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. + +namespace WixToolsetTest.Bal +{ + using System.IO; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using Xunit; + + public class BalExtensionFixture + { + [Fact(Skip = "Test demonstrates failure")] + public void CanBuildUsingWixStdBa() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "Bundle.wxs"), + "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), + "-burnStub", TestData.Get(@"runtimes\win-x86\native\burn.x86.exe"), + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + } + } + } +} diff --git a/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs b/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs new file mode 100644 index 00000000..3a37e8ec --- /dev/null +++ b/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj new file mode 100644 index 00000000..4523346c --- /dev/null +++ b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj @@ -0,0 +1,42 @@ + + + + + + netcoreapp3.1 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject new file mode 100644 index 00000000..7b5b2139 --- /dev/null +++ b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file -- cgit v1.2.3-55-g6feb