Improve logging to remove `(null)`.
Add detached container runtime test. Inspired by https://github.com/wixtoolset/issues/issues/7490.
Bob Arnson committed
May 18, 2023 at 20:47 UTC
35d30e03027cef5c402f01d671fc1883514e77a9
4 files changed
+64
-1
src/burn/engine/apply.cpp
+1
-1
@@ -1798,7 +1798,7 @@ static HRESULT AcquireContainerOrPayload(
1798
1799
break;
1800
default:
1801
- LogExitWithRootFailure(hr, E_FILENOTFOUND, MSG_RESOLVE_SOURCE_FAILED, "Failed to resolve source, payload: %ls, package: %ls, container: %ls", wzPayloadId, pPackage ? pPackage->sczId : NULL, pContainer ? pContainer->sczId : NULL);
1801
+ LogExitWithRootFailure(hr, E_FILENOTFOUND, MSG_RESOLVE_SOURCE_FAILED, "Failed to resolve source, payload: %ls, package: %ls, container: %ls", wzPayloadId ? wzPayloadId : L"n/a", pPackage ? pPackage->sczId : L"n/a", pContainer ? pContainer->sczId : L"n/a");
1802
}
1803
1804
// Send 100% complete here. This is sometimes the only progress sent to the BA.
src/test/burn/TestData/ContainerTests/BundleB/BundleB.wixproj
new
+19
@@ -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>{DC389066-79D6-48DA-8F80-A3576C4D4257}</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
src/test/burn/TestData/ContainerTests/BundleB/BundleB.wxs
new
+27
@@ -0,0 +1,27 @@
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
+ <PackageGroupRef Id="PackageA" />
8
+ <PackageGroupRef Id="PackageB" />
9
+ </PackageGroup>
10
+
11
+ <PackageGroup Id="PackageA">
12
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)" />
13
+ </PackageGroup>
14
+
15
+ <PackageGroup Id="PackageB">
16
+ <MsiPackage Id="PackageB" SourceFile="$(var.PackageB.TargetPath)" />
17
+ </PackageGroup>
18
+
19
+ <Container Name="AAA.container" Type="detached">
20
+ <PackageGroupRef Id="PackageA" />
21
+ </Container>
22
+
23
+ <Container Name="BBB.container" Type="detached">
24
+ <PackageGroupRef Id="PackageB" />
25
+ </Container>
26
+ </Fragment>
27
+</Wix>
src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs
+17
@@ -25,5 +25,22 @@ namespace WixToolsetTest.BurnE2E
25
packageA.VerifyInstalled(true);
26
packageB.VerifyInstalled(true);
27
}
28
+
29
+ [RuntimeFact]
30
+ public void CanSupportMultipleDetachedContainers()
31
+ {
32
+ var packageA = this.CreatePackageInstaller("PackageA");
33
+ var packageB = this.CreatePackageInstaller("PackageB");
34
+ var bundleA = this.CreateBundleInstaller("BundleB");
35
+
36
+ packageA.VerifyInstalled(false);
37
+ packageB.VerifyInstalled(false);
38
+
39
+ bundleA.Install();
40
+ bundleA.VerifyRegisteredAndInPackageCache();
41
+
42
+ packageA.VerifyInstalled(true);
43
+ packageB.VerifyInstalled(true);
44
+ }
45
}
46
}