diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-06-15 17:09:55 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-06-15 18:27:22 -0500 |
commit | 223606fcd02e6d15e065d1e108e17c8848d35f9f (patch) | |
tree | 577b3187354582fd2c1c8edcbd8e16ac86624b87 /src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs | |
parent | c4090531d4caac4b8cb3356cb971ff2e1c9f8704 (diff) | |
download | wix-223606fcd02e6d15e065d1e108e17c8848d35f9f.tar.gz wix-223606fcd02e6d15e065d1e108e17c8848d35f9f.tar.bz2 wix-223606fcd02e6d15e065d1e108e17c8848d35f9f.zip |
Update some skipped tests to be dynamically skipped.
Diffstat (limited to 'src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs')
-rw-r--r-- | src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs | 20 |
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 | } |