diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-11-02 17:47:46 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-11-03 10:53:41 -0500 |
commit | 323f62d3d0f4b73db5fde8977e2540194c6de006 (patch) | |
tree | efcbb140502f5c274052bcc1ef86e202e8bf6a7b /src/test/burn | |
parent | ce3aea757a01f0eea906fa610501a66735ef3a15 (diff) | |
download | wix-323f62d3d0f4b73db5fde8977e2540194c6de006.tar.gz wix-323f62d3d0f4b73db5fde8977e2540194c6de006.tar.bz2 wix-323f62d3d0f4b73db5fde8977e2540194c6de006.zip |
Follow up for multiple attached container support
* validate cContainers
* use previous embeddedid format and use intermediate folder when extracting attached containers
* remove special cases for 0 byte containers in BurnCommon classes and Insignia
* don't hardcode max containers
* reduce properties in BurnCommon
* add e2e test
#6144
Diffstat (limited to 'src/test/burn')
5 files changed, 85 insertions, 0 deletions
diff --git a/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wixproj new file mode 100644 index 00000000..1c2f1651 --- /dev/null +++ b/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wixproj | |||
@@ -0,0 +1,19 @@ | |||
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 | <OutputType>Bundle</OutputType> | ||
5 | <UpgradeCode>{16798DF3-C365-410D-B376-E63A961E4822}</UpgradeCode> | ||
6 | </PropertyGroup> | ||
7 | <ItemGroup> | ||
8 | <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" /> | ||
9 | </ItemGroup> | ||
10 | <ItemGroup> | ||
11 | <ProjectReference Include="..\PackageA\PackageA.wixproj" /> | ||
12 | <ProjectReference Include="..\PackageB\PackageB.wixproj" /> | ||
13 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
14 | </ItemGroup> | ||
15 | <ItemGroup> | ||
16 | <PackageReference Include="WixToolset.Bal.wixext" /> | ||
17 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
18 | </ItemGroup> | ||
19 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wxs b/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wxs new file mode 100644 index 00000000..7933eca5 --- /dev/null +++ b/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wxs | |||
@@ -0,0 +1,17 @@ | |||
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.PackageA.TargetPath)" /> | ||
8 | <PackageGroupRef Id="PackageB" /> | ||
9 | </PackageGroup> | ||
10 | <PackageGroup Id="PackageB"> | ||
11 | <MsiPackage Id="PackageB" SourceFile="$(var.PackageB.TargetPath)" /> | ||
12 | </PackageGroup> | ||
13 | <Container Id="CustomAttachedContainer" Name="CustomAttachedContainer" Type="attached"> | ||
14 | <PackageGroupRef Id="PackageB" /> | ||
15 | </Container> | ||
16 | </Fragment> | ||
17 | </Wix> | ||
diff --git a/src/test/burn/TestData/ContainerTests/PackageA/PackageA.wixproj b/src/test/burn/TestData/ContainerTests/PackageA/PackageA.wixproj new file mode 100644 index 00000000..67dfd894 --- /dev/null +++ b/src/test/burn/TestData/ContainerTests/PackageA/PackageA.wixproj | |||
@@ -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 Sdk="WixToolset.Sdk"> | ||
3 | <PropertyGroup> | ||
4 | <CabPrefix>a</CabPrefix> | ||
5 | <UpgradeCode>{D452A40D-27B2-41A1-A103-4FD5744B548E}</UpgradeCode> | ||
6 | </PropertyGroup> | ||
7 | <ItemGroup> | ||
8 | <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" /> | ||
9 | </ItemGroup> | ||
10 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ContainerTests/PackageB/PackageB.wixproj b/src/test/burn/TestData/ContainerTests/PackageB/PackageB.wixproj new file mode 100644 index 00000000..6ef92662 --- /dev/null +++ b/src/test/burn/TestData/ContainerTests/PackageB/PackageB.wixproj | |||
@@ -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 Sdk="WixToolset.Sdk"> | ||
3 | <PropertyGroup> | ||
4 | <CabPrefix>b</CabPrefix> | ||
5 | <UpgradeCode>{EB8E7A16-9855-4019-90D6-F5A242A75250}</UpgradeCode> | ||
6 | </PropertyGroup> | ||
7 | <ItemGroup> | ||
8 | <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" /> | ||
9 | </ItemGroup> | ||
10 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs new file mode 100644 index 00000000..cd6beaa9 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs | |||
@@ -0,0 +1,29 @@ | |||
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 ContainerTests : BurnE2ETests | ||
9 | { | ||
10 | public ContainerTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
11 | |||
12 | [Fact] | ||
13 | public void CanSupportMultipleAttachedContainers() | ||
14 | { | ||
15 | var packageA = this.CreatePackageInstaller("PackageA"); | ||
16 | var packageB = this.CreatePackageInstaller("PackageB"); | ||
17 | var bundleA = this.CreateBundleInstaller("BundleA"); | ||
18 | |||
19 | packageA.VerifyInstalled(false); | ||
20 | packageB.VerifyInstalled(false); | ||
21 | |||
22 | bundleA.Install(); | ||
23 | bundleA.VerifyRegisteredAndInPackageCache(); | ||
24 | |||
25 | packageA.VerifyInstalled(true); | ||
26 | packageB.VerifyInstalled(true); | ||
27 | } | ||
28 | } | ||
29 | } | ||