aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-02-17 16:07:57 -0600
committerSean Hall <r.sean.hall@gmail.com>2021-02-17 16:20:10 -0600
commitb60898e0bccbb0b0ddad74df6370e826cb9b7494 (patch)
tree8c53a6b94c87f1c462257ed15523800b458c10db /src
parent974381355441c3d95d62af85bdd05f3c0e368eb5 (diff)
downloadwix-b60898e0bccbb0b0ddad74df6370e826cb9b7494.tar.gz
wix-b60898e0bccbb0b0ddad74df6370e826cb9b7494.tar.bz2
wix-b60898e0bccbb0b0ddad74df6370e826cb9b7494.zip
Add failing test for #3897.
Diffstat (limited to 'src')
-rw-r--r--src/TestData/SlipstreamTests/BundleD/BundleD.wixproj19
-rw-r--r--src/TestData/SlipstreamTests/BundleD/BundleD.wxs12
-rw-r--r--src/WixToolsetTest.BurnE2E/SlipstreamTests.cs23
3 files changed, 54 insertions, 0 deletions
diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj
new file mode 100644
index 00000000..db257df6
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleD/BundleD.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>{5372D18C-8C62-4C22-A24B-6BB2FB4AA966}</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/BundleD/BundleD.wxs b/src/TestData/SlipstreamTests/BundleD/BundleD.wxs
new file mode 100644
index 00000000..64bdc1b5
--- /dev/null
+++ b/src/TestData/SlipstreamTests/BundleD/BundleD.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)">
7 <SlipstreamMsp Id="PatchA" />
8 </MsiPackage>
9 <MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" InstallCondition="WixBundleInstalled = 1" />
10 </PackageGroup>
11 </Fragment>
12</Wix>
diff --git a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs
index 9d53f999..0d7be0ca 100644
--- a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs
+++ b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs
@@ -326,5 +326,28 @@ namespace WixToolsetTest.BurnE2E
326 packageAv1.VerifyInstalled(false); 326 packageAv1.VerifyInstalled(false);
327 packageAv1.VerifyTestRegistryRootDeleted(); 327 packageAv1.VerifyTestRegistryRootDeleted();
328 } 328 }
329
330 [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3897")]
331 public void RespectsSlipstreamedPatchInstallCondition()
332 {
333 var testRegistryValue = "PackageA";
334
335 var packageAv1 = this.CreatePackageInstaller("PackageAv1");
336 var bundleD = this.CreateBundleInstaller("BundleD");
337
338 var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs");
339 Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}");
340
341 bundleD.Install();
342 bundleD.VerifyRegisteredAndInPackageCache();
343 Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled));
344 // The patch was not supposed to be installed.
345 packageAv1.VerifyTestRegistryValue(testRegistryValue, V100);
346
347 bundleD.Uninstall();
348 bundleD.VerifyUnregisteredAndRemovedFromPackageCache();
349 Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled));
350 packageAv1.VerifyTestRegistryRootDeleted();
351 }
329 } 352 }
330} 353}