aboutsummaryrefslogtreecommitdiff
path: root/src/test/burn
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2026-02-25 19:43:09 -0500
committerBob Arnson <github@bobs.org>2026-02-25 20:21:23 -0500
commit918332a0e80e8761eca20e801ae7ce3631fdbaea (patch)
treec4b9ae147242c1e3830ba2f9443acfe0dcf20958 /src/test/burn
parent92714e7949c41db4c17e6bd87c919ef4b3dc34f7 (diff)
downloadwix-918332a0e80e8761eca20e801ae7ce3631fdbaea.tar.gz
wix-918332a0e80e8761eca20e801ae7ce3631fdbaea.tar.bz2
wix-918332a0e80e8761eca20e801ae7ce3631fdbaea.zip
Handle scope of configurable-scope BundlePackages.
Fixes https://github.com/wixtoolset/issues/issues/9233
Diffstat (limited to 'src/test/burn')
-rw-r--r--src/test/burn/TestBA/TestBA.cs2
-rw-r--r--src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.props (renamed from src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj)4
-rw-r--r--src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs11
-rw-r--r--src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackageTestBA.wixproj7
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs34
5 files changed, 54 insertions, 4 deletions
diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs
index abab863a..31dbeb9d 100644
--- a/src/test/burn/TestBA/TestBA.cs
+++ b/src/test/burn/TestBA/TestBA.cs
@@ -227,7 +227,7 @@ namespace WixToolset.Test.BA
227 227
228 protected override void OnDetectBegin(DetectBeginEventArgs args) 228 protected override void OnDetectBegin(DetectBeginEventArgs args)
229 { 229 {
230 this.Log("OnDetectBegin"); 230 this.Log($"OnDetectBegin: Cached={args.Cached}, RegistrationType={args.RegistrationType}, PackageCount={args.PackageCount}");
231 231
232 this.forceUpdateSource = this.ReadPackageAction(null, "ForceUpdateSource"); 232 this.forceUpdateSource = this.ReadPackageAction(null, "ForceUpdateSource");
233 if (!String.IsNullOrEmpty(this.forceUpdateSource)) 233 if (!String.IsNullOrEmpty(this.forceUpdateSource))
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.props
index 55edd282..37cc5bd5 100644
--- a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj
+++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.props
@@ -1,11 +1,13 @@
1<Project Sdk="WixToolset.Sdk"> 1<Project>
2 <PropertyGroup> 2 <PropertyGroup>
3 <OutputType>Bundle</OutputType> 3 <OutputType>Bundle</OutputType>
4 </PropertyGroup> 4 </PropertyGroup>
5 <ItemGroup> 5 <ItemGroup>
6 <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> 6 <PackageReference Include="WixToolset.BootstrapperApplications.wixext" />
7 <PackageReference Include="WixToolset.NetFx.wixext" />
7 </ItemGroup> 8 </ItemGroup>
8 <ItemGroup> 9 <ItemGroup>
10 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
9 <ProjectReference Include="..\AllPuomBundle\AllPuomBundleTestBA.wixproj" /> 11 <ProjectReference Include="..\AllPuomBundle\AllPuomBundleTestBA.wixproj" />
10 </ItemGroup> 12 </ItemGroup>
11</Project> \ No newline at end of file 13</Project> \ No newline at end of file
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs
index 8b585e18..de256ccf 100644
--- a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs
+++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs
@@ -1,11 +1,18 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> 1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Id="AllPuomBundle" Name="AllPuomBundle" Manufacturer="Acme" Version="1.0.0.0"> 2 <Bundle Id="PuomBundlePackage$(BA)" Name="PuomBundlePackage$(BA)" Manufacturer="Acme" Version="1.0.0.0">
3 <?if $(BA) = "WixStdBA"?>
3 <BootstrapperApplication> 4 <BootstrapperApplication>
4 <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> 5 <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" />
5 </BootstrapperApplication> 6 </BootstrapperApplication>
7 <?endif?>
8
9 <Variable Name="TestGroupName" Value="ConfigurableScopeTests" />
6 10
7 <Chain> 11 <Chain>
8 <BundlePackage SourceFile="AllPuomBundleTestBA.exe" /> 12 <?if $(BA) = "TestBA"?>
13 <PackageGroupRef Id="TestBA" />
14 <?endif?>
15 <BundlePackage SourceFile="AllPuomBundle$(BA).exe" />
9 </Chain> 16 </Chain>
10 </Bundle> 17 </Bundle>
11</Wix> 18</Wix>
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackageTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackageTestBA.wixproj
new file mode 100644
index 00000000..30d850d4
--- /dev/null
+++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackageTestBA.wixproj
@@ -0,0 +1,7 @@
1<Project Sdk="WixToolset.Sdk">
2 <PropertyGroup>
3 <BA>TestBA</BA>
4 </PropertyGroup>
5
6 <Import Project="Bundle.props" />
7</Project> \ No newline at end of file
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs
index bb1381b3..049cefc3 100644
--- a/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs
+++ b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs
@@ -685,6 +685,40 @@ namespace WixToolsetTest.BurnE2E
685 pkg2.VerifyInstalled(false); 685 pkg2.VerifyInstalled(false);
686 } 686 }
687 687
688 [RuntimeFact]
689 public void ConfigurableScopeBundlePackage_Follows_PerUser_Scope()
690 {
691 var testBAController = this.CreateTestBAController();
692 testBAController.SetBundleScope(BundleScope.PerUser);
693
694 var bundle = this.CreateBundleInstaller("PuomBundlePackageTestBA");
695 var log = bundle.Install();
696
697 bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false);
698
699 Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 2 packages, action: Install, planned scope: PerUser"));
700 Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: AllPuomBundleTestBA.exe, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser"));
701
702 bundle.Uninstall();
703 bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false);
704 }
688 705
706 [RuntimeFact]
707 public void ConfigurableScopeBundlePackage_Follows_PerMachine_Scope()
708 {
709 var testBAController = this.CreateTestBAController();
710 testBAController.SetBundleScope(BundleScope.PerMachine);
711
712 var bundle = this.CreateBundleInstaller("PuomBundlePackageTestBA");
713 var log = bundle.Install();
714
715 bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true);
716
717 Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 2 packages, action: Install, planned scope: PerMachine"));
718 Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: AllPuomBundleTestBA.exe, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine"));
719
720 bundle.Uninstall();
721 bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true);
722 }
689 } 723 }
690} 724}