diff options
author | Rob Mensching <rob@firegiant.com> | 2021-01-08 14:18:26 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-01-08 15:47:31 -0800 |
commit | 4362960feec4a770f665419eaebd7b4ed14ecb9e (patch) | |
tree | 9083df30259301736b18ea7dc808f00f146cb6f3 | |
parent | c1605aa577e304fe0fb4c57056b58754bfaf3666 (diff) | |
download | wix-4362960feec4a770f665419eaebd7b4ed14ecb9e.tar.gz wix-4362960feec4a770f665419eaebd7b4ed14ecb9e.tar.bz2 wix-4362960feec4a770f665419eaebd7b4ed14ecb9e.zip |
Validate MSU package build
Closes wixtoolset/issues#6006
4 files changed, 49 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsuPackageFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsuPackageFixture.cs new file mode 100644 index 00000000..475afcf0 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/MsuPackageFixture.cs | |||
@@ -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 | } | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/Bundle.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/Bundle.wxs new file mode 100644 index 00000000..dbca3393 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/Bundle.wxs | |||
@@ -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> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/fakeba.dll b/src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/fakeba.dll new file mode 100644 index 00000000..b3cf17d8 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/fakeba.dll | |||
@@ -0,0 +1 @@ | |||
This is a fake BA DLL | |||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/test.msu b/src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/test.msu new file mode 100644 index 00000000..d63da4be --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/test.msu | |||
@@ -0,0 +1 @@ | |||
This is a fake MSU package | |||