diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-01-24 20:58:53 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-01-27 21:01:35 -0600 |
commit | 41f239fb378f8371e10805c3b186ae79d734e4d4 (patch) | |
tree | a59901de4872ee551eed9f565b294cbc86e9f418 | |
parent | c8b602e595bced83dad206ce40189634432f1f07 (diff) | |
download | wix-41f239fb378f8371e10805c3b186ae79d734e4d4.tar.gz wix-41f239fb378f8371e10805c3b186ae79d734e4d4.tar.bz2 wix-41f239fb378f8371e10805c3b186ae79d734e4d4.zip |
Add test for same exact package in multiple versions of a bundle.
-rw-r--r-- | src/TestData/DependencyTests/BundleKv1/BundleK.props | 10 | ||||
-rw-r--r-- | src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | 12 | ||||
-rw-r--r-- | src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs | 10 | ||||
-rw-r--r-- | src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj | 15 | ||||
-rw-r--r-- | src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs | 10 | ||||
-rw-r--r-- | src/TestData/DependencyTests/PackageF/PackageF.wixproj | 9 | ||||
-rw-r--r-- | src/TestData/Templates/Package.wxs | 1 | ||||
-rw-r--r-- | src/TestData/Templates/PackageFail.wxs | 1 | ||||
-rw-r--r-- | src/WixToolsetTest.BurnE2E/DependencyTests.cs | 38 |
9 files changed, 104 insertions, 2 deletions
diff --git a/src/TestData/DependencyTests/BundleKv1/BundleK.props b/src/TestData/DependencyTests/BundleKv1/BundleK.props new file mode 100644 index 00000000..15257eb3 --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv1/BundleK.props | |||
@@ -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 | <Project> | ||
3 | <PropertyGroup> | ||
4 | <OutputType>Bundle</OutputType> | ||
5 | <UpgradeCode>{F7B7CCD8-ACFE-45D8-9EC2-934BBC3BE597}</UpgradeCode> | ||
6 | </PropertyGroup> | ||
7 | <ItemGroup> | ||
8 | <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" /> | ||
9 | </ItemGroup> | ||
10 | </Project> | ||
diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj new file mode 100644 index 00000000..6194889f --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj | |||
@@ -0,0 +1,12 @@ | |||
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="BundleK.props" /> | ||
4 | <ItemGroup> | ||
5 | <ProjectReference Include="..\PackageF\PackageF.wixproj" /> | ||
6 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
7 | </ItemGroup> | ||
8 | <ItemGroup> | ||
9 | <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.81" /> | ||
10 | <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.57" /> | ||
11 | </ItemGroup> | ||
12 | </Project> \ No newline at end of file | ||
diff --git a/src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs b/src/TestData/DependencyTests/BundleKv1/BundleKv1.wxs new file mode 100644 index 00000000..c4a85814 --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv1/BundleKv1.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="PackageF" SourceFile="$(var.PackageF.TargetPath)" /> | ||
8 | </PackageGroup> | ||
9 | </Fragment> | ||
10 | </Wix> | ||
diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj new file mode 100644 index 00000000..7b4c5479 --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.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="..\BundleKv1\BundleK.props" /> | ||
4 | <PropertyGroup> | ||
5 | <Version>2.0.0.0</Version> | ||
6 | </PropertyGroup> | ||
7 | <ItemGroup> | ||
8 | <ProjectReference Include="..\PackageF\PackageF.wixproj" /> | ||
9 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
10 | </ItemGroup> | ||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.81" /> | ||
13 | <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.57" /> | ||
14 | </ItemGroup> | ||
15 | </Project> \ No newline at end of file | ||
diff --git a/src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs b/src/TestData/DependencyTests/BundleKv2/BundleKv2.wxs new file mode 100644 index 00000000..c4a85814 --- /dev/null +++ b/src/TestData/DependencyTests/BundleKv2/BundleKv2.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="PackageF" SourceFile="$(var.PackageF.TargetPath)" /> | ||
8 | </PackageGroup> | ||
9 | </Fragment> | ||
10 | </Wix> | ||
diff --git a/src/TestData/DependencyTests/PackageF/PackageF.wixproj b/src/TestData/DependencyTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..25b610ac --- /dev/null +++ b/src/TestData/DependencyTests/PackageF/PackageF.wixproj | |||
@@ -0,0 +1,9 @@ | |||
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 | <PropertyGroup> | ||
4 | <UpgradeCode>{069AECC6-84DC-4FA4-B506-CD3A9A76F2F4}</UpgradeCode> | ||
5 | </PropertyGroup> | ||
6 | <ItemGroup> | ||
7 | <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" /> | ||
8 | </ItemGroup> | ||
9 | </Project> \ No newline at end of file | ||
diff --git a/src/TestData/Templates/Package.wxs b/src/TestData/Templates/Package.wxs index 6cf47775..5522b9a3 100644 --- a/src/TestData/Templates/Package.wxs +++ b/src/TestData/Templates/Package.wxs | |||
@@ -15,7 +15,6 @@ | |||
15 | <MediaTemplate CabinetTemplate="{0}$(var.CabPrefix).cab" /> | 15 | <MediaTemplate CabinetTemplate="{0}$(var.CabPrefix).cab" /> |
16 | <?endif?> | 16 | <?endif?> |
17 | 17 | ||
18 | <Property Id="MsiLogging" Value="voicewarmup" /> | ||
19 | <PropertyRef Id="TestVersion" /> | 18 | <PropertyRef Id="TestVersion" /> |
20 | 19 | ||
21 | <Feature Id="Complete" Level="1"> | 20 | <Feature Id="Complete" Level="1"> |
diff --git a/src/TestData/Templates/PackageFail.wxs b/src/TestData/Templates/PackageFail.wxs index 7cbf7ebc..73858fde 100644 --- a/src/TestData/Templates/PackageFail.wxs +++ b/src/TestData/Templates/PackageFail.wxs | |||
@@ -11,7 +11,6 @@ | |||
11 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> | 11 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> |
12 | <MediaTemplate EmbedCab="yes" /> | 12 | <MediaTemplate EmbedCab="yes" /> |
13 | 13 | ||
14 | <Property Id="MsiLogging" Value="voicewarmup" /> | ||
15 | <PropertyRef Id="TestVersion" /> | 14 | <PropertyRef Id="TestVersion" /> |
16 | 15 | ||
17 | <Feature Id="Complete" Level="1"> | 16 | <Feature Id="Complete" Level="1"> |
diff --git a/src/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/WixToolsetTest.BurnE2E/DependencyTests.cs new file mode 100644 index 00000000..a3994cf6 --- /dev/null +++ b/src/WixToolsetTest.BurnE2E/DependencyTests.cs | |||
@@ -0,0 +1,38 @@ | |||
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.BurnE2E | ||
4 | { | ||
5 | using Xunit; | ||
6 | using Xunit.Abstractions; | ||
7 | |||
8 | public class DependencyTests : BurnE2ETests | ||
9 | { | ||
10 | public DependencyTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
11 | |||
12 | [Fact] | ||
13 | public void CanKeepSameExactPackageAfterUpgradingBundle() | ||
14 | { | ||
15 | var packageA = this.CreatePackageInstaller("PackageF"); | ||
16 | var bundleAv1 = this.CreateBundleInstaller("BundleKv1"); | ||
17 | var bundleAv2 = this.CreateBundleInstaller("BundleKv2"); | ||
18 | |||
19 | packageA.VerifyInstalled(false); | ||
20 | |||
21 | bundleAv1.Install(); | ||
22 | bundleAv1.VerifyRegisteredAndInPackageCache(); | ||
23 | |||
24 | packageA.VerifyInstalled(true); | ||
25 | |||
26 | bundleAv2.Install(); | ||
27 | bundleAv2.VerifyRegisteredAndInPackageCache(); | ||
28 | bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); | ||
29 | |||
30 | packageA.VerifyInstalled(true); | ||
31 | |||
32 | bundleAv2.Uninstall(); | ||
33 | bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(); | ||
34 | |||
35 | packageA.VerifyInstalled(false); | ||
36 | } | ||
37 | } | ||
38 | } | ||