From 35d30e03027cef5c402f01d671fc1883514e77a9 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 18 May 2023 20:47:27 -0400 Subject: Improve logging to remove `(null)`. Add detached container runtime test. Inspired by https://github.com/wixtoolset/issues/issues/7490. --- src/burn/engine/apply.cpp | 2 +- .../ContainerTests/BundleB/BundleB.wixproj | 19 +++++++++++++++ .../TestData/ContainerTests/BundleB/BundleB.wxs | 27 ++++++++++++++++++++++ .../burn/WixToolsetTest.BurnE2E/ContainerTests.cs | 17 ++++++++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 src/test/burn/TestData/ContainerTests/BundleB/BundleB.wixproj create mode 100644 src/test/burn/TestData/ContainerTests/BundleB/BundleB.wxs diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index 9a1a7bf9..f3b05cf8 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp @@ -1798,7 +1798,7 @@ static HRESULT AcquireContainerOrPayload( break; default: - 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); + 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"); } // Send 100% complete here. This is sometimes the only progress sent to the BA. diff --git a/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wixproj new file mode 100644 index 00000000..a91e6317 --- /dev/null +++ b/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {DC389066-79D6-48DA-8F80-A3576C4D4257} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wxs b/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wxs new file mode 100644 index 00000000..47231a73 --- /dev/null +++ b/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wxs @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs index a607f7ce..8605c32e 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs @@ -25,5 +25,22 @@ namespace WixToolsetTest.BurnE2E packageA.VerifyInstalled(true); packageB.VerifyInstalled(true); } + + [RuntimeFact] + public void CanSupportMultipleDetachedContainers() + { + var packageA = this.CreatePackageInstaller("PackageA"); + var packageB = this.CreatePackageInstaller("PackageB"); + var bundleA = this.CreateBundleInstaller("BundleB"); + + packageA.VerifyInstalled(false); + packageB.VerifyInstalled(false); + + bundleA.Install(); + bundleA.VerifyRegisteredAndInPackageCache(); + + packageA.VerifyInstalled(true); + packageB.VerifyInstalled(true); + } } } -- cgit v1.2.3-55-g6feb