diff options
Diffstat (limited to '')
61 files changed, 1281 insertions, 81 deletions
diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs index 51fc1cbd..abab863a 100644 --- a/src/test/burn/TestBA/TestBA.cs +++ b/src/test/burn/TestBA/TestBA.cs | |||
| @@ -43,6 +43,7 @@ namespace WixToolset.Test.BA | |||
| 43 | private bool rollingBack; | 43 | private bool rollingBack; |
| 44 | private string forceDownloadSource; | 44 | private string forceDownloadSource; |
| 45 | private string forceUpdateSource; | 45 | private string forceUpdateSource; |
| 46 | private BundleScope bundleScope; | ||
| 46 | 47 | ||
| 47 | private IBootstrapperCommand Command { get; set; } | 48 | private IBootstrapperCommand Command { get; set; } |
| 48 | 49 | ||
| @@ -160,6 +161,12 @@ namespace WixToolset.Test.BA | |||
| 160 | this.quitAfterDetect = false; | 161 | this.quitAfterDetect = false; |
| 161 | } | 162 | } |
| 162 | 163 | ||
| 164 | string bundleScope = this.ReadPackageAction(null, "BundleScope"); | ||
| 165 | if (String.IsNullOrEmpty(bundleScope) || !Enum.TryParse<BundleScope>(bundleScope, out this.bundleScope)) | ||
| 166 | { | ||
| 167 | this.bundleScope = BundleScope.Default; | ||
| 168 | } | ||
| 169 | |||
| 163 | this.ImportContainerSources(); | 170 | this.ImportContainerSources(); |
| 164 | this.ImportPayloadSources(); | 171 | this.ImportPayloadSources(); |
| 165 | 172 | ||
| @@ -227,7 +234,6 @@ namespace WixToolset.Test.BA | |||
| 227 | { | 234 | { |
| 228 | this.Log(" OnDetectBegin::ForceUpdateSource: {0}", this.forceUpdateSource); | 235 | this.Log(" OnDetectBegin::ForceUpdateSource: {0}", this.forceUpdateSource); |
| 229 | } | 236 | } |
| 230 | |||
| 231 | } | 237 | } |
| 232 | 238 | ||
| 233 | protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) | 239 | protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) |
| @@ -294,7 +300,7 @@ namespace WixToolset.Test.BA | |||
| 294 | } | 300 | } |
| 295 | else | 301 | else |
| 296 | { | 302 | { |
| 297 | this.Engine.Plan(this.action); | 303 | this.Engine.Plan(this.action, this.bundleScope); |
| 298 | } | 304 | } |
| 299 | } | 305 | } |
| 300 | else | 306 | else |
| @@ -312,7 +318,7 @@ namespace WixToolset.Test.BA | |||
| 312 | { | 318 | { |
| 313 | if (this.explicitlyElevateAndPlanFromOnElevateBegin) | 319 | if (this.explicitlyElevateAndPlanFromOnElevateBegin) |
| 314 | { | 320 | { |
| 315 | this.Engine.Plan(this.action); | 321 | this.Engine.Plan(this.action, this.bundleScope); |
| 316 | 322 | ||
| 317 | // Simulate showing some UI since these tests won't actually show the UAC prompt. | 323 | // Simulate showing some UI since these tests won't actually show the UAC prompt. |
| 318 | MessagePump.ProcessMessages(10); | 324 | MessagePump.ProcessMessages(10); |
diff --git a/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wxs b/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wxs index 0d05700f..3ff752b2 100644 --- a/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wxs +++ b/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wxs | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | <BundlePackage Id="Dotnet_Runtime_6.0" Permanent="yes"> | 13 | <BundlePackage Id="Dotnet_Runtime_6.0" Permanent="yes"> |
| 14 | <BundlePackagePayload Id="Dotnet_Runtime_6.0" Name="dotnet-runtime-6.0.10-win-x64.exe" ProductName="Microsoft .NET Runtime - 6.0.10 (x64)" Description="Microsoft .NET Runtime - 6.0.10 (x64)" DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/50336bc7-7fd1-4a12-b5a2-81ce0219edf9/8d862413975808de0d835888e41e49a7/dotnet-runtime-6.0.10-win-x64.exe" Hash="23E4C862AFEF34A2C0D6476A93274CE0158D28F1609E0404737663E4BE17263E61E5A8760382FB125D288A0965394E3D04B9E1C77F99DE80A2C590DD295B8732" Size="27912752" Version="6.0.10.31726"> | 14 | <BundlePackagePayload Id="Dotnet_Runtime_6.0" Name="dotnet-runtime-6.0.10-win-x64.exe" ProductName="Microsoft .NET Runtime - 6.0.10 (x64)" Description="Microsoft .NET Runtime - 6.0.10 (x64)" DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/50336bc7-7fd1-4a12-b5a2-81ce0219edf9/8d862413975808de0d835888e41e49a7/dotnet-runtime-6.0.10-win-x64.exe" Hash="23E4C862AFEF34A2C0D6476A93274CE0158D28F1609E0404737663E4BE17263E61E5A8760382FB125D288A0965394E3D04B9E1C77F99DE80A2C590DD295B8732" Size="27912752" Version="6.0.10.31726"> |
| 15 | <RemoteBundle BundleCode="{9A89127E-80A4-45FB-AD62-58F72634274A}" DisplayName="Microsoft .NET Runtime - 6.0.10 (x64)" InstallSize="71462036" ManifestNamespace="http://schemas.microsoft.com/wix/2008/Burn" PerMachine="yes" ProviderKey="{9a89127e-80a4-45fb-ad62-58f72634274a}" ProtocolVersion="1" Version="6.0.10.31726" Win64="no" UpgradeCode="{B19A028F-5C89-7AF4-5102-0F8ED67CCACA}" /> | 15 | <RemoteBundle BundleCode="{9A89127E-80A4-45FB-AD62-58F72634274A}" DisplayName="Microsoft .NET Runtime - 6.0.10 (x64)" InstallSize="71462036" ManifestNamespace="http://schemas.microsoft.com/wix/2008/Burn" Scope="perMachine" ProviderKey="{9a89127e-80a4-45fb-ad62-58f72634274a}" ProtocolVersion="1" Version="6.0.10.31726" Win64="no" UpgradeCode="{B19A028F-5C89-7AF4-5102-0F8ED67CCACA}" /> |
| 16 | </BundlePackagePayload> | 16 | </BundlePackagePayload> |
| 17 | </BundlePackage> | 17 | </BundlePackage> |
| 18 | </PackageGroup> | 18 | </PackageGroup> |
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleTestBA.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/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleWixStdBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleWixStdBA.wixproj new file mode 100644 index 00000000..56db1fdc --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleWixStdBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>WixStdBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.props new file mode 100644 index 00000000..a200a063 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.props | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 11 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 13 | </ItemGroup> | ||
| 14 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.wxs new file mode 100644 index 00000000..48708db4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.wxs | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="AllPmouBundle$(BA)" Name="AllPmouBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PmouPkg1.msi" /> | ||
| 16 | <MsiPackage SourceFile="PmouPkg2.msi" /> | ||
| 17 | </Chain> | ||
| 18 | </Bundle> | ||
| 19 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleTestBA.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/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleWixStdBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleWixStdBA.wixproj new file mode 100644 index 00000000..56db1fdc --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleWixStdBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>WixStdBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.props new file mode 100644 index 00000000..d704544c --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.props | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 11 | <ProjectReference Include="..\PuomPkg1\PuomPkg1.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PuomPkg2\PuomPkg2.wixproj" /> | ||
| 13 | </ItemGroup> | ||
| 14 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.wxs new file mode 100644 index 00000000..4cb11a98 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.wxs | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="AllPuomBundle$(BA)" Name="AllPuomBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PuomPkg1.msi" /> | ||
| 16 | <MsiPackage SourceFile="PuomPkg2.msi" /> | ||
| 17 | </Chain> | ||
| 18 | </Bundle> | ||
| 19 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/Bundle.wxs new file mode 100644 index 00000000..e170667b --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/Bundle.wxs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PerMachineBundle" Name="PerMachineBundle" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <BootstrapperApplication> | ||
| 4 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 5 | </BootstrapperApplication> | ||
| 6 | |||
| 7 | <Chain> | ||
| 8 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 9 | </Chain> | ||
| 10 | </Bundle> | ||
| 11 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/PerMachineBundle.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/PerMachineBundle.wixproj new file mode 100644 index 00000000..ade65220 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/PerMachineBundle.wixproj | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | </ItemGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 10 | </ItemGroup> | ||
| 11 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/PerMachinePkg.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/PerMachinePkg.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/PerMachinePkg.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/product.wxs new file mode 100644 index 00000000..4b14c9d2 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PerMachinePkg" Name="PerMachinePkg" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perMachine"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/Bundle.wxs new file mode 100644 index 00000000..e0a4c170 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/Bundle.wxs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PerUserBundle" Name="PerUserBundle" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <BootstrapperApplication> | ||
| 4 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 5 | </BootstrapperApplication> | ||
| 6 | |||
| 7 | <Chain> | ||
| 8 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 9 | </Chain> | ||
| 10 | </Bundle> | ||
| 11 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/PerUserBundle.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/PerUserBundle.wixproj new file mode 100644 index 00000000..7af6148b --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/PerUserBundle.wixproj | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | </ItemGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 10 | </ItemGroup> | ||
| 11 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/PerUserPkg.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/PerUserPkg.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/PerUserPkg.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/product.wxs new file mode 100644 index 00000000..17c25409 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PerUserPkg" Name="PerUserPkg" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perUser"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.props new file mode 100644 index 00000000..9ecde613 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.props | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 11 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 14 | </ItemGroup> | ||
| 15 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.wxs new file mode 100644 index 00000000..ecb8571b --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.wxs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PmPmouBundle$(BA)" Name="PmPmouBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 16 | <MsiPackage SourceFile="PmouPkg1.msi" /> | ||
| 17 | <MsiPackage SourceFile="PmouPkg2.msi" /> | ||
| 18 | </Chain> | ||
| 19 | </Bundle> | ||
| 20 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/PmPmouBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/PmPmouBundleTestBA.wixproj new file mode 100644 index 00000000..66ad737c --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/PmPmouBundleTestBA.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/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.props new file mode 100644 index 00000000..51458cdd --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.props | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | <SuppressSpecificWarnings>1140</SuppressSpecificWarnings> | ||
| 5 | </PropertyGroup> | ||
| 6 | <ItemGroup> | ||
| 7 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 8 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 9 | </ItemGroup> | ||
| 10 | <ItemGroup> | ||
| 11 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 14 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 15 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 16 | </ItemGroup> | ||
| 17 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.wxs new file mode 100644 index 00000000..64361b42 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.wxs | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PmPuPmouBundle$(BA)" Name="PmPuPmouBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 16 | <MsiPackage SourceFile="PmouPkg1.msi" /> | ||
| 17 | <MsiPackage SourceFile="PmouPkg2.msi" /> | ||
| 18 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 19 | </Chain> | ||
| 20 | </Bundle> | ||
| 21 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/PmPuPmouBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/PmPuPmouBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/PmPuPmouBundleTestBA.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/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.props new file mode 100644 index 00000000..7da4792a --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.props | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | <SuppressSpecificWarnings>1140</SuppressSpecificWarnings> | ||
| 5 | </PropertyGroup> | ||
| 6 | <ItemGroup> | ||
| 7 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 8 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 9 | </ItemGroup> | ||
| 10 | <ItemGroup> | ||
| 11 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PuomPkg1\PuomPkg1.wixproj" /> | ||
| 14 | <ProjectReference Include="..\PuomPkg2\PuomPkg2.wixproj" /> | ||
| 15 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 16 | </ItemGroup> | ||
| 17 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.wxs new file mode 100644 index 00000000..4c9ce68c --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.wxs | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PmPuPuomBundle$(BA)" Name="PmPuPuomBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 16 | <MsiPackage SourceFile="PuomPkg1.msi" /> | ||
| 17 | <MsiPackage SourceFile="PuomPkg2.msi" /> | ||
| 18 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 19 | </Chain> | ||
| 20 | </Bundle> | ||
| 21 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/PmPuPuomBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/PmPuPuomBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/PmPuPuomBundleTestBA.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/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.props new file mode 100644 index 00000000..9ecde613 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.props | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 11 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 14 | </ItemGroup> | ||
| 15 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.wxs new file mode 100644 index 00000000..7f53f09a --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.wxs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PmPuomBundle$(BA)" Name="PmPuomBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 16 | <MsiPackage SourceFile="PuomPkg1.msi" /> | ||
| 17 | <MsiPackage SourceFile="PuomPkg2.msi" /> | ||
| 18 | </Chain> | ||
| 19 | </Bundle> | ||
| 20 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/PmPuomBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/PmPuomBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/PmPuomBundleTestBA.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/TestData/ConfigurableScopeTests/PmouPkg1/PmouPkg1.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/PmouPkg1.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/PmouPkg1.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/product.wxs new file mode 100644 index 00000000..a41e99ca --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PmouPkg1" Name="PmouPkg1" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perMachineOrUser"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/PmouPkg2.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/PmouPkg2.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/PmouPkg2.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/product.wxs new file mode 100644 index 00000000..84f74769 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PmouPkg2" Name="PmouPkg2" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perMachineOrUser"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.props new file mode 100644 index 00000000..95acbebe --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.props | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | <SuppressSpecificWarnings>1140</SuppressSpecificWarnings> | ||
| 5 | </PropertyGroup> | ||
| 6 | <ItemGroup> | ||
| 7 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 8 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 9 | </ItemGroup> | ||
| 10 | <ItemGroup> | ||
| 11 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 14 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 15 | </ItemGroup> | ||
| 16 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.wxs new file mode 100644 index 00000000..70e84690 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.wxs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PuPmouBundle$(BA)" Name="PuPmouBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PmouPkg1.msi" /> | ||
| 16 | <MsiPackage SourceFile="PmouPkg2.msi" /> | ||
| 17 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 18 | </Chain> | ||
| 19 | </Bundle> | ||
| 20 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/PuPmouBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/PuPmouBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/PuPmouBundleTestBA.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/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.props new file mode 100644 index 00000000..6d0a58f1 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.props | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | <SuppressSpecificWarnings>1140</SuppressSpecificWarnings> | ||
| 5 | </PropertyGroup> | ||
| 6 | <ItemGroup> | ||
| 7 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 8 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 9 | </ItemGroup> | ||
| 10 | <ItemGroup> | ||
| 11 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PuomPkg1\PuomPkg1.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PuomPkg2\PuomPkg2.wixproj" /> | ||
| 14 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 15 | </ItemGroup> | ||
| 16 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.wxs new file mode 100644 index 00000000..6c5b6845 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.wxs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PuPuomBundle$(BA)" Name="PuPuomBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PuomPkg1.msi" /> | ||
| 16 | <MsiPackage SourceFile="PuomPkg2.msi" /> | ||
| 17 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 18 | </Chain> | ||
| 19 | </Bundle> | ||
| 20 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/PuPuomBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/PuPuomBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/PuPuomBundleTestBA.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/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs new file mode 100644 index 00000000..8b585e18 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs | |||
| @@ -0,0 +1,11 @@ | |||
| 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"> | ||
| 3 | <BootstrapperApplication> | ||
| 4 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 5 | </BootstrapperApplication> | ||
| 6 | |||
| 7 | <Chain> | ||
| 8 | <BundlePackage SourceFile="AllPuomBundleTestBA.exe" /> | ||
| 9 | </Chain> | ||
| 10 | </Bundle> | ||
| 11 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj new file mode 100644 index 00000000..55edd282 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | </ItemGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <ProjectReference Include="..\AllPuomBundle\AllPuomBundleTestBA.wixproj" /> | ||
| 10 | </ItemGroup> | ||
| 11 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/PuomPkg1.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/PuomPkg1.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/PuomPkg1.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/product.wxs new file mode 100644 index 00000000..b136f7dd --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PuomPkg1" Name="PuomPkg1" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perUserOrMachine"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/PuomPkg2.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/PuomPkg2.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/PuomPkg2.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/product.wxs new file mode 100644 index 00000000..2c4cb170 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PuomPkg2" Name="PuomPkg2" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perUserOrMachine"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/WixTestTools/ArpEntryVerifier.cs b/src/test/burn/WixTestTools/ArpEntryVerifier.cs index b3c70337..4e43062a 100644 --- a/src/test/burn/WixTestTools/ArpEntryVerifier.cs +++ b/src/test/burn/WixTestTools/ArpEntryVerifier.cs | |||
| @@ -8,17 +8,25 @@ namespace WixTestTools | |||
| 8 | { | 8 | { |
| 9 | public bool TryGetRegistration(out GenericArpRegistration registration) | 9 | public bool TryGetRegistration(out GenericArpRegistration registration) |
| 10 | { | 10 | { |
| 11 | bool success = !this.PerMachine ? GenericArpRegistration.TryGetPerUserRegistrationById(this.ArpId, out registration) | 11 | var success = this.PerMachine |
| 12 | : GenericArpRegistration.TryGetPerMachineRegistrationById(this.ArpId, this.X64, out registration); | 12 | ? GenericArpRegistration.TryGetPerMachineRegistrationById(this.ArpId, this.X64, this.TestContext.TestOutputHelper, out registration) |
| 13 | : GenericArpRegistration.TryGetPerUserRegistrationById(this.ArpId, this.TestContext.TestOutputHelper, out registration); | ||
| 13 | 14 | ||
| 14 | return success; | 15 | return success; |
| 15 | } | 16 | } |
| 16 | 17 | ||
| 17 | public void VerifyRegistered(bool registered) | 18 | public void VerifyRegistered(bool registered) |
| 18 | { | 19 | { |
| 19 | bool success = this.TryGetRegistration(out _); | 20 | var success = this.TryGetRegistration(out _); |
| 20 | 21 | ||
| 21 | Assert.Equal(registered, success); | 22 | if (registered) |
| 23 | { | ||
| 24 | Assert.True(success); | ||
| 25 | } | ||
| 26 | else | ||
| 27 | { | ||
| 28 | Assert.False(success); | ||
| 29 | } | ||
| 22 | } | 30 | } |
| 23 | } | 31 | } |
| 24 | } | 32 | } |
diff --git a/src/test/burn/WixTestTools/BundleInstaller.cs b/src/test/burn/WixTestTools/BundleInstaller.cs index 0f2cfa8f..93602661 100644 --- a/src/test/burn/WixTestTools/BundleInstaller.cs +++ b/src/test/burn/WixTestTools/BundleInstaller.cs | |||
| @@ -189,7 +189,8 @@ namespace WixTestTools | |||
| 189 | /// <returns>Path to the generated log file.</returns> | 189 | /// <returns>Path to the generated log file.</returns> |
| 190 | private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null, string layoutDirectory = null) | 190 | private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null, string layoutDirectory = null) |
| 191 | { | 191 | { |
| 192 | TestTool bundle = new TestTool(bundlePath ?? this.Bundle); | 192 | var exePath = bundlePath ?? this.Bundle; |
| 193 | var bundle = new TestTool(exePath); | ||
| 193 | var sb = new StringBuilder(); | 194 | var sb = new StringBuilder(); |
| 194 | 195 | ||
| 195 | // Be sure to run silent. | 196 | // Be sure to run silent. |
| @@ -230,6 +231,8 @@ namespace WixTestTools | |||
| 230 | // Set the arguments. | 231 | // Set the arguments. |
| 231 | bundle.Arguments = sb.ToString(); | 232 | bundle.Arguments = sb.ToString(); |
| 232 | 233 | ||
| 234 | this.TestContext.TestOutputHelper.WriteLine($"Launching '{exePath}' with arguments '{bundle.Arguments}'..."); | ||
| 235 | |||
| 233 | // Run the tool and assert the expected code. | 236 | // Run the tool and assert the expected code. |
| 234 | bundle.ExpectedExitCode = expectedExitCode; | 237 | bundle.ExpectedExitCode = expectedExitCode; |
| 235 | bundle.AlternateExitCode = this.AlternateExitCode; | 238 | bundle.AlternateExitCode = this.AlternateExitCode; |
diff --git a/src/test/burn/WixTestTools/BundleRegistration.cs b/src/test/burn/WixTestTools/BundleRegistration.cs index 524d4616..57581510 100644 --- a/src/test/burn/WixTestTools/BundleRegistration.cs +++ b/src/test/burn/WixTestTools/BundleRegistration.cs | |||
| @@ -4,6 +4,7 @@ namespace WixTestTools | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using Microsoft.Win32; | 6 | using Microsoft.Win32; |
| 7 | using Xunit.Abstractions; | ||
| 7 | 8 | ||
| 8 | public class BundleRegistration : GenericArpRegistration | 9 | public class BundleRegistration : GenericArpRegistration |
| 9 | { | 10 | { |
| @@ -36,19 +37,19 @@ namespace WixTestTools | |||
| 36 | 37 | ||
| 37 | public string[] UpgradeCodes { get; set; } | 38 | public string[] UpgradeCodes { get; set; } |
| 38 | 39 | ||
| 39 | public static bool TryGetPerMachineBundleRegistrationById(string id, bool x64, out BundleRegistration registration) | 40 | public static bool TryGetPerMachineBundleRegistrationById(string id, bool x64, ITestOutputHelper testOutputHelper, out BundleRegistration registration) |
| 40 | { | 41 | { |
| 41 | return TryGetRegistrationById(id, x64, false, out registration); | 42 | return TryGetRegistrationById(id, x64, false, testOutputHelper, out registration); |
| 42 | } | 43 | } |
| 43 | 44 | ||
| 44 | public static bool TryGetPerUserBundleRegistrationById(string id, out BundleRegistration registration) | 45 | public static bool TryGetPerUserBundleRegistrationById(string id, ITestOutputHelper testOutputHelper, out BundleRegistration registration) |
| 45 | { | 46 | { |
| 46 | return TryGetRegistrationById(id, true, true, out registration); | 47 | return TryGetRegistrationById(id, true, true, testOutputHelper, out registration); |
| 47 | } | 48 | } |
| 48 | 49 | ||
| 49 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, out BundleRegistration registration) | 50 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, ITestOutputHelper testOutputHelper, out BundleRegistration registration) |
| 50 | { | 51 | { |
| 51 | registration = GetGenericArpRegistration(id, x64, perUser, key => GetBundleRegistration(key)); | 52 | registration = GetGenericArpRegistration(id, x64, perUser, testOutputHelper, key => GetBundleRegistration(key)); |
| 52 | return registration != null; | 53 | return registration != null; |
| 53 | } | 54 | } |
| 54 | 55 | ||
diff --git a/src/test/burn/WixTestTools/BundleVerifier.cs b/src/test/burn/WixTestTools/BundleVerifier.cs index b6181047..7bfba687 100644 --- a/src/test/burn/WixTestTools/BundleVerifier.cs +++ b/src/test/burn/WixTestTools/BundleVerifier.cs | |||
| @@ -5,8 +5,6 @@ namespace WixTestTools | |||
| 5 | using System; | 5 | using System; |
| 6 | using System.IO; | 6 | using System.IO; |
| 7 | using System.Linq; | 7 | using System.Linq; |
| 8 | using System.Text; | ||
| 9 | using System.Xml.Linq; | ||
| 10 | using Microsoft.Win32; | 8 | using Microsoft.Win32; |
| 11 | using WixInternal.TestSupport; | 9 | using WixInternal.TestSupport; |
| 12 | using WixToolset.Data; | 10 | using WixToolset.Data; |
| @@ -56,43 +54,64 @@ namespace WixTestTools | |||
| 56 | { | 54 | { |
| 57 | var bundleSymbol = this.GetBundleSymbol(); | 55 | var bundleSymbol = this.GetBundleSymbol(); |
| 58 | var x64 = bundleSymbol.Platform != Platform.X86; | 56 | var x64 = bundleSymbol.Platform != Platform.X86; |
| 57 | |||
| 59 | return x64 ? FULL_BURN_POLICY_REGISTRY_PATH : FULL_BURN_POLICY_REGISTRY_PATH_WOW6432NODE; | 58 | return x64 ? FULL_BURN_POLICY_REGISTRY_PATH : FULL_BURN_POLICY_REGISTRY_PATH_WOW6432NODE; |
| 60 | } | 59 | } |
| 61 | 60 | ||
| 62 | public string GetPackageCachePathForCacheId(string cacheId, bool perMachine) | 61 | public string GetPackageCachePathForCacheId(string cacheId, WixBundleScopeType? scope, bool? plannedPerMachine = null) |
| 63 | { | 62 | { |
| 64 | string cachePath; | 63 | string cachePath; |
| 65 | if (perMachine) | 64 | |
| 65 | if (scope == WixBundleScopeType.PerMachine) | ||
| 66 | { | 66 | { |
| 67 | using var policyKey = Registry.LocalMachine.OpenSubKey(this.GetFullBurnPolicyRegistryPath()); | 67 | cachePath = GetPerMachineCacheRoot(); |
| 68 | var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; | 68 | } |
| 69 | cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); | 69 | else if (scope == WixBundleScopeType.PerUser) |
| 70 | { | ||
| 71 | cachePath = GetPerUserCacheRoot(); | ||
| 70 | } | 72 | } |
| 71 | else | 73 | else |
| 72 | { | 74 | { |
| 73 | cachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), PACKAGE_CACHE_FOLDER_NAME); | 75 | cachePath = plannedPerMachine.Value ? GetPerMachineCacheRoot() : GetPerUserCacheRoot(); |
| 74 | } | 76 | } |
| 77 | |||
| 75 | return Path.Combine(cachePath, cacheId); | 78 | return Path.Combine(cachePath, cacheId); |
| 79 | |||
| 80 | string GetPerMachineCacheRoot() | ||
| 81 | { | ||
| 82 | using var policyKey = Registry.LocalMachine.OpenSubKey(this.GetFullBurnPolicyRegistryPath()); | ||
| 83 | var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; | ||
| 84 | return redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); | ||
| 85 | } | ||
| 86 | |||
| 87 | string GetPerUserCacheRoot() | ||
| 88 | { | ||
| 89 | return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), PACKAGE_CACHE_FOLDER_NAME); | ||
| 90 | } | ||
| 76 | } | 91 | } |
| 77 | 92 | ||
| 78 | public string GetExpectedCachedBundlePath() | 93 | public string GetExpectedCachedBundlePath(bool? plannedPerMachine = null) |
| 79 | { | 94 | { |
| 80 | var bundleSymbol = this.GetBundleSymbol(); | 95 | var bundleSymbol = this.GetBundleSymbol(); |
| 81 | var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleCode, bundleSymbol.PerMachine); | 96 | var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleCode, bundleSymbol.Scope, plannedPerMachine); |
| 97 | |||
| 82 | return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); | 98 | return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); |
| 83 | } | 99 | } |
| 84 | 100 | ||
| 85 | public string ManuallyCache() | 101 | public string ManuallyCache(bool? plannedPerMachine = null) |
| 86 | { | 102 | { |
| 87 | var expectedCachePath = this.GetExpectedCachedBundlePath(); | 103 | var expectedCachePath = this.GetExpectedCachedBundlePath(plannedPerMachine); |
| 104 | |||
| 88 | Directory.CreateDirectory(Path.GetDirectoryName(expectedCachePath)); | 105 | Directory.CreateDirectory(Path.GetDirectoryName(expectedCachePath)); |
| 89 | File.Copy(this.Bundle, expectedCachePath); | 106 | File.Copy(this.Bundle, expectedCachePath); |
| 107 | |||
| 90 | return expectedCachePath; | 108 | return expectedCachePath; |
| 91 | } | 109 | } |
| 92 | 110 | ||
| 93 | public void ManuallyUncache() | 111 | public void ManuallyUncache(bool? plannedPerMachine = null) |
| 94 | { | 112 | { |
| 95 | var expectedCachePath = this.GetExpectedCachedBundlePath(); | 113 | var expectedCachePath = this.GetExpectedCachedBundlePath(plannedPerMachine); |
| 114 | |||
| 96 | File.Delete(expectedCachePath); | 115 | File.Delete(expectedCachePath); |
| 97 | } | 116 | } |
| 98 | 117 | ||
| @@ -103,38 +122,51 @@ namespace WixTestTools | |||
| 103 | var section = intermediate.Sections.Single(); | 122 | var section = intermediate.Sections.Single(); |
| 104 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId); | 123 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId); |
| 105 | var exePackageSymbol = section.Symbols.OfType<WixBundleExePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId); | 124 | var exePackageSymbol = section.Symbols.OfType<WixBundleExePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId); |
| 125 | |||
| 106 | if (packageSymbol == null || exePackageSymbol == null || exePackageSymbol.DetectionType != WixBundleExePackageDetectionType.Arp) | 126 | if (packageSymbol == null || exePackageSymbol == null || exePackageSymbol.DetectionType != WixBundleExePackageDetectionType.Arp) |
| 107 | { | 127 | { |
| 128 | this.TestContext.TestOutputHelper.WriteLine($"Missing config for ExePackage {packageId}"); | ||
| 129 | |||
| 108 | arpId = null; | 130 | arpId = null; |
| 109 | arpVersion = null; | 131 | arpVersion = null; |
| 110 | arpWin64 = false; | 132 | arpWin64 = false; |
| 111 | perMachine = false; | 133 | perMachine = false; |
| 134 | |||
| 112 | return false; | 135 | return false; |
| 113 | } | 136 | } |
| 114 | 137 | ||
| 115 | arpId = exePackageSymbol.ArpId; | 138 | arpId = exePackageSymbol.ArpId; |
| 116 | arpVersion = exePackageSymbol.ArpDisplayVersion; | 139 | arpVersion = exePackageSymbol.ArpDisplayVersion; |
| 117 | arpWin64 = exePackageSymbol.ArpWin64; | 140 | arpWin64 = exePackageSymbol.ArpWin64; |
| 118 | perMachine = packageSymbol.PerMachine == true; | 141 | perMachine = packageSymbol.Scope == WixBundleScopeType.PerMachine; |
| 142 | |||
| 143 | this.TestContext.TestOutputHelper.WriteLine($"Config for ExePackage {packageId}: arpId={arpId}, arpVersion={arpVersion}, arpWin64={arpWin64}, perMachine={perMachine}"); | ||
| 144 | |||
| 119 | return true; | 145 | return true; |
| 120 | } | 146 | } |
| 121 | 147 | ||
| 122 | public bool TryGetRegistration(out BundleRegistration registration) | 148 | public bool TryGetRegistration(bool? plannedPerMachine, out BundleRegistration registration) |
| 123 | { | 149 | { |
| 124 | var bundleSymbol = this.GetBundleSymbol(); | 150 | var bundleSymbol = this.GetBundleSymbol(); |
| 125 | var x64 = bundleSymbol.Platform != Platform.X86; | 151 | var x64 = bundleSymbol.Platform != Platform.X86; |
| 126 | var bundleCode = bundleSymbol.BundleCode; | 152 | var bundleCode = bundleSymbol.BundleCode; |
| 127 | if (bundleSymbol.PerMachine) | 153 | |
| 154 | if (bundleSymbol.Scope == WixBundleScopeType.PerMachine) | ||
| 155 | { | ||
| 156 | return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleCode, x64, this.TestContext.TestOutputHelper, out registration); | ||
| 157 | } | ||
| 158 | else if (bundleSymbol.Scope == WixBundleScopeType.PerUser) | ||
| 128 | { | 159 | { |
| 129 | return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleCode, x64, out registration); | 160 | return BundleRegistration.TryGetPerUserBundleRegistrationById(bundleCode, this.TestContext.TestOutputHelper, out registration); |
| 130 | } | 161 | } |
| 131 | else | 162 | else |
| 132 | { | 163 | { |
| 133 | return BundleRegistration.TryGetPerUserBundleRegistrationById(bundleCode, out registration); | 164 | return plannedPerMachine.Value ? BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleCode, x64, this.TestContext.TestOutputHelper, out registration) |
| 165 | : BundleRegistration.TryGetPerUserBundleRegistrationById(bundleCode, this.TestContext.TestOutputHelper, out registration); | ||
| 134 | } | 166 | } |
| 135 | } | 167 | } |
| 136 | 168 | ||
| 137 | public bool TryGetUpdateRegistration(out BundleUpdateRegistration registration) | 169 | public bool TryGetUpdateRegistration(bool? plannedPerMachine, out BundleUpdateRegistration registration) |
| 138 | { | 170 | { |
| 139 | var bundleSymbol = this.GetBundleSymbol(); | 171 | var bundleSymbol = this.GetBundleSymbol(); |
| 140 | var x64 = bundleSymbol.Platform != Platform.X86; | 172 | var x64 = bundleSymbol.Platform != Platform.X86; |
| @@ -144,84 +176,93 @@ namespace WixTestTools | |||
| 144 | var productFamily = updateRegistrationSymbol.ProductFamily; | 176 | var productFamily = updateRegistrationSymbol.ProductFamily; |
| 145 | var name = updateRegistrationSymbol.Name; | 177 | var name = updateRegistrationSymbol.Name; |
| 146 | 178 | ||
| 147 | 179 | if (bundleSymbol.Scope == WixBundleScopeType.PerMachine) | |
| 148 | if (bundleSymbol.PerMachine) | ||
| 149 | { | 180 | { |
| 150 | return BundleUpdateRegistration.TryGetPerMachineBundleUpdateRegistration(manufacturer, productFamily, name, x64, out registration); | 181 | return BundleUpdateRegistration.TryGetPerMachineBundleUpdateRegistration(manufacturer, productFamily, name, x64, out registration); |
| 151 | } | 182 | } |
| 152 | else | 183 | else if (bundleSymbol.Scope == WixBundleScopeType.PerUser) |
| 153 | { | 184 | { |
| 154 | return BundleUpdateRegistration.TryGetPerUserBundleUpdateRegistration(manufacturer, productFamily, name, out registration); | 185 | return BundleUpdateRegistration.TryGetPerUserBundleUpdateRegistration(manufacturer, productFamily, name, out registration); |
| 155 | } | 186 | } |
| 187 | else | ||
| 188 | { | ||
| 189 | return plannedPerMachine.Value ? BundleUpdateRegistration.TryGetPerMachineBundleUpdateRegistration(manufacturer, productFamily, name, x64, out registration) | ||
| 190 | : BundleUpdateRegistration.TryGetPerUserBundleUpdateRegistration(manufacturer, productFamily, name, out registration); | ||
| 191 | } | ||
| 156 | } | 192 | } |
| 157 | 193 | ||
| 158 | public BundleRegistration VerifyRegisteredAndInPackageCache(int? expectedSystemComponent = null) | 194 | public BundleRegistration VerifyRegisteredAndInPackageCache(int? expectedSystemComponent = null, bool? plannedPerMachine = null) |
| 159 | { | 195 | { |
| 160 | Assert.True(this.TryGetRegistration(out var registration)); | 196 | Assert.True(this.TryGetRegistration(plannedPerMachine, out var registration)); |
| 161 | 197 | ||
| 162 | Assert.Equal(expectedSystemComponent, registration.SystemComponent); | 198 | Assert.Equal(expectedSystemComponent, registration.SystemComponent); |
| 163 | 199 | ||
| 164 | Assert.NotNull(registration.CachePath); | 200 | Assert.NotNull(registration.CachePath); |
| 165 | Assert.True(File.Exists(registration.CachePath)); | 201 | Assert.True(File.Exists(registration.CachePath)); |
| 166 | 202 | ||
| 167 | var expectedCachePath = this.GetExpectedCachedBundlePath(); | 203 | var expectedCachePath = this.GetExpectedCachedBundlePath(plannedPerMachine); |
| 168 | WixAssert.StringEqual(expectedCachePath, registration.CachePath, true); | 204 | WixAssert.StringEqual(expectedCachePath, registration.CachePath, true); |
| 169 | 205 | ||
| 170 | return registration; | 206 | return registration; |
| 171 | } | 207 | } |
| 172 | 208 | ||
| 173 | public void VerifyUnregisteredAndRemovedFromPackageCache() | 209 | public void VerifyUnregisteredAndRemovedFromPackageCache(bool? plannedPerMachine = null) |
| 174 | { | 210 | { |
| 175 | var cachedBundlePath = this.GetExpectedCachedBundlePath(); | 211 | var cachedBundlePath = this.GetExpectedCachedBundlePath(plannedPerMachine); |
| 176 | this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); | 212 | |
| 213 | this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath, plannedPerMachine); | ||
| 177 | } | 214 | } |
| 178 | 215 | ||
| 179 | public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) | 216 | public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath, bool? plannedPerMachine = null) |
| 180 | { | 217 | { |
| 181 | Assert.False(this.TryGetRegistration(out _), $"Bundle cached at '{cachedBundlePath}' should not still be registered."); | 218 | Assert.False(this.TryGetRegistration(plannedPerMachine, out _), $"Bundle cached at '{cachedBundlePath}' should not still be registered."); |
| 182 | Assert.False(File.Exists(cachedBundlePath), $"Cached bundle should have been removed from package cache at '{cachedBundlePath}'."); | 219 | Assert.False(File.Exists(cachedBundlePath), $"Cached bundle should have been removed from package cache at '{cachedBundlePath}'."); |
| 183 | } | 220 | } |
| 184 | 221 | ||
| 185 | public void RemovePackageFromCache(string packageId) | 222 | public void RemovePackageFromCache(string packageId, bool? plannedPerMachine = null) |
| 186 | { | 223 | { |
| 187 | using var wixOutput = WixOutput.Read(this.BundlePdb); | 224 | using var wixOutput = WixOutput.Read(this.BundlePdb); |
| 188 | var intermediate = Intermediate.Load(wixOutput); | 225 | var intermediate = Intermediate.Load(wixOutput); |
| 189 | var section = intermediate.Sections.Single(); | 226 | var section = intermediate.Sections.Single(); |
| 190 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); | 227 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); |
| 191 | var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == true); | 228 | var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.Scope, plannedPerMachine); |
| 229 | |||
| 192 | if (Directory.Exists(cachePath)) | 230 | if (Directory.Exists(cachePath)) |
| 193 | { | 231 | { |
| 194 | Directory.Delete(cachePath, true); | 232 | Directory.Delete(cachePath, true); |
| 195 | } | 233 | } |
| 196 | } | 234 | } |
| 197 | 235 | ||
| 198 | public string GetPackageEntryPointCachePath(string packageId) | 236 | public string GetPackageEntryPointCachePath(string packageId, bool? plannedPerMachine = null) |
| 199 | { | 237 | { |
| 200 | using var wixOutput = WixOutput.Read(this.BundlePdb); | 238 | using var wixOutput = WixOutput.Read(this.BundlePdb); |
| 201 | var intermediate = Intermediate.Load(wixOutput); | 239 | var intermediate = Intermediate.Load(wixOutput); |
| 202 | var section = intermediate.Sections.Single(); | 240 | var section = intermediate.Sections.Single(); |
| 203 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); | 241 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); |
| 204 | var packagePayloadSymbol = section.Symbols.OfType<WixBundlePayloadSymbol>().Single(p => p.Id.Id == packageSymbol.PayloadRef); | 242 | var packagePayloadSymbol = section.Symbols.OfType<WixBundlePayloadSymbol>().Single(p => p.Id.Id == packageSymbol.PayloadRef); |
| 205 | var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == true); | 243 | var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.Scope, plannedPerMachine); |
| 244 | |||
| 206 | return Path.Combine(cachePath, packagePayloadSymbol.Name); | 245 | return Path.Combine(cachePath, packagePayloadSymbol.Name); |
| 207 | } | 246 | } |
| 208 | 247 | ||
| 209 | public void VerifyPackageIsCached(string packageId, bool cached = true) | 248 | public void VerifyPackageIsCached(string packageId, bool cached = true, bool? plannedPerMachine = null) |
| 210 | { | 249 | { |
| 211 | var entryPointCachePath = this.GetPackageEntryPointCachePath(packageId); | 250 | var entryPointCachePath = this.GetPackageEntryPointCachePath(packageId, plannedPerMachine); |
| 251 | |||
| 212 | Assert.Equal(cached, File.Exists(entryPointCachePath)); | 252 | Assert.Equal(cached, File.Exists(entryPointCachePath)); |
| 213 | } | 253 | } |
| 214 | 254 | ||
| 215 | public void VerifyPackageProviderRemoved(string packageId) | 255 | public void VerifyPackageProviderRemoved(string packageId, bool? plannedPerMachine = null) |
| 216 | { | 256 | { |
| 217 | using var wixOutput = WixOutput.Read(this.BundlePdb); | 257 | using var wixOutput = WixOutput.Read(this.BundlePdb); |
| 218 | var intermediate = Intermediate.Load(wixOutput); | 258 | var intermediate = Intermediate.Load(wixOutput); |
| 219 | var section = intermediate.Sections.Single(); | 259 | var section = intermediate.Sections.Single(); |
| 220 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); | 260 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); |
| 221 | var providerSymbol = section.Symbols.OfType<WixDependencyProviderSymbol>().Single(p => p.ParentRef == packageId); | 261 | var providerSymbol = section.Symbols.OfType<WixDependencyProviderSymbol>().Single(p => p.ParentRef == packageId); |
| 222 | var registryRoot = packageSymbol.PerMachine == true ? Registry.LocalMachine : Registry.CurrentUser; | 262 | var registryRoot = plannedPerMachine.HasValue ? (plannedPerMachine.Value ? Registry.LocalMachine : Registry.CurrentUser) : packageSymbol.Scope == WixBundleScopeType.PerMachine ? Registry.LocalMachine : Registry.CurrentUser; |
| 223 | var subkeyPath = Path.Combine(DependencyRegistryRoot, providerSymbol.ProviderKey); | 263 | var subkeyPath = Path.Combine(DependencyRegistryRoot, providerSymbol.ProviderKey); |
| 224 | using var registryKey = registryRoot.OpenSubKey(subkeyPath); | 264 | using var registryKey = registryRoot.OpenSubKey(subkeyPath); |
| 265 | |||
| 225 | if (registryKey != null) | 266 | if (registryKey != null) |
| 226 | { | 267 | { |
| 227 | WixAssert.StringEqual(null, subkeyPath); | 268 | WixAssert.StringEqual(null, subkeyPath); |
diff --git a/src/test/burn/WixTestTools/GenericArpRegistration.cs b/src/test/burn/WixTestTools/GenericArpRegistration.cs index dfddd9a3..f3590fa4 100644 --- a/src/test/burn/WixTestTools/GenericArpRegistration.cs +++ b/src/test/burn/WixTestTools/GenericArpRegistration.cs | |||
| @@ -4,6 +4,8 @@ namespace WixTestTools | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using Microsoft.Win32; | 6 | using Microsoft.Win32; |
| 7 | using Xunit; | ||
| 8 | using Xunit.Abstractions; | ||
| 7 | 9 | ||
| 8 | public class GenericArpRegistration | 10 | public class GenericArpRegistration |
| 9 | { | 11 | { |
| @@ -69,23 +71,23 @@ namespace WixTestTools | |||
| 69 | 71 | ||
| 70 | public string UrlUpdateInfo { get; set; } | 72 | public string UrlUpdateInfo { get; set; } |
| 71 | 73 | ||
| 72 | public static bool TryGetPerMachineRegistrationById(string id, bool x64, out GenericArpRegistration registration) | 74 | public static bool TryGetPerMachineRegistrationById(string id, bool x64, ITestOutputHelper testOutputHelper, out GenericArpRegistration registration) |
| 73 | { | 75 | { |
| 74 | return TryGetRegistrationById(id, x64, false, out registration); | 76 | return TryGetRegistrationById(id, x64, perUser: false, testOutputHelper, out registration); |
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | public static bool TryGetPerUserRegistrationById(string id, out GenericArpRegistration registration) | 79 | public static bool TryGetPerUserRegistrationById(string id, ITestOutputHelper testOutputHelper, out GenericArpRegistration registration) |
| 78 | { | 80 | { |
| 79 | return TryGetRegistrationById(id, true, true, out registration); | 81 | return TryGetRegistrationById(id, x64: true, perUser: true, testOutputHelper, out registration); |
| 80 | } | 82 | } |
| 81 | 83 | ||
| 82 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, out GenericArpRegistration registration) | 84 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, ITestOutputHelper testOutputHelper, out GenericArpRegistration registration) |
| 83 | { | 85 | { |
| 84 | registration = GetGenericArpRegistration(id, x64, perUser, key => new GenericArpRegistration()); | 86 | registration = GetGenericArpRegistration(id, x64, perUser, testOutputHelper, key => new GenericArpRegistration()); |
| 85 | return registration != null; | 87 | return registration != null; |
| 86 | } | 88 | } |
| 87 | 89 | ||
| 88 | protected static T GetGenericArpRegistration<T>(string id, bool x64, bool perUser, Func<RegistryKey, T> fnCreate) | 90 | protected static T GetGenericArpRegistration<T>(string id, bool x64, bool perUser, ITestOutputHelper testOutputHelper, Func<RegistryKey, T> fnCreate) |
| 89 | where T : GenericArpRegistration | 91 | where T : GenericArpRegistration |
| 90 | { | 92 | { |
| 91 | var baseKey = perUser ? Registry.CurrentUser : Registry.LocalMachine; | 93 | var baseKey = perUser ? Registry.CurrentUser : Registry.LocalMachine; |
| @@ -95,6 +97,8 @@ namespace WixTestTools | |||
| 95 | 97 | ||
| 96 | if (idKey == null) | 98 | if (idKey == null) |
| 97 | { | 99 | { |
| 100 | testOutputHelper.WriteLine($"Failed to open key {baseKey} {registrationKeyPath} (per-user {perUser})."); | ||
| 101 | |||
| 98 | return null; | 102 | return null; |
| 99 | } | 103 | } |
| 100 | 104 | ||
diff --git a/src/test/burn/WixTestTools/PackageVerifier.cs b/src/test/burn/WixTestTools/PackageVerifier.cs index 76bc17ab..f7c7b2e6 100644 --- a/src/test/burn/WixTestTools/PackageVerifier.cs +++ b/src/test/burn/WixTestTools/PackageVerifier.cs | |||
| @@ -82,14 +82,32 @@ namespace WixTestTools | |||
| 82 | return MsiUtilities.IsProductInstalledWithVersion(productCode, prodVersion); | 82 | return MsiUtilities.IsProductInstalledWithVersion(productCode, prodVersion); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | public void VerifyInstalled(bool installed) | 85 | public void VerifyInstalled(bool installed = true) |
| 86 | { | 86 | { |
| 87 | Assert.Equal(installed, this.IsInstalled()); | 87 | var isInstalled = this.IsInstalled(); |
| 88 | |||
| 89 | if (installed) | ||
| 90 | { | ||
| 91 | Assert.True(isInstalled); | ||
| 92 | } | ||
| 93 | else | ||
| 94 | { | ||
| 95 | Assert.False(isInstalled); | ||
| 96 | } | ||
| 88 | } | 97 | } |
| 89 | 98 | ||
| 90 | public void VerifyInstalledWithVersion(bool installed) | 99 | public void VerifyInstalledWithVersion(bool installed = true) |
| 91 | { | 100 | { |
| 92 | Assert.Equal(installed, this.IsInstalledWithVersion()); | 101 | var isInstalled = this.IsInstalledWithVersion(); |
| 102 | |||
| 103 | if (installed) | ||
| 104 | { | ||
| 105 | Assert.True(isInstalled); | ||
| 106 | } | ||
| 107 | else | ||
| 108 | { | ||
| 109 | Assert.False(isInstalled); | ||
| 110 | } | ||
| 93 | } | 111 | } |
| 94 | 112 | ||
| 95 | public void DeleteTestRegistryValue(string name) | 113 | public void DeleteTestRegistryValue(string name) |
diff --git a/src/test/burn/WixTestTools/TestTool.cs b/src/test/burn/WixTestTools/TestTool.cs index b6d18ac9..6c9ad1d7 100644 --- a/src/test/burn/WixTestTools/TestTool.cs +++ b/src/test/burn/WixTestTools/TestTool.cs | |||
| @@ -26,7 +26,7 @@ namespace WixTestTools | |||
| 26 | public TestTool(string toolFile) | 26 | public TestTool(string toolFile) |
| 27 | : base(toolFile) | 27 | : base(toolFile) |
| 28 | { | 28 | { |
| 29 | this.PrintOutputToConsole = true; | 29 | this.PrintOutputToConsoleOnError = true; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | /// <summary> | 32 | /// <summary> |
| @@ -75,6 +75,11 @@ namespace WixTestTools | |||
| 75 | public bool PrintOutputToConsole { get; set; } | 75 | public bool PrintOutputToConsole { get; set; } |
| 76 | 76 | ||
| 77 | /// <summary> | 77 | /// <summary> |
| 78 | /// Print output from the tool execution to the console | ||
| 79 | /// </summary> | ||
| 80 | public bool PrintOutputToConsoleOnError { get; set; } | ||
| 81 | |||
| 82 | /// <summary> | ||
| 78 | /// The working directory of the tool | 83 | /// The working directory of the tool |
| 79 | /// </summary> | 84 | /// </summary> |
| 80 | public string WorkingDirectory { get; set; } | 85 | public string WorkingDirectory { get; set; } |
| @@ -123,7 +128,12 @@ namespace WixTestTools | |||
| 123 | 128 | ||
| 124 | if (assertOnError && 0 < this.Errors.Count) | 129 | if (assertOnError && 0 < this.Errors.Count) |
| 125 | { | 130 | { |
| 126 | if (this.PrintOutputToConsole) | 131 | if (this.PrintOutputToConsoleOnError) |
| 132 | { | ||
| 133 | Console.WriteLine(FormatResult(result)); | ||
| 134 | } | ||
| 135 | |||
| 136 | if (this.PrintOutputToConsole || this.PrintOutputToConsoleOnError) | ||
| 127 | { | 137 | { |
| 128 | this.PrintErrors(); | 138 | this.PrintErrors(); |
| 129 | } | 139 | } |
diff --git a/src/test/burn/WixTestTools/WixTestContext.cs b/src/test/burn/WixTestTools/WixTestContext.cs index a87a56fa..b30d5739 100644 --- a/src/test/burn/WixTestTools/WixTestContext.cs +++ b/src/test/burn/WixTestTools/WixTestContext.cs | |||
| @@ -16,6 +16,8 @@ namespace WixTestTools | |||
| 16 | 16 | ||
| 17 | public WixTestContext(ITestOutputHelper testOutputHelper) | 17 | public WixTestContext(ITestOutputHelper testOutputHelper) |
| 18 | { | 18 | { |
| 19 | this.TestOutputHelper = testOutputHelper; | ||
| 20 | |||
| 19 | var test = GetTest(testOutputHelper); | 21 | var test = GetTest(testOutputHelper); |
| 20 | var splitClassName = test.TestCase.TestMethod.TestClass.Class.Name.Split('.'); | 22 | var splitClassName = test.TestCase.TestMethod.TestClass.Class.Name.Split('.'); |
| 21 | 23 | ||
| @@ -34,6 +36,8 @@ namespace WixTestTools | |||
| 34 | 36 | ||
| 35 | public string TestName { get; } | 37 | public string TestName { get; } |
| 36 | 38 | ||
| 39 | public ITestOutputHelper TestOutputHelper { get; } | ||
| 40 | |||
| 37 | /// <summary> | 41 | /// <summary> |
| 38 | /// Gets the test install directory for the current test. | 42 | /// Gets the test install directory for the current test. |
| 39 | /// </summary> | 43 | /// </summary> |
diff --git a/src/test/burn/WixToolset.WixBA/WixBA.cs b/src/test/burn/WixToolset.WixBA/WixBA.cs index dca12ce8..a98bfa36 100644 --- a/src/test/burn/WixToolset.WixBA/WixBA.cs +++ b/src/test/burn/WixToolset.WixBA/WixBA.cs | |||
| @@ -104,7 +104,7 @@ namespace WixToolset.WixBA | |||
| 104 | public static void Plan(LaunchAction action) | 104 | public static void Plan(LaunchAction action) |
| 105 | { | 105 | { |
| 106 | WixBA.Model.PlannedAction = action; | 106 | WixBA.Model.PlannedAction = action; |
| 107 | WixBA.Model.Engine.Plan(WixBA.Model.PlannedAction); | 107 | WixBA.Model.Engine.Plan(WixBA.Model.PlannedAction, BundleScope.Default); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | public static void PlanLayout() | 110 | public static void PlanLayout() |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs index dc793cf0..b066899b 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs | |||
| @@ -92,7 +92,7 @@ namespace WixToolsetTest.BurnE2E | |||
| 92 | 92 | ||
| 93 | Assert.True(LogVerifier.MessageInLogFile(logPath, "Applied execute package: v3bundle.exe, result: 0x0, restart: None")); | 93 | Assert.True(LogVerifier.MessageInLogFile(logPath, "Applied execute package: v3bundle.exe, result: 0x0, restart: None")); |
| 94 | 94 | ||
| 95 | Assert.True(BundleRegistration.TryGetPerMachineBundleRegistrationById(v3BundleId, false, out var v3Registration)); | 95 | Assert.True(BundleRegistration.TryGetPerMachineBundleRegistrationById(v3BundleId, false, this.TestContext.TestOutputHelper, out var v3Registration)); |
| 96 | Assert.Null(v3Registration.SystemComponent); | 96 | Assert.Null(v3Registration.SystemComponent); |
| 97 | } | 97 | } |
| 98 | 98 | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs new file mode 100644 index 00000000..1b7d6d75 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs | |||
| @@ -0,0 +1,631 @@ | |||
| 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 WixTestTools; | ||
| 6 | using WixToolset.BootstrapperApplicationApi; | ||
| 7 | using Xunit; | ||
| 8 | using Xunit.Abstractions; | ||
| 9 | |||
| 10 | public class ConfigurableScopeTests : BurnE2ETests | ||
| 11 | { | ||
| 12 | public ConfigurableScopeTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
| 13 | |||
| 14 | [RuntimeFact] | ||
| 15 | public void CommandLineScopeTestNoopBecauseNonDefaultPlan() | ||
| 16 | { | ||
| 17 | var testBAController = this.CreateTestBAController(); | ||
| 18 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 19 | |||
| 20 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 21 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 22 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 23 | var log = bundle.Install(arguments: "/peruser"); | ||
| 24 | |||
| 25 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 26 | pkg1.VerifyInstalled(); | ||
| 27 | pkg2.VerifyInstalled(); | ||
| 28 | |||
| 29 | Assert.True(LogVerifier.MessageInLogFile(log, "Scope command-line switch ignored because the bootstrapper application already specified a scope.")); | ||
| 30 | |||
| 31 | bundle.Uninstall(); | ||
| 32 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 33 | pkg1.VerifyInstalled(false); | ||
| 34 | pkg2.VerifyInstalled(false); | ||
| 35 | } | ||
| 36 | |||
| 37 | [RuntimeFact] | ||
| 38 | public void CommandLineScopeTestNoopBecauseNoConfigurablePackages() | ||
| 39 | { | ||
| 40 | var bundle = this.CreateBundleInstaller("PerMachineBundle"); | ||
| 41 | var log = bundle.Install(arguments: "/peruser"); | ||
| 42 | |||
| 43 | Assert.True(LogVerifier.MessageInLogFile(log, "Scope command-line switch ignored because the bundle doesn't have any packages with configurable scope.")); | ||
| 44 | } | ||
| 45 | |||
| 46 | [RuntimeFact] | ||
| 47 | public void CommandLineScopeTestPerUser() | ||
| 48 | { | ||
| 49 | var testBAController = this.CreateTestBAController(); | ||
| 50 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 51 | |||
| 52 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 53 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 54 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 55 | var log = bundle.Install(arguments: "/peruser"); | ||
| 56 | |||
| 57 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 58 | pkg1.VerifyInstalled(); | ||
| 59 | pkg2.VerifyInstalled(); | ||
| 60 | |||
| 61 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); | ||
| 62 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 63 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 64 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 65 | |||
| 66 | bundle.Uninstall(arguments: "/peruser"); | ||
| 67 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 68 | pkg1.VerifyInstalled(false); | ||
| 69 | pkg2.VerifyInstalled(false); | ||
| 70 | } | ||
| 71 | |||
| 72 | [RuntimeFact] | ||
| 73 | public void CommandLineScopeTestPerMachine() | ||
| 74 | { | ||
| 75 | var testBAController = this.CreateTestBAController(); | ||
| 76 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 77 | |||
| 78 | var bundle = this.CreateBundleInstaller("AllPuomBundleTestBA"); | ||
| 79 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 80 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 81 | var log = bundle.Install(arguments: "/permachine"); | ||
| 82 | |||
| 83 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 84 | pkg1.VerifyInstalled(); | ||
| 85 | pkg2.VerifyInstalled(); | ||
| 86 | |||
| 87 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); | ||
| 88 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 89 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 90 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 91 | |||
| 92 | bundle.Uninstall(arguments: "/permachine"); | ||
| 93 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 94 | pkg1.VerifyInstalled(false); | ||
| 95 | pkg2.VerifyInstalled(false); | ||
| 96 | } | ||
| 97 | |||
| 98 | [RuntimeFact] | ||
| 99 | public void PMOU_Bundle_Default_Plan_Installs_PerMachine() | ||
| 100 | { | ||
| 101 | var testBAController = this.CreateTestBAController(); | ||
| 102 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 103 | |||
| 104 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 105 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 106 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 107 | var log = bundle.Install(); | ||
| 108 | |||
| 109 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 110 | pkg1.VerifyInstalled(); | ||
| 111 | pkg2.VerifyInstalled(); | ||
| 112 | |||
| 113 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); | ||
| 114 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 115 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 116 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 117 | |||
| 118 | bundle.Uninstall(); | ||
| 119 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 120 | pkg1.VerifyInstalled(false); | ||
| 121 | pkg2.VerifyInstalled(false); | ||
| 122 | } | ||
| 123 | |||
| 124 | [RuntimeFact] | ||
| 125 | public void PUOM_Bundle_Default_Plan_Installs_PerUser() | ||
| 126 | { | ||
| 127 | var testBAController = this.CreateTestBAController(); | ||
| 128 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 129 | |||
| 130 | var bundle = this.CreateBundleInstaller("AllPuomBundleTestBA"); | ||
| 131 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 132 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 133 | var log = bundle.Install(); | ||
| 134 | |||
| 135 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 136 | pkg1.VerifyInstalled(); | ||
| 137 | pkg2.VerifyInstalled(); | ||
| 138 | |||
| 139 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); | ||
| 140 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 141 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 142 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 143 | |||
| 144 | bundle.Uninstall(); | ||
| 145 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 146 | pkg1.VerifyInstalled(false); | ||
| 147 | pkg2.VerifyInstalled(false); | ||
| 148 | } | ||
| 149 | |||
| 150 | [RuntimeFact] | ||
| 151 | public void PMOU_Bundle_PM_Plan_Installs_PerMachine() | ||
| 152 | { | ||
| 153 | var testBAController = this.CreateTestBAController(); | ||
| 154 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 155 | |||
| 156 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 157 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 158 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 159 | var log = bundle.Install(); | ||
| 160 | |||
| 161 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 162 | pkg1.VerifyInstalled(); | ||
| 163 | pkg2.VerifyInstalled(); | ||
| 164 | |||
| 165 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: PerMachine")); | ||
| 166 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 167 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 168 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 169 | |||
| 170 | bundle.Uninstall(); | ||
| 171 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 172 | pkg1.VerifyInstalled(false); | ||
| 173 | pkg2.VerifyInstalled(false); | ||
| 174 | } | ||
| 175 | |||
| 176 | [RuntimeFact] | ||
| 177 | public void PUOM_Bundle_PM_Plan_Installs_PerMachine() | ||
| 178 | { | ||
| 179 | var testBAController = this.CreateTestBAController(); | ||
| 180 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 181 | |||
| 182 | var bundle = this.CreateBundleInstaller("AllPuomBundleTestBA"); | ||
| 183 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 184 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 185 | var log = bundle.Install(); | ||
| 186 | |||
| 187 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 188 | pkg1.VerifyInstalled(); | ||
| 189 | pkg2.VerifyInstalled(); | ||
| 190 | |||
| 191 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: PerMachine")); | ||
| 192 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 193 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 194 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 195 | |||
| 196 | bundle.Uninstall(); | ||
| 197 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 198 | pkg1.VerifyInstalled(false); | ||
| 199 | pkg2.VerifyInstalled(false); | ||
| 200 | } | ||
| 201 | |||
| 202 | [RuntimeFact] | ||
| 203 | public void PMOU_Bundle_PU_Plan_Installs_PerUser() | ||
| 204 | { | ||
| 205 | var testBAController = this.CreateTestBAController(); | ||
| 206 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 207 | |||
| 208 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 209 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 210 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 211 | var log = bundle.Install(); | ||
| 212 | |||
| 213 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 214 | pkg1.VerifyInstalled(); | ||
| 215 | pkg2.VerifyInstalled(); | ||
| 216 | |||
| 217 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: PerUser")); | ||
| 218 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 219 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 220 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 221 | |||
| 222 | bundle.Uninstall(); | ||
| 223 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 224 | pkg1.VerifyInstalled(false); | ||
| 225 | pkg2.VerifyInstalled(false); | ||
| 226 | } | ||
| 227 | |||
| 228 | [RuntimeFact] | ||
| 229 | public void PUOM_Bundle_PU_Plan_Installs_PerUser() | ||
| 230 | { | ||
| 231 | var testBAController = this.CreateTestBAController(); | ||
| 232 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 233 | |||
| 234 | var bundle = this.CreateBundleInstaller("AllPuomBundleTestBA"); | ||
| 235 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 236 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 237 | var log = bundle.Install(); | ||
| 238 | |||
| 239 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 240 | pkg1.VerifyInstalled(); | ||
| 241 | pkg2.VerifyInstalled(); | ||
| 242 | |||
| 243 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: PerUser")); | ||
| 244 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 245 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 246 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 247 | |||
| 248 | bundle.Uninstall(); | ||
| 249 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 250 | pkg1.VerifyInstalled(false); | ||
| 251 | pkg2.VerifyInstalled(false); | ||
| 252 | } | ||
| 253 | |||
| 254 | [RuntimeFact] | ||
| 255 | public void PM_PMOU_Bundle_Default_Plan_Installs_PerMachine() | ||
| 256 | { | ||
| 257 | var testBAController = this.CreateTestBAController(); | ||
| 258 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 259 | |||
| 260 | var bundle = this.CreateBundleInstaller("PmPmouBundleTestBA"); | ||
| 261 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 262 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 263 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 264 | var log = bundle.Install(); | ||
| 265 | |||
| 266 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 267 | perMachinePkg.VerifyInstalled(); | ||
| 268 | pkg1.VerifyInstalled(); | ||
| 269 | pkg2.VerifyInstalled(); | ||
| 270 | |||
| 271 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: Default")); | ||
| 272 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 273 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 274 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 275 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 276 | |||
| 277 | bundle.Uninstall(); | ||
| 278 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 279 | perMachinePkg.VerifyInstalled(false); | ||
| 280 | pkg1.VerifyInstalled(false); | ||
| 281 | pkg2.VerifyInstalled(false); | ||
| 282 | } | ||
| 283 | |||
| 284 | [RuntimeFact] | ||
| 285 | public void PM_PMOU_Bundle_PM_Plan_Installs_PerMachine() | ||
| 286 | { | ||
| 287 | var testBAController = this.CreateTestBAController(); | ||
| 288 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 289 | |||
| 290 | var bundle = this.CreateBundleInstaller("PmPmouBundleTestBA"); | ||
| 291 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 292 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 293 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 294 | var log = bundle.Install(); | ||
| 295 | |||
| 296 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 297 | perMachinePkg.VerifyInstalled(); | ||
| 298 | pkg1.VerifyInstalled(); | ||
| 299 | pkg2.VerifyInstalled(); | ||
| 300 | |||
| 301 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: PerMachine")); | ||
| 302 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 303 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 304 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 305 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 306 | |||
| 307 | bundle.Uninstall(); | ||
| 308 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 309 | perMachinePkg.VerifyInstalled(false); | ||
| 310 | pkg1.VerifyInstalled(false); | ||
| 311 | pkg2.VerifyInstalled(false); | ||
| 312 | } | ||
| 313 | |||
| 314 | [RuntimeFact] | ||
| 315 | public void PM_PMOU_Bundle_PU_Plan_Installs_PerUserMostly() | ||
| 316 | { | ||
| 317 | var testBAController = this.CreateTestBAController(); | ||
| 318 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 319 | |||
| 320 | var bundle = this.CreateBundleInstaller("PmPmouBundleTestBA"); | ||
| 321 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 322 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 323 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 324 | var log = bundle.Install(); | ||
| 325 | |||
| 326 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 327 | perMachinePkg.VerifyInstalled(); | ||
| 328 | pkg1.VerifyInstalled(); | ||
| 329 | pkg2.VerifyInstalled(); | ||
| 330 | |||
| 331 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: PerUser")); | ||
| 332 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 333 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 334 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 335 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 336 | |||
| 337 | bundle.Uninstall(); | ||
| 338 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 339 | perMachinePkg.VerifyInstalled(false); | ||
| 340 | pkg1.VerifyInstalled(false); | ||
| 341 | pkg2.VerifyInstalled(false); | ||
| 342 | } | ||
| 343 | |||
| 344 | [RuntimeFact] | ||
| 345 | public void PM_PUOM_Bundle_Default_Plan_Installs_PerUser() | ||
| 346 | { | ||
| 347 | var testBAController = this.CreateTestBAController(); | ||
| 348 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 349 | |||
| 350 | var bundle = this.CreateBundleInstaller("PmPuomBundleTestBA"); | ||
| 351 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 352 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 353 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 354 | var log = bundle.Install(); | ||
| 355 | |||
| 356 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 357 | perMachinePkg.VerifyInstalled(); | ||
| 358 | pkg1.VerifyInstalled(); | ||
| 359 | pkg2.VerifyInstalled(); | ||
| 360 | |||
| 361 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: Default")); | ||
| 362 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 363 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 364 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 365 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 366 | |||
| 367 | bundle.Uninstall(); | ||
| 368 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 369 | perMachinePkg.VerifyInstalled(false); | ||
| 370 | pkg1.VerifyInstalled(false); | ||
| 371 | pkg2.VerifyInstalled(false); | ||
| 372 | } | ||
| 373 | |||
| 374 | [RuntimeFact] | ||
| 375 | public void PM_PUOM_Bundle_PM_Plan_Installs_PerMachine() | ||
| 376 | { | ||
| 377 | var testBAController = this.CreateTestBAController(); | ||
| 378 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 379 | |||
| 380 | var bundle = this.CreateBundleInstaller("PmPuomBundleTestBA"); | ||
| 381 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 382 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 383 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 384 | var log = bundle.Install(); | ||
| 385 | |||
| 386 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 387 | perMachinePkg.VerifyInstalled(); | ||
| 388 | pkg1.VerifyInstalled(); | ||
| 389 | pkg2.VerifyInstalled(); | ||
| 390 | |||
| 391 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: PerMachine")); | ||
| 392 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 393 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 394 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 395 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 396 | |||
| 397 | bundle.Uninstall(); | ||
| 398 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 399 | perMachinePkg.VerifyInstalled(false); | ||
| 400 | pkg1.VerifyInstalled(false); | ||
| 401 | pkg2.VerifyInstalled(false); | ||
| 402 | } | ||
| 403 | |||
| 404 | [RuntimeFact] | ||
| 405 | public void PM_PUOM_Bundle_PU_Plan_Installs_PerUserMostly() | ||
| 406 | { | ||
| 407 | var testBAController = this.CreateTestBAController(); | ||
| 408 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 409 | |||
| 410 | var bundle = this.CreateBundleInstaller("PmPuomBundleTestBA"); | ||
| 411 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 412 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 413 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 414 | var log = bundle.Install(); | ||
| 415 | |||
| 416 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 417 | perMachinePkg.VerifyInstalled(); | ||
| 418 | pkg1.VerifyInstalled(); | ||
| 419 | pkg2.VerifyInstalled(); | ||
| 420 | |||
| 421 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: PerUser")); | ||
| 422 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 423 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 424 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 425 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 426 | |||
| 427 | bundle.Uninstall(); | ||
| 428 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 429 | perMachinePkg.VerifyInstalled(false); | ||
| 430 | pkg1.VerifyInstalled(false); | ||
| 431 | pkg2.VerifyInstalled(false); | ||
| 432 | } | ||
| 433 | |||
| 434 | [RuntimeFact] | ||
| 435 | public void PM_PU_PMOU_Bundle_Default_Plan_Installs_PerMachine() | ||
| 436 | { | ||
| 437 | var testBAController = this.CreateTestBAController(); | ||
| 438 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 439 | |||
| 440 | var bundle = this.CreateBundleInstaller("PmPuPmouBundleTestBA"); | ||
| 441 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 442 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 443 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 444 | var log = bundle.Install(); | ||
| 445 | |||
| 446 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 447 | perMachinePkg.VerifyInstalled(); | ||
| 448 | pkg1.VerifyInstalled(); | ||
| 449 | pkg2.VerifyInstalled(); | ||
| 450 | |||
| 451 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: Default")); | ||
| 452 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 453 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 454 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 455 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 456 | |||
| 457 | bundle.Uninstall(); | ||
| 458 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 459 | perMachinePkg.VerifyInstalled(false); | ||
| 460 | pkg1.VerifyInstalled(false); | ||
| 461 | pkg2.VerifyInstalled(false); | ||
| 462 | } | ||
| 463 | |||
| 464 | [RuntimeFact] | ||
| 465 | public void PM_PU_PMOU_Bundle_PM_Plan_Installs_PerMachine() | ||
| 466 | { | ||
| 467 | var testBAController = this.CreateTestBAController(); | ||
| 468 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 469 | |||
| 470 | var bundle = this.CreateBundleInstaller("PmPuPmouBundleTestBA"); | ||
| 471 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 472 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 473 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 474 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 475 | var log = bundle.Install(); | ||
| 476 | |||
| 477 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 478 | perMachinePkg.VerifyInstalled(); | ||
| 479 | perUserPkg.VerifyInstalled(); | ||
| 480 | pkg1.VerifyInstalled(); | ||
| 481 | pkg2.VerifyInstalled(); | ||
| 482 | |||
| 483 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: PerMachine")); | ||
| 484 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 485 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 486 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 487 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 488 | |||
| 489 | bundle.Uninstall(); | ||
| 490 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 491 | perMachinePkg.VerifyInstalled(false); | ||
| 492 | perUserPkg.VerifyInstalled(false); | ||
| 493 | pkg1.VerifyInstalled(false); | ||
| 494 | pkg2.VerifyInstalled(false); | ||
| 495 | } | ||
| 496 | |||
| 497 | [RuntimeFact] | ||
| 498 | public void PM_PU_PMOU_Bundle_PU_Plan_Installs_PerUserMostly() | ||
| 499 | { | ||
| 500 | var testBAController = this.CreateTestBAController(); | ||
| 501 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 502 | |||
| 503 | var bundle = this.CreateBundleInstaller("PmPuPmouBundleTestBA"); | ||
| 504 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 505 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 506 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 507 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 508 | var log = bundle.Install(); | ||
| 509 | |||
| 510 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 511 | perMachinePkg.VerifyInstalled(); | ||
| 512 | perUserPkg.VerifyInstalled(); | ||
| 513 | pkg1.VerifyInstalled(); | ||
| 514 | pkg2.VerifyInstalled(); | ||
| 515 | |||
| 516 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: PerUser")); | ||
| 517 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 518 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 519 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 520 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 521 | |||
| 522 | bundle.Uninstall(); | ||
| 523 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 524 | perMachinePkg.VerifyInstalled(false); | ||
| 525 | perUserPkg.VerifyInstalled(false); | ||
| 526 | pkg1.VerifyInstalled(false); | ||
| 527 | pkg2.VerifyInstalled(false); | ||
| 528 | } | ||
| 529 | |||
| 530 | [RuntimeFact] | ||
| 531 | public void PM_PU_PUOM_Bundle_Default_Plan_Installs_PerUser() | ||
| 532 | { | ||
| 533 | var testBAController = this.CreateTestBAController(); | ||
| 534 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 535 | |||
| 536 | var bundle = this.CreateBundleInstaller("PmPuPuomBundleTestBA"); | ||
| 537 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 538 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 539 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 540 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 541 | var log = bundle.Install(); | ||
| 542 | |||
| 543 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 544 | perMachinePkg.VerifyInstalled(); | ||
| 545 | perUserPkg.VerifyInstalled(); | ||
| 546 | pkg1.VerifyInstalled(); | ||
| 547 | pkg2.VerifyInstalled(); | ||
| 548 | |||
| 549 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: Default")); | ||
| 550 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 551 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 552 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 553 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 554 | |||
| 555 | bundle.Uninstall(); | ||
| 556 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 557 | perMachinePkg.VerifyInstalled(false); | ||
| 558 | perUserPkg.VerifyInstalled(false); | ||
| 559 | pkg1.VerifyInstalled(false); | ||
| 560 | pkg2.VerifyInstalled(false); | ||
| 561 | } | ||
| 562 | |||
| 563 | [RuntimeFact] | ||
| 564 | public void PM_PU_PUOM_Bundle_PM_Plan_Installs_PerMachineMostly() | ||
| 565 | { | ||
| 566 | var testBAController = this.CreateTestBAController(); | ||
| 567 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 568 | |||
| 569 | var bundle = this.CreateBundleInstaller("PmPuPuomBundleTestBA"); | ||
| 570 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 571 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 572 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 573 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 574 | var log = bundle.Install(); | ||
| 575 | |||
| 576 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 577 | perMachinePkg.VerifyInstalled(); | ||
| 578 | perUserPkg.VerifyInstalled(); | ||
| 579 | pkg1.VerifyInstalled(); | ||
| 580 | pkg2.VerifyInstalled(); | ||
| 581 | |||
| 582 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: PerMachine")); | ||
| 583 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 584 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 585 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 586 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 587 | |||
| 588 | bundle.Uninstall(); | ||
| 589 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 590 | perMachinePkg.VerifyInstalled(false); | ||
| 591 | perUserPkg.VerifyInstalled(false); | ||
| 592 | pkg1.VerifyInstalled(false); | ||
| 593 | pkg2.VerifyInstalled(false); | ||
| 594 | } | ||
| 595 | |||
| 596 | [RuntimeFact] | ||
| 597 | public void PM_PU_PUOM_Bundle_PU_Plan_Installs_PerUserMostly() | ||
| 598 | { | ||
| 599 | var testBAController = this.CreateTestBAController(); | ||
| 600 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 601 | |||
| 602 | var bundle = this.CreateBundleInstaller("PmPuPuomBundleTestBA"); | ||
| 603 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 604 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 605 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 606 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 607 | var log = bundle.Install(); | ||
| 608 | |||
| 609 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 610 | perMachinePkg.VerifyInstalled(); | ||
| 611 | perUserPkg.VerifyInstalled(); | ||
| 612 | pkg1.VerifyInstalled(); | ||
| 613 | pkg2.VerifyInstalled(); | ||
| 614 | |||
| 615 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: PerUser")); | ||
| 616 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 617 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 618 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 619 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 620 | |||
| 621 | bundle.Uninstall(); | ||
| 622 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 623 | perMachinePkg.VerifyInstalled(false); | ||
| 624 | perUserPkg.VerifyInstalled(false); | ||
| 625 | pkg1.VerifyInstalled(false); | ||
| 626 | pkg2.VerifyInstalled(false); | ||
| 627 | } | ||
| 628 | |||
| 629 | |||
| 630 | } | ||
| 631 | } | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs index 3731b0cc..3e848fbd 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs | |||
| @@ -20,11 +20,11 @@ namespace WixToolsetTest.BurnE2E | |||
| 20 | 20 | ||
| 21 | bundleAv1.Install(); | 21 | bundleAv1.Install(); |
| 22 | bundleAv1.VerifyRegisteredAndInPackageCache(); | 22 | bundleAv1.VerifyRegisteredAndInPackageCache(); |
| 23 | var gotV1Registration = bundleAv1.TryGetUpdateRegistration(out var v1Registration); | 23 | var gotV1Registration = bundleAv1.TryGetUpdateRegistration(plannedPerMachine: null, out var v1Registration); |
| 24 | 24 | ||
| 25 | bundleAv2.Install(); | 25 | bundleAv2.Install(); |
| 26 | bundleAv2.VerifyRegisteredAndInPackageCache(); | 26 | bundleAv2.VerifyRegisteredAndInPackageCache(); |
| 27 | var gotV2Registration = bundleAv2.TryGetUpdateRegistration(out var v2Registration); | 27 | var gotV2Registration = bundleAv2.TryGetUpdateRegistration(plannedPerMachine: null, out var v2Registration); |
| 28 | 28 | ||
| 29 | bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); | 29 | bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); |
| 30 | 30 | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs b/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs index c344ebce..872e6954 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs | |||
| @@ -72,6 +72,11 @@ namespace WixToolsetTest.BurnE2E | |||
| 72 | this.SetBurnTestValue("ForceUpdateSource", url); | 72 | this.SetBurnTestValue("ForceUpdateSource", url); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | public void SetBundleScope(BundleScope scope) | ||
| 76 | { | ||
| 77 | this.SetBurnTestValue("BundleScope", scope.ToString()); | ||
| 78 | } | ||
| 79 | |||
| 75 | /// <summary> | 80 | /// <summary> |
| 76 | /// Slows the cache progress of a package. | 81 | /// Slows the cache progress of a package. |
| 77 | /// </summary> | 82 | /// </summary> |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd b/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd index ecea18a0..f6950fb0 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd +++ b/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd | |||
| @@ -1,2 +1,4 @@ | |||
| 1 | SET RuntimeTestsEnabled=true | 1 | SET RuntimeTestsEnabled=true |
| 2 | dotnet test WixToolsetTest.BurnE2E.dll -v normal --logger trx | 2 | dotnet test WixToolsetTest.BurnE2E.dll -v normal --logger trx;LogFileName=%TMP%\SandboxTests.trx |
| 3 | |||
| 4 | ROBOCOPY /NFL /NDL /S /PURGE %TMP% C:\Build\SandboxLogs *.log *.trx | ||
diff --git a/src/test/sandbox/TestSandbox.wsb b/src/test/sandbox/TestSandbox.wsb index 97c3c759..1af3f5f9 100644 --- a/src/test/sandbox/TestSandbox.wsb +++ b/src/test/sandbox/TestSandbox.wsb | |||
| @@ -1,22 +1,21 @@ | |||
| 1 | <Configuration> | 1 | <Configuration> |
| 2 | <Networking>Enable</Networking> | ||
| 3 | |||
| 2 | <MappedFolders> | 4 | <MappedFolders> |
| 3 | <MappedFolder> | 5 | <MappedFolder> |
| 4 | <HostFolder>..\..\..\build</HostFolder> | 6 | <HostFolder>..\..\..\build</HostFolder> |
| 5 | <SandboxFolder>C:\build</SandboxFolder> | 7 | <SandboxFolder>C:\build</SandboxFolder> |
| 6 | <ReadOnly>true</ReadOnly> | ||
| 7 | </MappedFolder> | ||
| 8 | <MappedFolder> | ||
| 9 | <HostFolder>..\..\..\build\logs</HostFolder> | ||
| 10 | <SandboxFolder>C:\logs</SandboxFolder> | ||
| 11 | <ReadOnly>false</ReadOnly> | 8 | <ReadOnly>false</ReadOnly> |
| 12 | </MappedFolder> | 9 | </MappedFolder> |
| 13 | <MappedFolder> | 10 | |
| 11 | <MappedFolder> | ||
| 14 | <HostFolder>.\</HostFolder> | 12 | <HostFolder>.\</HostFolder> |
| 15 | <SandboxFolder>C:\sandbox</SandboxFolder> | 13 | <SandboxFolder>C:\sandbox</SandboxFolder> |
| 16 | <ReadOnly>true</ReadOnly> | 14 | <ReadOnly>true</ReadOnly> |
| 17 | </MappedFolder> | 15 | </MappedFolder> |
| 18 | </MappedFolders> | 16 | </MappedFolders> |
| 19 | <LogonCommand> | 17 | |
| 20 | <Command>C:\sandbox\startup.bat</Command> | 18 | <LogonCommand> |
| 21 | </LogonCommand> | 19 | <Command>C:\sandbox\startup.bat</Command> |
| 20 | </LogonCommand> | ||
| 22 | </Configuration> | 21 | </Configuration> |
