aboutsummaryrefslogtreecommitdiff
path: root/src/test/burn
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-12-12 23:09:03 -0600
committerSean Hall <r.sean.hall@gmail.com>2022-12-13 00:09:33 -0600
commitbd0f3491f36f4e24dd899e0c3479beed6e3c00f9 (patch)
tree4deaaf2aa7b0ec717735497f975f06b55b8ec7df /src/test/burn
parent701b31e26c3b3dfb6c140cbc0d48c6d39bf1f552 (diff)
downloadwix-bd0f3491f36f4e24dd899e0c3479beed6e3c00f9.tar.gz
wix-bd0f3491f36f4e24dd899e0c3479beed6e3c00f9.tar.bz2
wix-bd0f3491f36f4e24dd899e0c3479beed6e3c00f9.zip
wixstdba should not change the action if not showing full UI.
wixstdba should not block downgrading if run from an upgrade related bundle. Fixes 7081
Diffstat (limited to 'src/test/burn')
-rw-r--r--src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAv2wixstdba.wixproj15
-rw-r--r--src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAv2wixstdba.wxs10
-rw-r--r--src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAwixstdba.props11
-rw-r--r--src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3wixstdba/BundleAv3wixstdba.wixproj16
-rw-r--r--src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3wixstdba/BundleAv3wixstdba.wxs11
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs27
6 files changed, 90 insertions, 0 deletions
diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAv2wixstdba.wixproj b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAv2wixstdba.wixproj
new file mode 100644
index 00000000..e92c5200
--- /dev/null
+++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAv2wixstdba.wixproj
@@ -0,0 +1,15 @@
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<Project Sdk="WixToolset.Sdk">
3 <Import Project="BundleAwixstdba.props" />
4 <PropertyGroup>
5 <Version>2.0.0.0</Version>
6 </PropertyGroup>
7 <ItemGroup>
8 <ProjectReference Include="..\PackageAv2\PackageAv2.wixproj" />
9 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
10 </ItemGroup>
11 <ItemGroup>
12 <PackageReference Include="WixToolset.Bal.wixext" />
13 <PackageReference Include="WixToolset.NetFx.wixext" />
14 </ItemGroup>
15</Project> \ No newline at end of file
diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAv2wixstdba.wxs b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAv2wixstdba.wxs
new file mode 100644
index 00000000..5cbee5a8
--- /dev/null
+++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAv2wixstdba.wxs
@@ -0,0 +1,10 @@
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
4<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 <Fragment>
6 <PackageGroup Id="BundlePackages">
7 <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv2.TargetPath)" />
8 </PackageGroup>
9 </Fragment>
10</Wix>
diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAwixstdba.props b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAwixstdba.props
new file mode 100644
index 00000000..1c766faa
--- /dev/null
+++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv2wixstdba/BundleAwixstdba.props
@@ -0,0 +1,11 @@
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<Project>
3 <PropertyGroup>
4 <OutputType>Bundle</OutputType>
5 <BA>hyperlinkLicense</BA>
6 <UpgradeCode>{5AA6B2C7-F3BC-4A49-812D-90F10C0BA8A1}</UpgradeCode>
7 </PropertyGroup>
8 <ItemGroup>
9 <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
10 </ItemGroup>
11</Project>
diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3wixstdba/BundleAv3wixstdba.wixproj b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3wixstdba/BundleAv3wixstdba.wixproj
new file mode 100644
index 00000000..2eb881ab
--- /dev/null
+++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3wixstdba/BundleAv3wixstdba.wixproj
@@ -0,0 +1,16 @@
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<Project Sdk="WixToolset.Sdk">
3 <Import Project="..\BundleAv2wixstdba\BundleAwixstdba.props" />
4 <PropertyGroup>
5 <Version>3.0.0.0</Version>
6 </PropertyGroup>
7 <ItemGroup>
8 <ProjectReference Include="..\PackageAv3\PackageAv3.wixproj" />
9 <ProjectReference Include="..\PackageF\PackageF.wixproj" />
10 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
11 </ItemGroup>
12 <ItemGroup>
13 <PackageReference Include="WixToolset.Bal.wixext" />
14 <PackageReference Include="WixToolset.NetFx.wixext" />
15 </ItemGroup>
16</Project> \ No newline at end of file
diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3wixstdba/BundleAv3wixstdba.wxs b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3wixstdba/BundleAv3wixstdba.wxs
new file mode 100644
index 00000000..b969b504
--- /dev/null
+++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3wixstdba/BundleAv3wixstdba.wxs
@@ -0,0 +1,11 @@
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
4<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 <Fragment>
6 <PackageGroup Id="BundlePackages">
7 <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv3.TargetPath)" />
8 <MsiPackage Id="PackageF" SourceFile="$(var.PackageF.TargetPath)" />
9 </PackageGroup>
10 </Fragment>
11</Wix>
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs
index fbd26d73..d5d01c9c 100644
--- a/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs
+++ b/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs
@@ -40,6 +40,33 @@ namespace WixToolsetTest.BurnE2E
40 } 40 }
41 41
42 [RuntimeFact] 42 [RuntimeFact]
43 public void ReinstallsOlderBundleAfterFailureWixstdba()
44 {
45 var packageAv2 = this.CreatePackageInstaller("PackageAv2");
46 var packageAv3 = this.CreatePackageInstaller("PackageAv3");
47 var bundleAv2 = this.CreateBundleInstaller("BundleAv2wixstdba");
48 var bundleAv3 = this.CreateBundleInstaller("BundleAv3wixstdba");
49
50 packageAv2.VerifyInstalled(false);
51 packageAv3.VerifyInstalled(false);
52
53 bundleAv2.Install();
54 bundleAv2.VerifyRegisteredAndInPackageCache();
55
56 packageAv2.VerifyInstalled(true);
57 packageAv3.VerifyInstalled(false);
58
59 // Verify https://github.com/wixtoolset/issues/issues/3421
60 var bundleAv3InstallLogFilePath = bundleAv3.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE);
61 bundleAv3.VerifyUnregisteredAndRemovedFromPackageCache();
62
63 Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv3InstallLogFilePath, @"Applied execute package: PackageA, result: 0x0, restart: None"));
64
65 packageAv2.VerifyInstalled(true);
66 packageAv3.VerifyInstalled(false);
67 }
68
69 [RuntimeFact]
43 public void ReportsRelatedBundleMissingFromCache() 70 public void ReportsRelatedBundleMissingFromCache()
44 { 71 {
45 var packageAv1 = this.CreatePackageInstaller("PackageAv1"); 72 var packageAv1 = this.CreatePackageInstaller("PackageAv1");