aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/MsuPackageFixture.cs36
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/Bundle.wxs11
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/fakeba.dll1
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/MsuPackage/data/test.msu1
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
3namespace 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