@joebigelow / wix / commits / 4362960f

Validate MSU package build

Closes wixtoolset/issues#6006

Rob Mensching committed Jan 8, 2021 at 14:18 UTC 4362960feec4a770f665419eaebd7b4ed14ecb9e
4 files changed +49
src/test/WixToolsetTest.CoreIntegration/MsuPackageFixture.cs new
+36
@@ -0,0 +1,36 @@
1 +// 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 +
3 +namespace WixToolsetTest.CoreIntegration
4 +{
5 + using System.IO;
6 + using WixBuildTools.TestSupport;
7 + using WixToolset.Core.TestPackage;
8 + using Xunit;
9 +
10 + public class MsuPackageFixture
11 + {
12 + [Fact]
13 + public void CanBuildBundleWithMsuPackage()
14 + {
15 + var folder = TestData.Get(@"TestData", "MsuPackage");
16 +
17 + using (var fs = new DisposableFileSystem())
18 + {
19 + var baseFolder = fs.GetFolder();
20 + var intermediateFolder = Path.Combine(baseFolder, "obj");
21 +
22 + var result = WixRunner.Execute(new[]
23 + {
24 + "build",
25 + Path.Combine(folder, "Bundle.wxs"),
26 + "-bindpath", Path.Combine(folder, "data"),
27 + "-intermediateFolder", intermediateFolder,
28 + "-o", Path.Combine(baseFolder, "bin", "test.exe")
29 + });
30 +
31 + result.AssertSuccess();
32 + Assert.True(File.Exists(Path.Combine(baseFolder, "bin", "test.exe")));
33 + }
34 + }
35 + }
36 +}
src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/Bundle.wxs new
+11
@@ -0,0 +1,11 @@
1 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 + <Bundle Name="BurnBundle" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="B94478B1-E1F3-4700-9CE8-6AA090854AEC">
3 + <BootstrapperApplication>
4 + <BootstrapperApplicationDll SourceFile="fakeba.dll" />
5 + </BootstrapperApplication>
6 +
7 + <Chain>
8 + <MsuPackage DetectCondition="DetectedTheMsu" SourceFile="test.msu" />
9 + </Chain>
10 + </Bundle>
11 +</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/fakeba.dll new
+1
@@ -0,0 +1 @@
1 +This is a fake BA DLL
src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/test.msu new
+1
@@ -0,0 +1 @@
1 +This is a fake MSU package