summaryrefslogtreecommitdiff
path: root/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs')
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs
index de817e90..4d915c02 100644
--- a/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs
+++ b/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs
@@ -4,6 +4,7 @@ namespace WixToolsetTest.BurnE2E
4{ 4{
5 using System; 5 using System;
6 using System.IO; 6 using System.IO;
7 using WixBuildTools.TestSupport;
7 using WixTestTools; 8 using WixTestTools;
8 using Xunit; 9 using Xunit;
9 using Xunit.Abstractions; 10 using Xunit.Abstractions;
@@ -42,14 +43,10 @@ namespace WixToolsetTest.BurnE2E
42 this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleA_x64"); 43 this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleA_x64");
43 } 44 }
44 45
45#if DEBUG
46 [RuntimeFact(Skip = "0xc0000005 during shutdown from tiptsf.dll")]
47#else
48 [RuntimeFact] 46 [RuntimeFact]
49#endif
50 public void CanInstallAndUninstallSimplePerUserBundle_x64_wixstdba() 47 public void CanInstallAndUninstallSimplePerUserBundle_x64_wixstdba()
51 { 48 {
52 this.CanInstallAndUninstallSimpleBundle("PackageApu_x64", "BundleApu_x64", "PackagePerUser.wxs"); 49 this.CanInstallAndUninstallSimpleBundle("PackageApu_x64", "BundleApu_x64", "PackagePerUser.wxs", unchecked((int)0xc0000005));
53 } 50 }
54 51
55 [RuntimeFact] 52 [RuntimeFact]
@@ -70,11 +67,12 @@ namespace WixToolsetTest.BurnE2E
70 this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleD_x64"); 67 this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleD_x64");
71 } 68 }
72 69
73 private void CanInstallAndUninstallSimpleBundle(string packageName, string bundleName, string fileName = "Package.wxs") 70 private void CanInstallAndUninstallSimpleBundle(string packageName, string bundleName, string fileName = "Package.wxs", int? alternateExitCode = null)
74 { 71 {
75 var package = this.CreatePackageInstaller(packageName); 72 var package = this.CreatePackageInstaller(packageName);
76 73
77 var bundle = this.CreateBundleInstaller(bundleName); 74 var bundle = this.CreateBundleInstaller(bundleName);
75 bundle.AlternateExitCode = alternateExitCode;
78 76
79 var packageSourceCodeInstalled = package.GetInstalledFilePath(fileName); 77 var packageSourceCodeInstalled = package.GetInstalledFilePath(fileName);
80 78
@@ -89,12 +87,22 @@ namespace WixToolsetTest.BurnE2E
89 // Source file should be installed 87 // Source file should be installed
90 Assert.True(File.Exists(packageSourceCodeInstalled), $"Should have found {packageName} payload installed at: {packageSourceCodeInstalled}"); 88 Assert.True(File.Exists(packageSourceCodeInstalled), $"Should have found {packageName} payload installed at: {packageSourceCodeInstalled}");
91 89
90 if (alternateExitCode == bundle.LastExitCode)
91 {
92 WixAssert.Skip($"Install exited with {bundle.LastExitCode}");
93 }
94
92 bundle.Uninstall(cachedBundlePath); 95 bundle.Uninstall(cachedBundlePath);
93 96
94 // Source file should *not* be installed 97 // Source file should *not* be installed
95 Assert.False(File.Exists(packageSourceCodeInstalled), $"{packageName} payload should have been removed by uninstall from: {packageSourceCodeInstalled}"); 98 Assert.False(File.Exists(packageSourceCodeInstalled), $"{packageName} payload should have been removed by uninstall from: {packageSourceCodeInstalled}");
96 99
97 bundle.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); 100 bundle.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath);
101
102 if (alternateExitCode == bundle.LastExitCode)
103 {
104 WixAssert.Skip($"Uninstall exited with {bundle.LastExitCode}");
105 }
98 } 106 }
99 } 107 }
100} 108}