aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-02-17 16:07:18 -0600
committerSean Hall <r.sean.hall@gmail.com>2021-02-17 16:20:10 -0600
commit974381355441c3d95d62af85bdd05f3c0e368eb5 (patch)
treeeae7ac4332184183f01c68e6104d33460db5ae02 /src
parent0b5290319a13c8f73315ea0e0407d88bfd79c944 (diff)
downloadwix-974381355441c3d95d62af85bdd05f3c0e368eb5.tar.gz
wix-974381355441c3d95d62af85bdd05f3c0e368eb5.tar.bz2
wix-974381355441c3d95d62af85bdd05f3c0e368eb5.zip
Port the slipstream tests from the old repo.
Diffstat (limited to 'src')
-rw-r--r--src/TestData/SlipstreamTests/BundleA/BundleA.wixproj19
-rw-r--r--src/TestData/SlipstreamTests/BundleA/BundleA.wxs12
-rw-r--r--src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj19
-rw-r--r--src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs12
-rw-r--r--src/TestData/SlipstreamTests/BundleB/BundleB.wixproj20
-rw-r--r--src/TestData/SlipstreamTests/BundleB/BundleB.wxs13
-rw-r--r--src/TestData/SlipstreamTests/BundleC/BundleC.wixproj21
-rw-r--r--src/TestData/SlipstreamTests/BundleC/BundleC.wxs14
-rw-r--r--src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj18
-rw-r--r--src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs9
-rw-r--r--src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj18
-rw-r--r--src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs9
-rw-r--r--src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj10
-rw-r--r--src/TestData/SlipstreamTests/PackageAv1/PackageA.props11
-rw-r--r--src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props7
-rw-r--r--src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj4
-rw-r--r--src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs15
-rw-r--r--src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj10
-rw-r--r--src/TestData/SlipstreamTests/PackageBv1/PackageB.props12
-rw-r--r--src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj4
-rw-r--r--src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs15
-rw-r--r--src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj10
-rw-r--r--src/TestData/SlipstreamTests/PatchA/PatchA.wixproj12
-rw-r--r--src/TestData/SlipstreamTests/PatchA/PatchA.wxs22
-rw-r--r--src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj14
-rw-r--r--src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs27
-rw-r--r--src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj14
-rw-r--r--src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs26
-rw-r--r--src/WixTestTools/PackageVerifier.cs9
-rw-r--r--src/WixToolsetTest.BurnE2E/SlipstreamTests.cs330
30 files changed, 736 insertions, 0 deletions
diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj
new file mode 100644
index 00000000..926f46df
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wixproj
@@ -0,0 +1,19 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>Bundle</OutputType>
5 <UpgradeCode>{62C28DAF-A13E-4F55-ACA1-FB843630789C}</UpgradeCode>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
12 <ProjectReference Include="..\PatchA\PatchA.wixproj" />
13 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
14 </ItemGroup>
15 <ItemGroup>
16 <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.83" />
17 <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.61" />
18 </ItemGroup>
19</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/BundleA/BundleA.wxs b/src/TestData/SlipstreamTests/BundleA/BundleA.wxs
new file mode 100644
index 00000000..17dc6c05
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleA/BundleA.wxs
@@ -0,0 +1,12 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4 <Fragment>
5 <PackageGroup Id="BundlePackages">
6 <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" Compressed="no">
7 <SlipstreamMsp Id="PatchA" />
8 </MsiPackage>
9 <MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" Compressed="no" />
10 </PackageGroup>
11 </Fragment>
12</Wix>
diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj
new file mode 100644
index 00000000..662defd3
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj
@@ -0,0 +1,19 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>Bundle</OutputType>
5 <UpgradeCode>{F6BB4AE2-F7D4-4768-8314-3AF694C400E9}</UpgradeCode>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
12 <ProjectReference Include="..\PatchA\PatchA.wixproj" />
13 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
14 </ItemGroup>
15 <ItemGroup>
16 <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.83" />
17 <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.61" />
18 </ItemGroup>
19</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs
new file mode 100644
index 00000000..3de10a91
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs
@@ -0,0 +1,12 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
4 <Fragment>
5 <PackageGroup Id="BundlePackages">
6 <MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" />
7 <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)">
8 <SlipstreamMsp Id="PatchA" />
9 </MsiPackage>
10 </PackageGroup>
11 </Fragment>
12</Wix>
diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj
new file mode 100644
index 00000000..e2ca2e78
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wixproj
@@ -0,0 +1,20 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>Bundle</OutputType>
5 <UpgradeCode>{604878DE-F0EB-4FE1-B11E-DC19F07F82F5}</UpgradeCode>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
12 <ProjectReference Include="..\PackageBv1\PackageBv1.wixproj" />
13 <ProjectReference Include="..\PatchA\PatchA.wixproj" />
14 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
15 </ItemGroup>
16 <ItemGroup>
17 <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.83" />
18 <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.61" />
19 </ItemGroup>
20</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/BundleB/BundleB.wxs b/src/TestData/SlipstreamTests/BundleB/BundleB.wxs
new file mode 100644
index 00000000..90ddd258
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleB/BundleB.wxs
@@ -0,0 +1,13 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4 <Fragment>
5 <PackageGroup Id="BundlePackages">
6 <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)">
7 <SlipstreamMsp Id="PatchA" />
8 </MsiPackage>
9 <MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" />
10 <MsiPackage Id="PackageB" SourceFile="$(var.PackageBv1.TargetPath)" />
11 </PackageGroup>
12 </Fragment>
13</Wix>
diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj
new file mode 100644
index 00000000..f3fee0c1
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wixproj
@@ -0,0 +1,21 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>Bundle</OutputType>
5 <UpgradeCode>{16B551B5-6EBE-417F-8CB2-50936F079301}</UpgradeCode>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
12 <ProjectReference Include="..\PackageBv1\PackageBv1.wixproj" />
13 <ProjectReference Include="..\PatchAB\PatchAB.wixproj" />
14 <ProjectReference Include="..\PatchAB2\PatchAB2.wixproj" />
15 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
16 </ItemGroup>
17 <ItemGroup>
18 <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.83" />
19 <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.61" />
20 </ItemGroup>
21</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/BundleC/BundleC.wxs b/src/TestData/SlipstreamTests/BundleC/BundleC.wxs
new file mode 100644
index 00000000..4702d845
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleC/BundleC.wxs
@@ -0,0 +1,14 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4 <Fragment>
5 <PackageGroup Id="BundlePackages">
6 <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)">
7 <SlipstreamMsp Id="PatchAB" />
8 </MsiPackage>
9 <MsiPackage Id="PackageB" SourceFile="$(var.PackageBv1.TargetPath)" />
10 <MspPackage Id="PatchAB" SourceFile="$(var.PatchAB.TargetPath)" />
11 <MspPackage Id="PatchAB2" SourceFile="$(var.PatchAB2.TargetPath)" PerMachine="default" Slipstream="yes" />
12 </PackageGroup>
13 </Fragment>
14</Wix>
diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj
new file mode 100644
index 00000000..acb12a3a
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj
@@ -0,0 +1,18 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>Bundle</OutputType>
5 <UpgradeCode>{80A9925A-2EC1-4BD5-BB69-2553BF7FCED9}</UpgradeCode>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
12 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
13 </ItemGroup>
14 <ItemGroup>
15 <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.83" />
16 <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.61" />
17 </ItemGroup>
18</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs
new file mode 100644
index 00000000..59fdd0c9
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs
@@ -0,0 +1,9 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
4 <Fragment>
5 <PackageGroup Id="BundlePackages">
6 <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
7 </PackageGroup>
8 </Fragment>
9</Wix>
diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj
new file mode 100644
index 00000000..72d48b74
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj
@@ -0,0 +1,18 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>Bundle</OutputType>
5 <UpgradeCode>{9B026C22-924C-4CEA-8726-FD07C1706A9F}</UpgradeCode>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <ProjectReference Include="..\PatchA\PatchA.wixproj" />
12 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
13 </ItemGroup>
14 <ItemGroup>
15 <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.83" />
16 <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.61" />
17 </ItemGroup>
18</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs
new file mode 100644
index 00000000..27fed68e
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs
@@ -0,0 +1,9 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
4 <Fragment>
5 <PackageGroup Id="BundlePackages">
6 <MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" />
7 </PackageGroup>
8 </Fragment>
9</Wix>
diff --git a/src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj b/src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj
new file mode 100644
index 00000000..50aa6ec6
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageAv0_9_0/PackageAv0_9_0.wixproj
@@ -0,0 +1,10 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <Import Project="..\PackageAv1\PackageA.props" />
4 <PropertyGroup>
5 <Version>0.9.0.0</Version>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\PackageAv1\ProductComponents.wxs" Link="ProductComponents.wxs" />
9 </ItemGroup>
10</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PackageAv1/PackageA.props b/src/TestData/SlipstreamTests/PackageAv1/PackageA.props
new file mode 100644
index 00000000..734e0d6d
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageAv1/PackageA.props
@@ -0,0 +1,11 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project>
3 <PropertyGroup>
4 <PackageName>PackageA</PackageName>
5 <ProductComponentsRef>true</ProductComponentsRef>
6 <UpgradeCode>{DB87BB66-FE5D-4293-81AC-EE313D3F864B}</UpgradeCode>
7 </PropertyGroup>
8 <ItemGroup>
9 <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" />
10 </ItemGroup>
11</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props
new file mode 100644
index 00000000..2936f349
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.props
@@ -0,0 +1,7 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project>
3 <Import Project="PackageA.props" />
4 <PropertyGroup>
5 <ProductCode>{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}</ProductCode>
6 </PropertyGroup>
7</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj
new file mode 100644
index 00000000..e85be384
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageAv1/PackageAv1.wixproj
@@ -0,0 +1,4 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <Import Project="PackageAv1.props" />
4</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs b/src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs
new file mode 100644
index 00000000..72b5d4bd
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageAv1/ProductComponents.wxs
@@ -0,0 +1,15 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4 <Fragment>
5 <ComponentGroup Id="ProductComponents">
6 <ComponentRef Id="RegistryComponent2" />
7 </ComponentGroup>
8 </Fragment>
9
10 <Fragment>
11 <Component Id="RegistryComponent2" Directory="INSTALLFOLDER">
12 <RegistryValue Root="HKLM" Key="Software\WiX\Tests\$(var.TestGroupName)" Name="$(var.PackageName)2" Value="!(bind.Property.TestVersion)" Type="string" />
13 </Component>
14 </Fragment>
15</Wix>
diff --git a/src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj b/src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj
new file mode 100644
index 00000000..dbce9cfe
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageAv1_0_1/PackageAv1_0_1.wixproj
@@ -0,0 +1,10 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <Import Project="..\PackageAv1\PackageAv1.props" />
4 <PropertyGroup>
5 <Version>1.0.1.0</Version>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\PackageAv1\ProductComponents.wxs" Link="ProductComponents.wxs" />
9 </ItemGroup>
10</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PackageBv1/PackageB.props b/src/TestData/SlipstreamTests/PackageBv1/PackageB.props
new file mode 100644
index 00000000..920088fb
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageBv1/PackageB.props
@@ -0,0 +1,12 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project>
3 <PropertyGroup>
4 <PackageName>PackageB</PackageName>
5 <ProductComponentsRef>true</ProductComponentsRef>
6 <ProductCode>{83B1ADF3-A8DD-41D3-9114-57703DA17754}</ProductCode>
7 <UpgradeCode>{552F8D3B-99E1-4772-8E8C-CC47E5ED5F71}</UpgradeCode>
8 </PropertyGroup>
9 <ItemGroup>
10 <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" />
11 </ItemGroup>
12</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj b/src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj
new file mode 100644
index 00000000..7b6f83a3
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageBv1/PackageBv1.wixproj
@@ -0,0 +1,4 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <Import Project="PackageB.props" />
4</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs b/src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs
new file mode 100644
index 00000000..72b5d4bd
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageBv1/ProductComponents.wxs
@@ -0,0 +1,15 @@
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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4 <Fragment>
5 <ComponentGroup Id="ProductComponents">
6 <ComponentRef Id="RegistryComponent2" />
7 </ComponentGroup>
8 </Fragment>
9
10 <Fragment>
11 <Component Id="RegistryComponent2" Directory="INSTALLFOLDER">
12 <RegistryValue Root="HKLM" Key="Software\WiX\Tests\$(var.TestGroupName)" Name="$(var.PackageName)2" Value="!(bind.Property.TestVersion)" Type="string" />
13 </Component>
14 </Fragment>
15</Wix>
diff --git a/src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj b/src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj
new file mode 100644
index 00000000..3ec790ad
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PackageBv1_0_1/PackageBv1_0_1.wixproj
@@ -0,0 +1,10 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <Import Project="..\PackageBv1\PackageB.props" />
4 <PropertyGroup>
5 <Version>1.0.1.0</Version>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\PackageBv1\ProductComponents.wxs" Link="ProductComponents.wxs" />
9 </ItemGroup>
10</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PatchA/PatchA.wixproj b/src/TestData/SlipstreamTests/PatchA/PatchA.wixproj
new file mode 100644
index 00000000..da9acb5e
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PatchA/PatchA.wixproj
@@ -0,0 +1,12 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>PatchCreation</OutputType>
5 <TargetExt>.msp</TargetExt>
6 <SuppressSpecificWarnings>1079</SuppressSpecificWarnings>
7 </PropertyGroup>
8 <ItemGroup>
9 <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
10 <ProjectReference Include="..\PackageAv1_0_1\PackageAv1_0_1.wixproj" />
11 </ItemGroup>
12</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PatchA/PatchA.wxs b/src/TestData/SlipstreamTests/PatchA/PatchA.wxs
new file mode 100644
index 00000000..7c3818b0
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PatchA/PatchA.wxs
@@ -0,0 +1,22 @@
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<?ifndef Version?>
4<?define Version = 1.0.0.0?>
5<?endif?>
6
7<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
8 <Patch AllowRemoval="yes" Classification="Update" Description="Patch A in test $(var.TestGroupName)" DisplayName="$(var.TestGroupName) - Patch A" Manufacturer="Example Corporation" MinorUpdateTargetRTM="yes">
9 <Media Id="100" Cabinet="PatchA" EmbedCab="yes">
10 <PatchBaseline
11 Id="PatchA"
12 BaselineFile="$(var.PackageAv1.TargetDir)$(var.PackageAv1.TargetName).wixpdb"
13 UpdateFile="$(var.PackageAv1_0_1.TargetDir)$(var.PackageAv1_0_1.TargetName).wixpdb"
14 />
15 </Media>
16
17 <PatchFamily Id="A" Version="$(var.Version)" Supersede="yes">
18 <ComponentRef Id="RegistryComponent" />
19 <PropertyRef Id="TestVersion" />
20 </PatchFamily>
21 </Patch>
22</Wix>
diff --git a/src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj
new file mode 100644
index 00000000..81fa9e12
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wixproj
@@ -0,0 +1,14 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>PatchCreation</OutputType>
5 <TargetExt>.msp</TargetExt>
6 <SuppressSpecificWarnings>1079</SuppressSpecificWarnings>
7 </PropertyGroup>
8 <ItemGroup>
9 <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
10 <ProjectReference Include="..\PackageAv1_0_1\PackageAv1_0_1.wixproj" />
11 <ProjectReference Include="..\PackageBv1\PackageBv1.wixproj" />
12 <ProjectReference Include="..\PackageBv1_0_1\PackageBv1_0_1.wixproj" />
13 </ItemGroup>
14</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs
new file mode 100644
index 00000000..f700f35c
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PatchAB/PatchAB.wxs
@@ -0,0 +1,27 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3<?ifndef Version?>
4<?define Version = 1.0.0.0?>
5<?endif?>
6
7<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
8 <Patch AllowRemoval="yes" Classification="Update" Description="Patch AB in test $(var.TestGroupName)" DisplayName="$(var.TestGroupName) - Patch AB" Manufacturer="Example Corporation" MinorUpdateTargetRTM="yes">
9 <Media Id="100" Cabinet="PatchAB" EmbedCab="yes">
10 <PatchBaseline
11 Id="PatchA"
12 BaselineFile="$(var.PackageAv1.TargetDir)$(var.PackageAv1.TargetName).wixpdb"
13 UpdateFile="$(var.PackageAv1_0_1.TargetDir)$(var.PackageAv1_0_1.TargetName).wixpdb"
14 />
15 <PatchBaseline
16 Id="PatchB"
17 BaselineFile="$(var.PackageBv1.TargetDir)$(var.PackageBv1.TargetName).wixpdb"
18 UpdateFile="$(var.PackageBv1_0_1.TargetDir)$(var.PackageBv1_0_1.TargetName).wixpdb"
19 />
20 </Media>
21
22 <PatchFamily Id="AB" Version="$(var.Version)" Supersede="yes">
23 <ComponentRef Id="RegistryComponent" />
24 <PropertyRef Id="TestVersion" />
25 </PatchFamily>
26 </Patch>
27</Wix>
diff --git a/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj
new file mode 100644
index 00000000..81fa9e12
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wixproj
@@ -0,0 +1,14 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>PatchCreation</OutputType>
5 <TargetExt>.msp</TargetExt>
6 <SuppressSpecificWarnings>1079</SuppressSpecificWarnings>
7 </PropertyGroup>
8 <ItemGroup>
9 <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
10 <ProjectReference Include="..\PackageAv1_0_1\PackageAv1_0_1.wixproj" />
11 <ProjectReference Include="..\PackageBv1\PackageBv1.wixproj" />
12 <ProjectReference Include="..\PackageBv1_0_1\PackageBv1_0_1.wixproj" />
13 </ItemGroup>
14</Project> \ No newline at end of file
diff --git a/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs
new file mode 100644
index 00000000..ebd5bed0
--- /dev/null
+++ b/src/TestData/SlipstreamTests/PatchAB2/PatchAB2.wxs
@@ -0,0 +1,26 @@
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<?ifndef Version?>
4<?define Version = 1.0.0.0?>
5<?endif?>
6
7<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
8 <Patch AllowRemoval="yes" Classification="Update" Description="Patch AB2 in test $(var.TestGroupName)" DisplayName="$(var.TestGroupName) - Patch AB2" Manufacturer="Example Corporation" MinorUpdateTargetRTM="yes">
9 <Media Id="100" Cabinet="PatchAB2" EmbedCab="yes">
10 <PatchBaseline
11 Id="PatchA"
12 BaselineFile="$(var.PackageAv1.TargetDir)$(var.PackageAv1.TargetName).wixpdb"
13 UpdateFile="$(var.PackageAv1_0_1.TargetDir)$(var.PackageAv1_0_1.TargetName).wixpdb"
14 />
15 <PatchBaseline
16 Id="PatchB"
17 BaselineFile="$(var.PackageBv1.TargetDir)$(var.PackageBv1.TargetName).wixpdb"
18 UpdateFile="$(var.PackageBv1_0_1.TargetDir)$(var.PackageBv1_0_1.TargetName).wixpdb"
19 />
20 </Media>
21
22 <PatchFamily Id="AB2" Version="$(var.Version)" Supersede="yes">
23 <ComponentRef Id="RegistryComponent2" />
24 </PatchFamily>
25 </Patch>
26</Wix>
diff --git a/src/WixTestTools/PackageVerifier.cs b/src/WixTestTools/PackageVerifier.cs
index 77946c91..b4289032 100644
--- a/src/WixTestTools/PackageVerifier.cs
+++ b/src/WixTestTools/PackageVerifier.cs
@@ -58,6 +58,15 @@ namespace WixTestTools
58 Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode)); 58 Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode));
59 } 59 }
60 60
61 public void DeleteTestRegistryValue(string name)
62 {
63 using (var root = this.TestContext.GetTestRegistryRoot())
64 {
65 Assert.NotNull(root);
66 root.DeleteValue(name);
67 }
68 }
69
61 public void VerifyTestRegistryRootDeleted() 70 public void VerifyTestRegistryRootDeleted()
62 { 71 {
63 using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(); 72 using var testRegistryRoot = this.TestContext.GetTestRegistryRoot();
diff --git a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs
new file mode 100644
index 00000000..9d53f999
--- /dev/null
+++ b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs
@@ -0,0 +1,330 @@
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
3namespace WixToolsetTest.BurnE2E
4{
5 using System;
6 using System.IO;
7 using WixTestTools;
8 using WixToolset.Mba.Core;
9 using Xunit;
10 using Xunit.Abstractions;
11
12 public class SlipstreamTests : BurnE2ETests
13 {
14 public SlipstreamTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { }
15
16 private const string V090 = "0.9.0.0";
17 private const string V100 = "1.0.0.0";
18 private const string V101 = "1.0.1.0";
19
20 [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")]
21 public void CanInstallBundleWithSlipstreamedPatchThenRemoveIt()
22 {
23 var testRegistryValue = "PackageA";
24
25 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
26 var bundleA = this.CreateBundleInstaller("BundleA");
27
28 var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs");
29 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}");
30
31 bundleA.Install();
32 bundleA.VerifyRegisteredAndInPackageCache();
33 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
34 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
35
36 bundleA.Uninstall();
37 bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
38 Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled));
39 packageAv1.VerifyTestRegistryRootDeleted();
40 }
41
42 /// <summary>
43 /// BundleA installs PackageA with slipstreamed PatchA.
44 /// BundleOnlyPatchA is installed which contains PatchA (which should be a no-op).
45 /// BundleOnlyPatchA in uninstalled which should do nothing since BundleA has a dependency on it.
46 /// Bundle is installed which should remove everything.
47 /// </summary>
48 [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")]
49 public void ReferenceCountsSlipstreamedPatch()
50 {
51 var testRegistryValue = "PackageA";
52
53 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
54 var bundleOnlyPatchA = this.CreateBundleInstaller("BundleOnlyPatchA");
55 var bundleA = this.CreateBundleInstaller("BundleA");
56
57 var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs");
58 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}");
59
60 bundleA.Install();
61 bundleA.VerifyRegisteredAndInPackageCache();
62 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
63 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
64
65 bundleOnlyPatchA.Install();
66 bundleOnlyPatchA.VerifyRegisteredAndInPackageCache();
67 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
68 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
69
70 bundleOnlyPatchA.Uninstall();
71 bundleOnlyPatchA.VerifyUnregisteredAndRemovedFromPackageCache();
72 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
73 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
74
75 bundleA.Uninstall();
76 bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
77 Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled));
78 packageAv1.VerifyTestRegistryRootDeleted();
79 }
80
81 [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")]
82 public void CanInstallBundleWithSlipstreamedPatchThenRepairIt()
83 {
84 this.InstallBundleWithSlipstreamedPatchThenRepairIt(false);
85 }
86
87 [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")]
88 public void CanInstallReversedBundleWithSlipstreamedPatchThenRepairIt()
89 {
90 this.InstallBundleWithSlipstreamedPatchThenRepairIt(true);
91 }
92
93 private void InstallBundleWithSlipstreamedPatchThenRepairIt(bool isReversed)
94 {
95 var bundleName = isReversed ? "BundleAReverse" : "BundleA";
96 var testRegistryValue = "PackageA";
97
98 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
99 var bundleA = this.CreateBundleInstaller(bundleName);
100
101 var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs");
102 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}");
103
104 bundleA.Install();
105 bundleA.VerifyRegisteredAndInPackageCache();
106 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
107 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
108
109 // Delete the installed file and registry key so we have something to repair.
110 File.Delete(packageAv1SourceCodeInstalled);
111 packageAv1.DeleteTestRegistryValue(testRegistryValue);
112
113 bundleA.Repair();
114 bundleA.VerifyRegisteredAndInPackageCache();
115 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
116 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
117
118 bundleA.Uninstall();
119 bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
120 Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled));
121 packageAv1.VerifyTestRegistryRootDeleted();
122 }
123
124 [Fact]
125 public void CanInstallSlipstreamedPatchThroughForcedRepair()
126 {
127 this.InstallSlipstreamedPatchThroughForcedRepair(false);
128 }
129
130 [Fact]
131 public void CanInstallSlipstreamedPatchThroughReversedForcedRepair()
132 {
133 this.InstallSlipstreamedPatchThroughForcedRepair(true);
134 }
135
136 private void InstallSlipstreamedPatchThroughForcedRepair(bool isReversed)
137 {
138 var bundleName = isReversed ? "BundleAReverse" : "BundleA";
139 var testRegistryValue = "PackageA";
140
141 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
142 var bundleA = this.CreateBundleInstaller(bundleName);
143 var bundleOnlyA = this.CreateBundleInstaller("BundleOnlyA");
144 var testBAController = this.CreateTestBAController();
145
146 var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs");
147 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}");
148
149 bundleOnlyA.Install();
150 bundleOnlyA.VerifyRegisteredAndInPackageCache();
151 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
152 packageAv1.VerifyTestRegistryValue(testRegistryValue, V100);
153
154 // Delete the installed file and registry key so we have something to repair.
155 File.Delete(packageAv1SourceCodeInstalled);
156 packageAv1.DeleteTestRegistryValue(testRegistryValue);
157
158 testBAController.SetPackageRequestedState("PackageA", RequestState.Repair);
159 testBAController.SetPackageRequestedState("PatchA", RequestState.Repair);
160
161 bundleA.Install();
162 bundleA.VerifyRegisteredAndInPackageCache();
163 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
164 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
165
166 testBAController.ResetPackageStates("PackageA");
167 testBAController.ResetPackageStates("PatchA");
168
169 bundleA.Uninstall();
170 bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
171 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
172 packageAv1.VerifyTestRegistryValue(testRegistryValue, V100);
173
174 bundleOnlyA.Uninstall();
175 bundleOnlyA.VerifyUnregisteredAndRemovedFromPackageCache();
176 Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled));
177 packageAv1.VerifyTestRegistryRootDeleted();
178 }
179
180 [Fact]
181 public void CanUninstallSlipstreamedPatchAlone()
182 {
183 var testRegistryValue = "PackageA";
184
185 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
186 var bundleA = this.CreateBundleInstaller("BundleA");
187 var testBAController = this.CreateTestBAController();
188
189 var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs");
190 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}");
191
192 bundleA.Install();
193 bundleA.VerifyRegisteredAndInPackageCache();
194 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
195 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
196
197 testBAController.SetPackageRequestedState("PatchA", RequestState.Absent);
198
199 bundleA.Modify();
200 bundleA.VerifyRegisteredAndInPackageCache();
201 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
202 packageAv1.VerifyTestRegistryValue(testRegistryValue, V100);
203
204 bundleA.Uninstall();
205 bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
206 Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled));
207 packageAv1.VerifyTestRegistryRootDeleted();
208 }
209
210 [Fact]
211 public void CanModifyToUninstallPackageWithSlipstreamedPatch()
212 {
213 var testRegistryValue = "PackageA";
214
215 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
216 var packageBv1 = this.CreatePackageInstaller("PackageBv1");
217 var bundleB = this.CreateBundleInstaller("BundleB");
218 var testBAController = this.CreateTestBAController();
219
220 var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs");
221 var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs");
222 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}");
223 Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}");
224
225 bundleB.Install();
226 bundleB.VerifyRegisteredAndInPackageCache();
227 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
228 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
229 Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found PackageBv1 payload installed at: ", packageBv1SourceCodeInstalled));
230
231 testBAController.SetPackageRequestedState("PackageA", RequestState.Absent);
232 testBAController.SetPackageRequestedState("PatchA", RequestState.Absent);
233
234 bundleB.Modify();
235 bundleB.VerifyRegisteredAndInPackageCache();
236 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should have been removed by modify from: {packageAv1SourceCodeInstalled}");
237
238 testBAController.ResetPackageStates("PackageA");
239 testBAController.ResetPackageStates("PatchA");
240
241 bundleB.Uninstall();
242 bundleB.VerifyUnregisteredAndRemovedFromPackageCache();
243 Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should have been removed by uninstall from: ", packageBv1SourceCodeInstalled));
244 packageBv1.VerifyTestRegistryRootDeleted();
245 }
246
247 [Fact]
248 public void UninstallsPackageWithSlipstreamedPatchDuringRollback()
249 {
250 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
251 var packageBv1 = this.CreatePackageInstaller("PackageBv1");
252 var bundleB = this.CreateBundleInstaller("BundleB");
253 var testBAController = this.CreateTestBAController();
254
255 var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs");
256 var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs");
257 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}");
258 Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}");
259
260 testBAController.SetPackageCancelExecuteAtProgress("PackageB", 50);
261
262 bundleB.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT);
263 bundleB.VerifyUnregisteredAndRemovedFromPackageCache();
264 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should have been removed by rollback from: {packageAv1SourceCodeInstalled}");
265 Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should not have been installed from: ", packageBv1SourceCodeInstalled));
266 packageBv1.VerifyTestRegistryRootDeleted();
267 }
268
269 [Fact(Skip = "The bundle is slipstreaming the patches correctly, need to research why testRegistryValueB is getting patched because patch AB2 is not supposed to change it")]
270 public void CanAutomaticallyPredetermineSlipstreamPatchesAtBuildTime()
271 {
272 var testRegistryValueA = "PackageA";
273 var testRegistryValueA2 = "PackageA2";
274 var testRegistryValueB = "PackageB";
275 var testRegistryValueB2 = "PackageB2";
276
277 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
278 var packageBv1 = this.CreatePackageInstaller("PackageBv1");
279 var bundleC = this.CreateBundleInstaller("BundleC");
280
281 var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs");
282 var packageBv1SourceCodeInstalled = packageBv1.GetInstalledFilePath("Package.wxs");
283 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}");
284 Assert.False(File.Exists(packageBv1SourceCodeInstalled), $"PackageBv1 payload should not be there on test start: {packageBv1SourceCodeInstalled}");
285
286 bundleC.Install();
287 bundleC.VerifyRegisteredAndInPackageCache();
288 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
289 // Product A should've slipstreamed both patches.
290 packageAv1.VerifyTestRegistryValue(testRegistryValueA, V101);
291 packageAv1.VerifyTestRegistryValue(testRegistryValueA2, V101);
292 // Product B should've only slipstreamed patch AB2.
293 packageBv1.VerifyTestRegistryValue(testRegistryValueB, V100);
294 packageBv1.VerifyTestRegistryValue(testRegistryValueB2, V101);
295
296 bundleC.Uninstall();
297 bundleC.VerifyUnregisteredAndRemovedFromPackageCache();
298 Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled));
299 Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("PackageBv1 payload should have been removed by uninstall from: ", packageBv1SourceCodeInstalled));
300 packageAv1.VerifyTestRegistryRootDeleted();
301 }
302
303 [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6297")]
304 public void CanInstallSlipstreamedPatchWithPackageDuringMajorUpgrade()
305 {
306 var testRegistryValue = "PackageA";
307
308 var packageAv0 = this.CreatePackageInstaller("PackageAv0_9_0");
309 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
310 var bundleA = this.CreateBundleInstaller("BundleA");
311
312 packageAv1.VerifyInstalled(false);
313
314 packageAv0.InstallProduct();
315 packageAv0.VerifyInstalled(true);
316 packageAv1.VerifyTestRegistryValue(testRegistryValue, V090);
317
318 bundleA.Install();
319 bundleA.VerifyRegisteredAndInPackageCache();
320 packageAv0.VerifyInstalled(false);
321 packageAv1.VerifyInstalled(true);
322 packageAv1.VerifyTestRegistryValue(testRegistryValue, V101);
323
324 bundleA.Uninstall();
325 bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
326 packageAv1.VerifyInstalled(false);
327 packageAv1.VerifyTestRegistryRootDeleted();
328 }
329 }
330}