diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-05-13 11:40:45 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-05-13 12:35:15 -0500 |
commit | 031991f32f059b64374e6d257cbe573304dd577f (patch) | |
tree | 9d11ebb5d8595bf45c507f38d637b14915af7630 | |
parent | ad6d2636f60b04ee68656f99fb3bd56a86ba5983 (diff) | |
download | wix-031991f32f059b64374e6d257cbe573304dd577f.tar.gz wix-031991f32f059b64374e6d257cbe573304dd577f.tar.bz2 wix-031991f32f059b64374e6d257cbe573304dd577f.zip |
Add ability to skip tests at runtime, and skip long running cache tests
6665
38 files changed, 423 insertions, 194 deletions
diff --git a/src/internal/WixBuildTools.TestSupport/WixBuildTools.TestSupport.csproj b/src/internal/WixBuildTools.TestSupport/WixBuildTools.TestSupport.csproj index d614476f..8a5237d1 100644 --- a/src/internal/WixBuildTools.TestSupport/WixBuildTools.TestSupport.csproj +++ b/src/internal/WixBuildTools.TestSupport/WixBuildTools.TestSupport.csproj | |||
@@ -21,6 +21,6 @@ | |||
21 | </ItemGroup> | 21 | </ItemGroup> |
22 | 22 | ||
23 | <ItemGroup> | 23 | <ItemGroup> |
24 | <PackageReference Include="xunit.assert" /> | 24 | <PackageReference Include="xunit" /> |
25 | </ItemGroup> | 25 | </ItemGroup> |
26 | </Project> | 26 | </Project> |
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkipTestException.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkipTestException.cs new file mode 100644 index 00000000..bd7d23f9 --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkipTestException.cs | |||
@@ -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 | namespace WixBuildTools.TestSupport.XunitExtensions | ||
4 | { | ||
5 | using System; | ||
6 | |||
7 | public class SkipTestException : Exception | ||
8 | { | ||
9 | public SkipTestException(string reason) | ||
10 | : base(reason) | ||
11 | { | ||
12 | |||
13 | } | ||
14 | } | ||
15 | } | ||
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactAttribute.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactAttribute.cs new file mode 100644 index 00000000..4974d489 --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactAttribute.cs | |||
@@ -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 | namespace WixBuildTools.TestSupport.XunitExtensions | ||
4 | { | ||
5 | using Xunit; | ||
6 | using Xunit.Sdk; | ||
7 | |||
8 | // https://github.com/xunit/samples.xunit/blob/5dc1d35a63c3394a8678ac466b882576a70f56f6/DynamicSkipExample | ||
9 | [XunitTestCaseDiscoverer("WixBuildTools.TestSupport.XunitExtensions.SkippableFactDiscoverer", "WixBuildTools.TestSupport")] | ||
10 | public class SkippableFactAttribute : FactAttribute | ||
11 | { | ||
12 | } | ||
13 | } | ||
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactDiscoverer.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactDiscoverer.cs new file mode 100644 index 00000000..b692c912 --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactDiscoverer.cs | |||
@@ -0,0 +1,23 @@ | |||
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 WixBuildTools.TestSupport.XunitExtensions | ||
4 | { | ||
5 | using System.Collections.Generic; | ||
6 | using Xunit.Abstractions; | ||
7 | using Xunit.Sdk; | ||
8 | |||
9 | public class SkippableFactDiscoverer : IXunitTestCaseDiscoverer | ||
10 | { | ||
11 | private IMessageSink DiagnosticMessageSink { get; } | ||
12 | |||
13 | public SkippableFactDiscoverer(IMessageSink diagnosticMessageSink) | ||
14 | { | ||
15 | this.DiagnosticMessageSink = diagnosticMessageSink; | ||
16 | } | ||
17 | |||
18 | public IEnumerable<IXunitTestCase> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute) | ||
19 | { | ||
20 | yield return new SkippableFactTestCase(this.DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), discoveryOptions.MethodDisplayOptionsOrDefault(), testMethod); | ||
21 | } | ||
22 | } | ||
23 | } | ||
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactMessageBus.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactMessageBus.cs new file mode 100644 index 00000000..6d01889e --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactMessageBus.cs | |||
@@ -0,0 +1,40 @@ | |||
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 WixBuildTools.TestSupport.XunitExtensions | ||
4 | { | ||
5 | using System.Linq; | ||
6 | using Xunit.Abstractions; | ||
7 | using Xunit.Sdk; | ||
8 | |||
9 | public class SkippableFactMessageBus : IMessageBus | ||
10 | { | ||
11 | private IMessageBus InnerBus { get; } | ||
12 | |||
13 | public SkippableFactMessageBus(IMessageBus innerBus) | ||
14 | { | ||
15 | this.InnerBus = innerBus; | ||
16 | } | ||
17 | |||
18 | public int DynamicallySkippedTestCount { get; private set; } | ||
19 | |||
20 | public void Dispose() | ||
21 | { | ||
22 | } | ||
23 | |||
24 | public bool QueueMessage(IMessageSinkMessage message) | ||
25 | { | ||
26 | if (message is ITestFailed testFailed) | ||
27 | { | ||
28 | var exceptionType = testFailed.ExceptionTypes.FirstOrDefault(); | ||
29 | if (exceptionType == typeof(SkipTestException).FullName) | ||
30 | { | ||
31 | ++this.DynamicallySkippedTestCount; | ||
32 | return this.InnerBus.QueueMessage(new TestSkipped(testFailed.Test, testFailed.Messages.FirstOrDefault())); | ||
33 | } | ||
34 | } | ||
35 | |||
36 | // Nothing we care about, send it on its way | ||
37 | return this.InnerBus.QueueMessage(message); | ||
38 | } | ||
39 | } | ||
40 | } | ||
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactTestCase.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactTestCase.cs new file mode 100644 index 00000000..f13fec83 --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableFactTestCase.cs | |||
@@ -0,0 +1,40 @@ | |||
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 WixBuildTools.TestSupport.XunitExtensions | ||
4 | { | ||
5 | using System; | ||
6 | using System.ComponentModel; | ||
7 | using System.Threading; | ||
8 | using System.Threading.Tasks; | ||
9 | using Xunit.Abstractions; | ||
10 | using Xunit.Sdk; | ||
11 | |||
12 | public class SkippableFactTestCase : XunitTestCase | ||
13 | { | ||
14 | [EditorBrowsable(EditorBrowsableState.Never)] | ||
15 | [Obsolete("Called by the de-serializer; should only be called by deriving classes for de-serialization purposes")] | ||
16 | public SkippableFactTestCase() { } | ||
17 | |||
18 | public SkippableFactTestCase(IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, TestMethodDisplayOptions defaultMethodDisplayOptions, ITestMethod testMethod, object[] testMethodArguments = null) | ||
19 | : base(diagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testMethod, testMethodArguments) | ||
20 | { | ||
21 | } | ||
22 | |||
23 | public override async Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink, | ||
24 | IMessageBus messageBus, | ||
25 | object[] constructorArguments, | ||
26 | ExceptionAggregator aggregator, | ||
27 | CancellationTokenSource cancellationTokenSource) | ||
28 | { | ||
29 | var skipMessageBus = new SkippableFactMessageBus(messageBus); | ||
30 | var result = await base.RunAsync(diagnosticMessageSink, skipMessageBus, constructorArguments, aggregator, cancellationTokenSource); | ||
31 | if (skipMessageBus.DynamicallySkippedTestCount > 0) | ||
32 | { | ||
33 | result.Failed -= skipMessageBus.DynamicallySkippedTestCount; | ||
34 | result.Skipped += skipMessageBus.DynamicallySkippedTestCount; | ||
35 | } | ||
36 | |||
37 | return result; | ||
38 | } | ||
39 | } | ||
40 | } | ||
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryAttribute.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryAttribute.cs new file mode 100644 index 00000000..e026bb59 --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryAttribute.cs | |||
@@ -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 | namespace WixBuildTools.TestSupport.XunitExtensions | ||
4 | { | ||
5 | using Xunit; | ||
6 | using Xunit.Sdk; | ||
7 | |||
8 | [XunitTestCaseDiscoverer("WixBuildTools.TestSupport.XunitExtensions.SkippableFactDiscoverer", "WixBuildTools.TestSupport")] | ||
9 | public class SkippableTheoryAttribute : TheoryAttribute | ||
10 | { | ||
11 | } | ||
12 | } | ||
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryDiscoverer.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryDiscoverer.cs new file mode 100644 index 00000000..cf4e2b43 --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryDiscoverer.cs | |||
@@ -0,0 +1,41 @@ | |||
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 WixBuildTools.TestSupport.XunitExtensions | ||
4 | { | ||
5 | using System.Collections.Generic; | ||
6 | using Xunit.Abstractions; | ||
7 | using Xunit.Sdk; | ||
8 | |||
9 | public class SkippableTheoryDiscoverer : IXunitTestCaseDiscoverer | ||
10 | { | ||
11 | private IMessageSink DiagnosticMessageSink { get; } | ||
12 | private TheoryDiscoverer TheoryDiscoverer { get; } | ||
13 | |||
14 | public SkippableTheoryDiscoverer(IMessageSink diagnosticMessageSink) | ||
15 | { | ||
16 | this.DiagnosticMessageSink = diagnosticMessageSink; | ||
17 | |||
18 | this.TheoryDiscoverer = new TheoryDiscoverer(diagnosticMessageSink); | ||
19 | } | ||
20 | |||
21 | public IEnumerable<IXunitTestCase> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute) | ||
22 | { | ||
23 | var defaultMethodDisplay = discoveryOptions.MethodDisplayOrDefault(); | ||
24 | var defaultMethodDisplayOptions = discoveryOptions.MethodDisplayOptionsOrDefault(); | ||
25 | |||
26 | // Unlike fact discovery, the underlying algorithm for theories is complex, so we let the theory discoverer | ||
27 | // do its work, and do a little on-the-fly conversion into our own test cases. | ||
28 | foreach (var testCase in this.TheoryDiscoverer.Discover(discoveryOptions, testMethod, factAttribute)) | ||
29 | { | ||
30 | if (testCase is XunitTheoryTestCase) | ||
31 | { | ||
32 | yield return new SkippableTheoryTestCase(this.DiagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testCase.TestMethod); | ||
33 | } | ||
34 | else | ||
35 | { | ||
36 | yield return new SkippableFactTestCase(this.DiagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testCase.TestMethod, testCase.TestMethodArguments); | ||
37 | } | ||
38 | } | ||
39 | } | ||
40 | } | ||
41 | } | ||
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs new file mode 100644 index 00000000..3299fe7e --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SkippableTheoryTestCase.cs | |||
@@ -0,0 +1,41 @@ | |||
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 WixBuildTools.TestSupport.XunitExtensions | ||
4 | { | ||
5 | using System; | ||
6 | using System.ComponentModel; | ||
7 | using System.Threading; | ||
8 | using System.Threading.Tasks; | ||
9 | using Xunit.Abstractions; | ||
10 | using Xunit.Sdk; | ||
11 | |||
12 | public class SkippableTheoryTestCase : XunitTheoryTestCase | ||
13 | { | ||
14 | [EditorBrowsable(EditorBrowsableState.Never)] | ||
15 | [Obsolete("Called by the de-serializer; should only be called by deriving classes for de-serialization purposes")] | ||
16 | public SkippableTheoryTestCase() { } | ||
17 | |||
18 | public SkippableTheoryTestCase(IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, TestMethodDisplayOptions defaultMethodDisplayOptions, ITestMethod testMethod) | ||
19 | : base(diagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testMethod) | ||
20 | { | ||
21 | } | ||
22 | |||
23 | public override async Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink, | ||
24 | IMessageBus messageBus, | ||
25 | object[] constructorArguments, | ||
26 | ExceptionAggregator aggregator, | ||
27 | CancellationTokenSource cancellationTokenSource) | ||
28 | { | ||
29 | // Duplicated code from SkippableFactTestCase. I'm sure we could find a way to de-dup with some thought. | ||
30 | var skipMessageBus = new SkippableFactMessageBus(messageBus); | ||
31 | var result = await base.RunAsync(diagnosticMessageSink, skipMessageBus, constructorArguments, aggregator, cancellationTokenSource); | ||
32 | if (skipMessageBus.DynamicallySkippedTestCount > 0) | ||
33 | { | ||
34 | result.Failed -= skipMessageBus.DynamicallySkippedTestCount; | ||
35 | result.Skipped += skipMessageBus.DynamicallySkippedTestCount; | ||
36 | } | ||
37 | |||
38 | return result; | ||
39 | } | ||
40 | } | ||
41 | } | ||
diff --git a/src/internal/WixBuildTools.TestSupport/SucceededException.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SucceededException.cs index 704fba28..704fba28 100644 --- a/src/internal/WixBuildTools.TestSupport/SucceededException.cs +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SucceededException.cs | |||
diff --git a/src/internal/WixBuildTools.TestSupport/WixAssert.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs index 1db842c3..10156547 100644 --- a/src/internal/WixBuildTools.TestSupport/WixAssert.cs +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs | |||
@@ -6,6 +6,7 @@ namespace WixBuildTools.TestSupport | |||
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.Linq; | 7 | using System.Linq; |
8 | using System.Xml.Linq; | 8 | using System.Xml.Linq; |
9 | using WixBuildTools.TestSupport.XunitExtensions; | ||
9 | using Xunit; | 10 | using Xunit; |
10 | 11 | ||
11 | public class WixAssert : Assert | 12 | public class WixAssert : Assert |
@@ -41,6 +42,16 @@ namespace WixBuildTools.TestSupport | |||
41 | CompareXml(expectedDoc, actualDoc); | 42 | CompareXml(expectedDoc, actualDoc); |
42 | } | 43 | } |
43 | 44 | ||
45 | /// <summary> | ||
46 | /// Dynamically skips the test. | ||
47 | /// Requires that the test was marked with a fact attribute derived from <see cref="WixBuildTools.TestSupport.XunitExtensions.SkippableFactAttribute" /> | ||
48 | /// or <see cref="WixBuildTools.TestSupport.XunitExtensions.SkippableTheoryAttribute" /> | ||
49 | /// </summary> | ||
50 | public static void Skip(string message) | ||
51 | { | ||
52 | throw new SkipTestException(message); | ||
53 | } | ||
54 | |||
44 | public static void Succeeded(int hr, string format, params object[] formatArgs) | 55 | public static void Succeeded(int hr, string format, params object[] formatArgs) |
45 | { | 56 | { |
46 | if (0 > hr) | 57 | if (0 > hr) |
diff --git a/src/test/burn/WixTestTools/LongRuntimeFactAttribute.cs b/src/test/burn/WixTestTools/LongRuntimeFactAttribute.cs new file mode 100644 index 00000000..1da10df8 --- /dev/null +++ b/src/test/burn/WixTestTools/LongRuntimeFactAttribute.cs | |||
@@ -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 | namespace WixTestTools | ||
4 | { | ||
5 | using System; | ||
6 | |||
7 | public class LongRuntimeFactAttribute : RuntimeFactAttribute | ||
8 | { | ||
9 | const string RequiredEnvironmentVariableName = "LongRuntimeTestsEnabled"; | ||
10 | |||
11 | public static bool LongRuntimeTestsEnabled { get; } | ||
12 | |||
13 | static LongRuntimeFactAttribute() | ||
14 | { | ||
15 | var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); | ||
16 | LongRuntimeTestsEnabled = Boolean.TryParse(testsEnabledString, out var testsEnabled) && testsEnabled; | ||
17 | } | ||
18 | |||
19 | public LongRuntimeFactAttribute() | ||
20 | { | ||
21 | if (!LongRuntimeTestsEnabled) | ||
22 | { | ||
23 | this.Skip = $"These tests take a long time to run, so the {RequiredEnvironmentVariableName} environment variable must be set to true."; | ||
24 | } | ||
25 | } | ||
26 | } | ||
27 | } | ||
diff --git a/src/test/burn/WixTestTools/RuntimeFactAttribute.cs b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs new file mode 100644 index 00000000..fcd19b95 --- /dev/null +++ b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs | |||
@@ -0,0 +1,34 @@ | |||
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 WixTestTools | ||
4 | { | ||
5 | using System; | ||
6 | using System.Security.Principal; | ||
7 | using WixBuildTools.TestSupport.XunitExtensions; | ||
8 | |||
9 | public class RuntimeFactAttribute : SkippableFactAttribute | ||
10 | { | ||
11 | const string RequiredEnvironmentVariableName = "RuntimeTestsEnabled"; | ||
12 | |||
13 | public static bool RuntimeTestsEnabled { get; } | ||
14 | public static bool RunningAsAdministrator { get; } | ||
15 | |||
16 | static RuntimeFactAttribute() | ||
17 | { | ||
18 | using var identity = WindowsIdentity.GetCurrent(); | ||
19 | var principal = new WindowsPrincipal(identity); | ||
20 | RunningAsAdministrator = principal.IsInRole(WindowsBuiltInRole.Administrator); | ||
21 | |||
22 | var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); | ||
23 | RuntimeTestsEnabled = Boolean.TryParse(testsEnabledString, out var testsEnabled) && testsEnabled; | ||
24 | } | ||
25 | |||
26 | public RuntimeFactAttribute() | ||
27 | { | ||
28 | if (!RuntimeTestsEnabled || !RunningAsAdministrator) | ||
29 | { | ||
30 | this.Skip = $"These tests must run elevated ({(RunningAsAdministrator ? "passed" : "failed")}). These tests affect machine state. To accept the consequences, set the {RequiredEnvironmentVariableName} environment variable to true ({(RuntimeTestsEnabled ? "passed" : "failed")})."; | ||
31 | } | ||
32 | } | ||
33 | } | ||
34 | } | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs index efe4f05b..de817e90 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 WixTestTools; | ||
7 | using Xunit; | 8 | using Xunit; |
8 | using Xunit.Abstractions; | 9 | using Xunit.Abstractions; |
9 | 10 | ||
@@ -11,59 +12,59 @@ namespace WixToolsetTest.BurnE2E | |||
11 | { | 12 | { |
12 | public BasicFunctionalityTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 13 | public BasicFunctionalityTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
13 | 14 | ||
14 | [Fact] | 15 | [RuntimeFact] |
15 | public void CanInstallAndUninstallSimpleBundle_x86_wixstdba() | 16 | public void CanInstallAndUninstallSimpleBundle_x86_wixstdba() |
16 | { | 17 | { |
17 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleA"); | 18 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleA"); |
18 | } | 19 | } |
19 | 20 | ||
20 | [Fact] | 21 | [RuntimeFact] |
21 | public void CanInstallAndUninstallSimpleBundle_x86_testba() | 22 | public void CanInstallAndUninstallSimpleBundle_x86_testba() |
22 | { | 23 | { |
23 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleB"); | 24 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleB"); |
24 | } | 25 | } |
25 | 26 | ||
26 | [Fact] | 27 | [RuntimeFact] |
27 | public void CanInstallAndUninstallSimpleBundle_x86_dnctestba() | 28 | public void CanInstallAndUninstallSimpleBundle_x86_dnctestba() |
28 | { | 29 | { |
29 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleC"); | 30 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleC"); |
30 | } | 31 | } |
31 | 32 | ||
32 | [Fact] | 33 | [RuntimeFact] |
33 | public void CanInstallAndUninstallSimpleBundle_x86_wixba() | 34 | public void CanInstallAndUninstallSimpleBundle_x86_wixba() |
34 | { | 35 | { |
35 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleD"); | 36 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleD"); |
36 | } | 37 | } |
37 | 38 | ||
38 | [Fact] | 39 | [RuntimeFact] |
39 | public void CanInstallAndUninstallSimpleBundle_x64_wixstdba() | 40 | public void CanInstallAndUninstallSimpleBundle_x64_wixstdba() |
40 | { | 41 | { |
41 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleA_x64"); | 42 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleA_x64"); |
42 | } | 43 | } |
43 | 44 | ||
44 | #if DEBUG | 45 | #if DEBUG |
45 | [Fact(Skip = "0xc0000005 during shutdown from tiptsf.dll")] | 46 | [RuntimeFact(Skip = "0xc0000005 during shutdown from tiptsf.dll")] |
46 | #else | 47 | #else |
47 | [Fact] | 48 | [RuntimeFact] |
48 | #endif | 49 | #endif |
49 | public void CanInstallAndUninstallSimplePerUserBundle_x64_wixstdba() | 50 | public void CanInstallAndUninstallSimplePerUserBundle_x64_wixstdba() |
50 | { | 51 | { |
51 | this.CanInstallAndUninstallSimpleBundle("PackageApu_x64", "BundleApu_x64", "PackagePerUser.wxs"); | 52 | this.CanInstallAndUninstallSimpleBundle("PackageApu_x64", "BundleApu_x64", "PackagePerUser.wxs"); |
52 | } | 53 | } |
53 | 54 | ||
54 | [Fact] | 55 | [RuntimeFact] |
55 | public void CanInstallAndUninstallSimpleBundle_x64_testba() | 56 | public void CanInstallAndUninstallSimpleBundle_x64_testba() |
56 | { | 57 | { |
57 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleB_x64"); | 58 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleB_x64"); |
58 | } | 59 | } |
59 | 60 | ||
60 | [Fact] | 61 | [RuntimeFact] |
61 | public void CanInstallAndUninstallSimpleBundle_x64_dnctestba() | 62 | public void CanInstallAndUninstallSimpleBundle_x64_dnctestba() |
62 | { | 63 | { |
63 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleC_x64"); | 64 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleC_x64"); |
64 | } | 65 | } |
65 | 66 | ||
66 | [Fact] | 67 | [RuntimeFact] |
67 | public void CanInstallAndUninstallSimpleBundle_x64_dncwixba() | 68 | public void CanInstallAndUninstallSimpleBundle_x64_dncwixba() |
68 | { | 69 | { |
69 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleD_x64"); | 70 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleD_x64"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs index b3015c30..0c6e5873 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs | |||
@@ -12,7 +12,7 @@ namespace WixToolsetTest.BurnE2E | |||
12 | { | 12 | { |
13 | public BundlePackageTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 13 | public BundlePackageTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
14 | 14 | ||
15 | [Fact] | 15 | [RuntimeFact] |
16 | public void CanInstallAndUninstallBundlePackages() | 16 | public void CanInstallAndUninstallBundlePackages() |
17 | { | 17 | { |
18 | var packageA = this.CreatePackageInstaller(@"..\BasicFunctionalityTests\PackageA"); | 18 | var packageA = this.CreatePackageInstaller(@"..\BasicFunctionalityTests\PackageA"); |
@@ -49,7 +49,7 @@ namespace WixToolsetTest.BurnE2E | |||
49 | Assert.False(File.Exists(packageA64SourceCodeFilePath), $"PackageA_x64 payload should have been removed by uninstall from: {packageA64SourceCodeFilePath}"); | 49 | Assert.False(File.Exists(packageA64SourceCodeFilePath), $"PackageA_x64 payload should have been removed by uninstall from: {packageA64SourceCodeFilePath}"); |
50 | } | 50 | } |
51 | 51 | ||
52 | [Fact] | 52 | [RuntimeFact] |
53 | public void CanInstallUpgradeBundlePackage() | 53 | public void CanInstallUpgradeBundlePackage() |
54 | { | 54 | { |
55 | var bundleAv1 = this.CreateBundleInstaller(@"..\UpgradeRelatedBundleTests\BundleAv1"); | 55 | var bundleAv1 = this.CreateBundleInstaller(@"..\UpgradeRelatedBundleTests\BundleAv1"); |
@@ -65,7 +65,7 @@ namespace WixToolsetTest.BurnE2E | |||
65 | bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); | 65 | bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); |
66 | } | 66 | } |
67 | 67 | ||
68 | [Fact] | 68 | [RuntimeFact] |
69 | public void CanInstallV3BundlePackage() | 69 | public void CanInstallV3BundlePackage() |
70 | { | 70 | { |
71 | var v3BundleId = "{215a70db-ab35-48c7-be51-d66eaac87177}"; | 71 | var v3BundleId = "{215a70db-ab35-48c7-be51-d66eaac87177}"; |
@@ -85,7 +85,7 @@ namespace WixToolsetTest.BurnE2E | |||
85 | Assert.Null(v3Registration.SystemComponent); | 85 | Assert.Null(v3Registration.SystemComponent); |
86 | } | 86 | } |
87 | 87 | ||
88 | [Fact] | 88 | [RuntimeFact] |
89 | public void CanLeaveBundlePackageVisible() | 89 | public void CanLeaveBundlePackageVisible() |
90 | { | 90 | { |
91 | var bundleAv1 = this.CreateBundleInstaller(@"..\UpgradeRelatedBundleTests\BundleAv1"); | 91 | var bundleAv1 = this.CreateBundleInstaller(@"..\UpgradeRelatedBundleTests\BundleAv1"); |
@@ -103,7 +103,7 @@ namespace WixToolsetTest.BurnE2E | |||
103 | bundleAv1.VerifyRegisteredAndInPackageCache(); | 103 | bundleAv1.VerifyRegisteredAndInPackageCache(); |
104 | } | 104 | } |
105 | 105 | ||
106 | [Fact] | 106 | [RuntimeFact] |
107 | public void CanReferenceCountBundlePackage() | 107 | public void CanReferenceCountBundlePackage() |
108 | { | 108 | { |
109 | var bundleAv1 = this.CreateBundleInstaller(@"..\UpgradeRelatedBundleTests\BundleAv1"); | 109 | var bundleAv1 = this.CreateBundleInstaller(@"..\UpgradeRelatedBundleTests\BundleAv1"); |
@@ -123,7 +123,7 @@ namespace WixToolsetTest.BurnE2E | |||
123 | bundleAv1.VerifyRegisteredAndInPackageCache(); | 123 | bundleAv1.VerifyRegisteredAndInPackageCache(); |
124 | } | 124 | } |
125 | 125 | ||
126 | [Fact] | 126 | [RuntimeFact] |
127 | public void CanSkipObsoleteBundlePackage() | 127 | public void CanSkipObsoleteBundlePackage() |
128 | { | 128 | { |
129 | var bundleAv1 = this.CreateBundleInstaller(@"..\UpgradeRelatedBundleTests\BundleAv1"); | 129 | var bundleAv1 = this.CreateBundleInstaller(@"..\UpgradeRelatedBundleTests\BundleAv1"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BurnE2EFixture.cs b/src/test/burn/WixToolsetTest.BurnE2E/BurnE2EFixture.cs deleted file mode 100644 index babfcbc3..00000000 --- a/src/test/burn/WixToolsetTest.BurnE2E/BurnE2EFixture.cs +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
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 System; | ||
6 | using System.Security.Principal; | ||
7 | |||
8 | public class BurnE2EFixture | ||
9 | { | ||
10 | const string RequiredEnvironmentVariableName = "RuntimeTestsEnabled"; | ||
11 | |||
12 | public BurnE2EFixture() | ||
13 | { | ||
14 | using var identity = WindowsIdentity.GetCurrent(); | ||
15 | var principal = new WindowsPrincipal(identity); | ||
16 | if (!principal.IsInRole(WindowsBuiltInRole.Administrator)) | ||
17 | { | ||
18 | throw new InvalidOperationException("These tests must run elevated."); | ||
19 | } | ||
20 | |||
21 | var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); | ||
22 | if (!bool.TryParse(testsEnabledString, out var testsEnabled) || !testsEnabled) | ||
23 | { | ||
24 | throw new InvalidOperationException($"These tests affect machine state. Set the {RequiredEnvironmentVariableName} environment variable to true to accept the consequences."); | ||
25 | } | ||
26 | } | ||
27 | } | ||
28 | } | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs index 975bd238..6664b849 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/BurnE2ETests.cs | |||
@@ -73,7 +73,7 @@ namespace WixToolsetTest.BurnE2E | |||
73 | } | 73 | } |
74 | 74 | ||
75 | [CollectionDefinition("BurnE2E", DisableParallelization = true)] | 75 | [CollectionDefinition("BurnE2E", DisableParallelization = true)] |
76 | public class BurnE2ECollectionDefinition : ICollectionFixture<BurnE2EFixture> | 76 | public class BurnE2ECollectionDefinition |
77 | { | 77 | { |
78 | } | 78 | } |
79 | } | 79 | } |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs index 4d5fb811..6c8250d9 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs | |||
@@ -15,7 +15,7 @@ namespace WixToolsetTest.BurnE2E | |||
15 | { | 15 | { |
16 | public CacheTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 16 | public CacheTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
17 | 17 | ||
18 | private bool Is5GBFileAvailable() | 18 | private void SkipIf5GBFileUnavailable() |
19 | { | 19 | { |
20 | // Recreate the 5GB payload to avoid having to copy it to the VM to run the tests. | 20 | // Recreate the 5GB payload to avoid having to copy it to the VM to run the tests. |
21 | const long FiveGB = 5_368_709_120; | 21 | const long FiveGB = 5_368_709_120; |
@@ -27,8 +27,7 @@ namespace WixToolsetTest.BurnE2E | |||
27 | var drive = new DriveInfo(targetFilePath.Substring(0, 1)); | 27 | var drive = new DriveInfo(targetFilePath.Substring(0, 1)); |
28 | if (drive.AvailableFreeSpace < FiveGB + OneGB) | 28 | if (drive.AvailableFreeSpace < FiveGB + OneGB) |
29 | { | 29 | { |
30 | Console.WriteLine($"Skipping {this.TestContext.TestName} because there is not enough disk space available to run the test."); | 30 | WixAssert.Skip($"Skipping {this.TestContext.TestName} because there is not enough disk space available to run the test."); |
31 | return false; | ||
32 | } | 31 | } |
33 | 32 | ||
34 | if (!File.Exists(targetFilePath)) | 33 | if (!File.Exists(targetFilePath)) |
@@ -40,17 +39,12 @@ namespace WixToolsetTest.BurnE2E | |||
40 | }; | 39 | }; |
41 | testTool.Run(true); | 40 | testTool.Run(true); |
42 | } | 41 | } |
43 | |||
44 | return true; | ||
45 | } | 42 | } |
46 | 43 | ||
47 | [Fact] | 44 | [LongRuntimeFact] |
48 | public void CanCache5GBFile() | 45 | public void CanCache5GBFile() |
49 | { | 46 | { |
50 | if (!this.Is5GBFileAvailable()) | 47 | this.SkipIf5GBFileUnavailable(); |
51 | { | ||
52 | return; | ||
53 | } | ||
54 | 48 | ||
55 | var packageA = this.CreatePackageInstaller("PackageA"); | 49 | var packageA = this.CreatePackageInstaller("PackageA"); |
56 | var bundleC = this.CreateBundleInstaller("BundleC"); | 50 | var bundleC = this.CreateBundleInstaller("BundleC"); |
@@ -65,10 +59,7 @@ namespace WixToolsetTest.BurnE2E | |||
65 | 59 | ||
66 | private string Cache5GBFileFromDownload(bool disableRangeRequests) | 60 | private string Cache5GBFileFromDownload(bool disableRangeRequests) |
67 | { | 61 | { |
68 | if (!this.Is5GBFileAvailable()) | 62 | this.SkipIf5GBFileUnavailable(); |
69 | { | ||
70 | return null; | ||
71 | } | ||
72 | 63 | ||
73 | var packageA = this.CreatePackageInstaller("PackageA"); | 64 | var packageA = this.CreatePackageInstaller("PackageA"); |
74 | var bundleC = this.CreateBundleInstaller("BundleC"); | 65 | var bundleC = this.CreateBundleInstaller("BundleC"); |
@@ -100,33 +91,25 @@ namespace WixToolsetTest.BurnE2E | |||
100 | return installLogPath; | 91 | return installLogPath; |
101 | } | 92 | } |
102 | 93 | ||
103 | [Fact] | 94 | [LongRuntimeFact] |
104 | public void CanCache5GBFileFromDownloadWithRangeRequestSupport() | 95 | public void CanCache5GBFileFromDownloadWithRangeRequestSupport() |
105 | { | 96 | { |
106 | var logPath = this.Cache5GBFileFromDownload(false); | 97 | var logPath = this.Cache5GBFileFromDownload(false); |
107 | if (logPath == null) | ||
108 | { | ||
109 | return; | ||
110 | } | ||
111 | 98 | ||
112 | Assert.False(LogVerifier.MessageInLogFile(logPath, "Range request not supported for URL: http://localhost:9999/e2e/BundleC/fivegb.file")); | 99 | Assert.False(LogVerifier.MessageInLogFile(logPath, "Range request not supported for URL: http://localhost:9999/e2e/BundleC/fivegb.file")); |
113 | Assert.False(LogVerifier.MessageInLogFile(logPath, "Content-Length not returned for URL: http://localhost:9999/e2e/BundleC/fivegb.file")); | 100 | Assert.False(LogVerifier.MessageInLogFile(logPath, "Content-Length not returned for URL: http://localhost:9999/e2e/BundleC/fivegb.file")); |
114 | } | 101 | } |
115 | 102 | ||
116 | [Fact] | 103 | [LongRuntimeFact] |
117 | public void CanCache5GBFileFromDownloadWithoutRangeRequestSupport() | 104 | public void CanCache5GBFileFromDownloadWithoutRangeRequestSupport() |
118 | { | 105 | { |
119 | var logPath = this.Cache5GBFileFromDownload(true); | 106 | var logPath = this.Cache5GBFileFromDownload(true); |
120 | if (logPath == null) | ||
121 | { | ||
122 | return; | ||
123 | } | ||
124 | 107 | ||
125 | Assert.True(LogVerifier.MessageInLogFile(logPath, "Range request not supported for URL: http://localhost:9999/e2e/BundleC/fivegb.file")); | 108 | Assert.True(LogVerifier.MessageInLogFile(logPath, "Range request not supported for URL: http://localhost:9999/e2e/BundleC/fivegb.file")); |
126 | Assert.False(LogVerifier.MessageInLogFile(logPath, "Content-Length not returned for URL: http://localhost:9999/e2e/BundleC/fivegb.file")); | 109 | Assert.False(LogVerifier.MessageInLogFile(logPath, "Content-Length not returned for URL: http://localhost:9999/e2e/BundleC/fivegb.file")); |
127 | } | 110 | } |
128 | 111 | ||
129 | [Fact] | 112 | [RuntimeFact] |
130 | public void CanDownloadPayloadsFromMissingAttachedContainer() | 113 | public void CanDownloadPayloadsFromMissingAttachedContainer() |
131 | { | 114 | { |
132 | var packageA = this.CreatePackageInstaller("PackageA"); | 115 | var packageA = this.CreatePackageInstaller("PackageA"); |
@@ -178,7 +161,7 @@ namespace WixToolsetTest.BurnE2E | |||
178 | Assert.True(LogVerifier.MessageInLogFile(modifyLogPath, "Ignoring failure to get size and time for URL: http://localhost:9999/e2e/BundleA/PackageB.msi (error 0x80070002)")); | 161 | Assert.True(LogVerifier.MessageInLogFile(modifyLogPath, "Ignoring failure to get size and time for URL: http://localhost:9999/e2e/BundleA/PackageB.msi (error 0x80070002)")); |
179 | } | 162 | } |
180 | 163 | ||
181 | [Fact] | 164 | [RuntimeFact] |
182 | public void CanFindAttachedContainerFromRenamedBundle() | 165 | public void CanFindAttachedContainerFromRenamedBundle() |
183 | { | 166 | { |
184 | var packageA = this.CreatePackageInstaller("PackageA"); | 167 | var packageA = this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs index cd6beaa9..a607f7ce 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/ContainerTests.cs | |||
@@ -2,14 +2,14 @@ | |||
2 | 2 | ||
3 | namespace WixToolsetTest.BurnE2E | 3 | namespace WixToolsetTest.BurnE2E |
4 | { | 4 | { |
5 | using Xunit; | 5 | using WixTestTools; |
6 | using Xunit.Abstractions; | 6 | using Xunit.Abstractions; |
7 | 7 | ||
8 | public class ContainerTests : BurnE2ETests | 8 | public class ContainerTests : BurnE2ETests |
9 | { | 9 | { |
10 | public ContainerTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 10 | public ContainerTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
11 | 11 | ||
12 | [Fact] | 12 | [RuntimeFact] |
13 | public void CanSupportMultipleAttachedContainers() | 13 | public void CanSupportMultipleAttachedContainers() |
14 | { | 14 | { |
15 | var packageA = this.CreatePackageInstaller("PackageA"); | 15 | var packageA = this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs index f4bc6ba9..41f39050 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs | |||
@@ -12,7 +12,7 @@ namespace WixToolsetTest.BurnE2E | |||
12 | { | 12 | { |
13 | public DependencyTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 13 | public DependencyTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
14 | 14 | ||
15 | [Fact] | 15 | [RuntimeFact] |
16 | public void CanKeepSameExactPackageAfterUpgradingBundle() | 16 | public void CanKeepSameExactPackageAfterUpgradingBundle() |
17 | { | 17 | { |
18 | var packageFv1 = this.CreatePackageInstaller("PackageFv1"); | 18 | var packageFv1 = this.CreatePackageInstaller("PackageFv1"); |
@@ -40,7 +40,7 @@ namespace WixToolsetTest.BurnE2E | |||
40 | packageFv1.VerifyInstalled(false); | 40 | packageFv1.VerifyInstalled(false); |
41 | } | 41 | } |
42 | 42 | ||
43 | [Fact (Skip = "https://github.com/wixtoolset/issues/issues/6401")] | 43 | [RuntimeFact (Skip = "https://github.com/wixtoolset/issues/issues/6401")] |
44 | public void CanKeepSameExactPackageAfterUpgradingBundleWithSlipstreamedPatch() | 44 | public void CanKeepSameExactPackageAfterUpgradingBundleWithSlipstreamedPatch() |
45 | { | 45 | { |
46 | var originalVersion = "1.0.0.0"; | 46 | var originalVersion = "1.0.0.0"; |
@@ -79,7 +79,7 @@ namespace WixToolsetTest.BurnE2E | |||
79 | packageA.VerifyInstalled(false); | 79 | packageA.VerifyInstalled(false); |
80 | } | 80 | } |
81 | 81 | ||
82 | [Fact] | 82 | [RuntimeFact] |
83 | public void CanKeepUpgradedPackageAfterUninstallUpgradedBundle() | 83 | public void CanKeepUpgradedPackageAfterUninstallUpgradedBundle() |
84 | { | 84 | { |
85 | var testRegistryValueExe = "ExeA"; | 85 | var testRegistryValueExe = "ExeA"; |
@@ -123,7 +123,7 @@ namespace WixToolsetTest.BurnE2E | |||
123 | bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0"); | 123 | bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0"); |
124 | } | 124 | } |
125 | 125 | ||
126 | [Fact] | 126 | [RuntimeFact] |
127 | public void UninstallsOrphanCompatiblePackages() | 127 | public void UninstallsOrphanCompatiblePackages() |
128 | { | 128 | { |
129 | var testRegistryValueExe = "ExeA"; | 129 | var testRegistryValueExe = "ExeA"; |
@@ -181,7 +181,7 @@ namespace WixToolsetTest.BurnE2E | |||
181 | bundleAv1.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); | 181 | bundleAv1.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); |
182 | } | 182 | } |
183 | 183 | ||
184 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6401")] | 184 | [RuntimeFact(Skip = "https://github.com/wixtoolset/issues/issues/6401")] |
185 | public void CanMinorUpgradeDependencyPackageFromPatchBundle() | 185 | public void CanMinorUpgradeDependencyPackageFromPatchBundle() |
186 | { | 186 | { |
187 | var originalVersion = "1.0.0.0"; | 187 | var originalVersion = "1.0.0.0"; |
@@ -231,7 +231,7 @@ namespace WixToolsetTest.BurnE2E | |||
231 | } | 231 | } |
232 | } | 232 | } |
233 | 233 | ||
234 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6401")] | 234 | [RuntimeFact(Skip = "https://github.com/wixtoolset/issues/issues/6401")] |
235 | public void CanMinorUpgradeDependencyPackageFromPatchBundleThenUninstallToRestoreBase() | 235 | public void CanMinorUpgradeDependencyPackageFromPatchBundleThenUninstallToRestoreBase() |
236 | { | 236 | { |
237 | var originalVersion = "1.0.0.0"; | 237 | var originalVersion = "1.0.0.0"; |
@@ -291,7 +291,7 @@ namespace WixToolsetTest.BurnE2E | |||
291 | } | 291 | } |
292 | } | 292 | } |
293 | 293 | ||
294 | [Fact] | 294 | [RuntimeFact] |
295 | public void CanUninstallBaseWithAddOnsWhenAllSharePackages() | 295 | public void CanUninstallBaseWithAddOnsWhenAllSharePackages() |
296 | { | 296 | { |
297 | var testRegistryValueExe = "ExeA"; | 297 | var testRegistryValueExe = "ExeA"; |
@@ -347,7 +347,7 @@ namespace WixToolsetTest.BurnE2E | |||
347 | } | 347 | } |
348 | } | 348 | } |
349 | 349 | ||
350 | [Fact] | 350 | [RuntimeFact] |
351 | public void CanUpgradeBaseWithAddOns() | 351 | public void CanUpgradeBaseWithAddOns() |
352 | { | 352 | { |
353 | var testRegistryValueExe = "ExeA"; | 353 | var testRegistryValueExe = "ExeA"; |
@@ -405,7 +405,7 @@ namespace WixToolsetTest.BurnE2E | |||
405 | } | 405 | } |
406 | } | 406 | } |
407 | 407 | ||
408 | [Fact] | 408 | [RuntimeFact] |
409 | public void CanUninstallDependencyPackagesWithBundlesUninstalledInFifoOrder() | 409 | public void CanUninstallDependencyPackagesWithBundlesUninstalledInFifoOrder() |
410 | { | 410 | { |
411 | var testRegistryValueExe = "ExeA"; | 411 | var testRegistryValueExe = "ExeA"; |
@@ -446,7 +446,7 @@ namespace WixToolsetTest.BurnE2E | |||
446 | packageB.VerifyInstalled(false); | 446 | packageB.VerifyInstalled(false); |
447 | } | 447 | } |
448 | 448 | ||
449 | [Fact] | 449 | [RuntimeFact] |
450 | public void CanUninstallDependencyPackagesWithBundlesUninstalledInReverseOrder() | 450 | public void CanUninstallDependencyPackagesWithBundlesUninstalledInReverseOrder() |
451 | { | 451 | { |
452 | var packageA = this.CreatePackageInstaller("PackageAv1"); | 452 | var packageA = this.CreatePackageInstaller("PackageAv1"); |
@@ -480,7 +480,7 @@ namespace WixToolsetTest.BurnE2E | |||
480 | packageB.VerifyInstalled(false); | 480 | packageB.VerifyInstalled(false); |
481 | } | 481 | } |
482 | 482 | ||
483 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6401")] | 483 | [RuntimeFact(Skip = "https://github.com/wixtoolset/issues/issues/6401")] |
484 | public void CanUpgradePatchBundleWithAdditionalPatch() | 484 | public void CanUpgradePatchBundleWithAdditionalPatch() |
485 | { | 485 | { |
486 | var originalVersion = "1.0.0.0"; | 486 | var originalVersion = "1.0.0.0"; |
@@ -539,7 +539,7 @@ namespace WixToolsetTest.BurnE2E | |||
539 | } | 539 | } |
540 | } | 540 | } |
541 | 541 | ||
542 | [Fact] | 542 | [RuntimeFact] |
543 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMajorUpdateMsiFifo() | 543 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMajorUpdateMsiFifo() |
544 | { | 544 | { |
545 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 545 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -611,7 +611,7 @@ namespace WixToolsetTest.BurnE2E | |||
611 | packageGv2.VerifyInstalled(false); | 611 | packageGv2.VerifyInstalled(false); |
612 | } | 612 | } |
613 | 613 | ||
614 | [Fact] | 614 | [RuntimeFact] |
615 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMajorUpdateMsiLifo() | 615 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMajorUpdateMsiLifo() |
616 | { | 616 | { |
617 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 617 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -683,7 +683,7 @@ namespace WixToolsetTest.BurnE2E | |||
683 | packageGv2.VerifyInstalled(false); | 683 | packageGv2.VerifyInstalled(false); |
684 | } | 684 | } |
685 | 685 | ||
686 | [Fact] | 686 | [RuntimeFact] |
687 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMinorUpdateMsiFifo() | 687 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMinorUpdateMsiFifo() |
688 | { | 688 | { |
689 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 689 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -756,7 +756,7 @@ namespace WixToolsetTest.BurnE2E | |||
756 | packageGv101.VerifyInstalledWithVersion(false); | 756 | packageGv101.VerifyInstalledWithVersion(false); |
757 | } | 757 | } |
758 | 758 | ||
759 | [Fact] | 759 | [RuntimeFact] |
760 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMinorUpdateMsiLifo() | 760 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMinorUpdateMsiLifo() |
761 | { | 761 | { |
762 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 762 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -829,7 +829,7 @@ namespace WixToolsetTest.BurnE2E | |||
829 | packageGv101.VerifyInstalledWithVersion(false); | 829 | packageGv101.VerifyInstalledWithVersion(false); |
830 | } | 830 | } |
831 | 831 | ||
832 | [Fact] | 832 | [RuntimeFact] |
833 | public void DoesntRegisterDependencyOnPackageNotSelectedForInstall() | 833 | public void DoesntRegisterDependencyOnPackageNotSelectedForInstall() |
834 | { | 834 | { |
835 | var testRegistryValueExe = "ExeA"; | 835 | var testRegistryValueExe = "ExeA"; |
@@ -878,7 +878,7 @@ namespace WixToolsetTest.BurnE2E | |||
878 | packageB.VerifyInstalled(false); | 878 | packageB.VerifyInstalled(false); |
879 | } | 879 | } |
880 | 880 | ||
881 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3516")] | 881 | [RuntimeFact(Skip = "https://github.com/wixtoolset/issues/issues/3516")] |
882 | public void DoesntRollbackPackageInstallIfPreexistingDependents() | 882 | public void DoesntRollbackPackageInstallIfPreexistingDependents() |
883 | { | 883 | { |
884 | var packageA = this.CreatePackageInstaller("PackageAv1"); | 884 | var packageA = this.CreatePackageInstaller("PackageAv1"); |
@@ -918,7 +918,7 @@ namespace WixToolsetTest.BurnE2E | |||
918 | packageC.VerifyInstalled(false); | 918 | packageC.VerifyInstalled(false); |
919 | } | 919 | } |
920 | 920 | ||
921 | [Fact] | 921 | [RuntimeFact] |
922 | public void RegistersDependencyOnFailedNonVitalPackages() | 922 | public void RegistersDependencyOnFailedNonVitalPackages() |
923 | { | 923 | { |
924 | var packageA = this.CreatePackageInstaller("PackageAv1"); | 924 | var packageA = this.CreatePackageInstaller("PackageAv1"); |
@@ -969,7 +969,7 @@ namespace WixToolsetTest.BurnE2E | |||
969 | packageC.VerifyInstalled(false); | 969 | packageC.VerifyInstalled(false); |
970 | } | 970 | } |
971 | 971 | ||
972 | [Fact] | 972 | [RuntimeFact] |
973 | public void RemovesDependencyDuringUpgradeRollback() | 973 | public void RemovesDependencyDuringUpgradeRollback() |
974 | { | 974 | { |
975 | var testRegistryValueExe = "ExeA"; | 975 | var testRegistryValueExe = "ExeA"; |
@@ -1001,7 +1001,7 @@ namespace WixToolsetTest.BurnE2E | |||
1001 | bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); | 1001 | bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe); |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | [Fact] | 1004 | [RuntimeFact] |
1005 | public void RemovesDependencyProviderFromUpgradedPackageDuringUninstall() | 1005 | public void RemovesDependencyProviderFromUpgradedPackageDuringUninstall() |
1006 | { | 1006 | { |
1007 | var packageC = this.CreatePackageInstaller("PackageC"); | 1007 | var packageC = this.CreatePackageInstaller("PackageC"); |
@@ -1044,7 +1044,7 @@ namespace WixToolsetTest.BurnE2E | |||
1044 | bundleNv1.VerifyPackageProviderRemoved("PackageG"); | 1044 | bundleNv1.VerifyPackageProviderRemoved("PackageG"); |
1045 | } | 1045 | } |
1046 | 1046 | ||
1047 | [Fact] | 1047 | [RuntimeFact] |
1048 | public void SkipsCrossScopeDependencyRegistration() | 1048 | public void SkipsCrossScopeDependencyRegistration() |
1049 | { | 1049 | { |
1050 | var packageA = this.CreatePackageInstaller("PackageAv1"); | 1050 | var packageA = this.CreatePackageInstaller("PackageAv1"); |
@@ -1087,7 +1087,7 @@ namespace WixToolsetTest.BurnE2E | |||
1087 | packageA.VerifyInstalled(false); | 1087 | packageA.VerifyInstalled(false); |
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | [Fact] | 1090 | [RuntimeFact] |
1091 | public void CannotInstallWhenDependencyUnsatisfied() | 1091 | public void CannotInstallWhenDependencyUnsatisfied() |
1092 | { | 1092 | { |
1093 | var packageA = this.CreatePackageInstaller("PackageAv1"); | 1093 | var packageA = this.CreatePackageInstaller("PackageAv1"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ElevationTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ElevationTests.cs index 54a89469..8f141e5d 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/ElevationTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/ElevationTests.cs | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | namespace WixToolsetTest.BurnE2E | 3 | namespace WixToolsetTest.BurnE2E |
4 | { | 4 | { |
5 | using Xunit; | 5 | using WixTestTools; |
6 | using Xunit.Abstractions; | 6 | using Xunit.Abstractions; |
7 | 7 | ||
8 | public class ElevationTests : BurnE2ETests | 8 | public class ElevationTests : BurnE2ETests |
@@ -13,7 +13,7 @@ namespace WixToolsetTest.BurnE2E | |||
13 | /// This test calls Elevate after Detect, and then calls Plan in OnElevateBegin. | 13 | /// This test calls Elevate after Detect, and then calls Plan in OnElevateBegin. |
14 | /// After calling Plan, it pumps some messages to simulate UI like the UAC callback. | 14 | /// After calling Plan, it pumps some messages to simulate UI like the UAC callback. |
15 | /// </summary> | 15 | /// </summary> |
16 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6349")] // CAUTION: this test currently hangs because the Plan request gets dropped. | 16 | [RuntimeFact(Skip = "https://github.com/wixtoolset/issues/issues/6349")] // CAUTION: this test currently hangs because the Plan request gets dropped. |
17 | public void CanExplicitlyElevateAndPlanFromOnElevateBegin() | 17 | public void CanExplicitlyElevateAndPlanFromOnElevateBegin() |
18 | { | 18 | { |
19 | var packageA = this.CreatePackageInstaller("PackageA"); | 19 | var packageA = this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs index b50be49a..cb758131 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs | |||
@@ -12,7 +12,7 @@ namespace WixToolsetTest.BurnE2E | |||
12 | { | 12 | { |
13 | public FailureTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 13 | public FailureTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
14 | 14 | ||
15 | [Fact] | 15 | [RuntimeFact] |
16 | public void CanCancelExePackageAndAbandonIt() | 16 | public void CanCancelExePackageAndAbandonIt() |
17 | { | 17 | { |
18 | var bundleD = this.CreateBundleInstaller("BundleD"); | 18 | var bundleD = this.CreateBundleInstaller("BundleD"); |
@@ -29,7 +29,7 @@ namespace WixToolsetTest.BurnE2E | |||
29 | Assert.False(LogVerifier.MessageInLogFile(logPath, "TestRegistryValue: Rollback, ExeA, Version")); | 29 | Assert.False(LogVerifier.MessageInLogFile(logPath, "TestRegistryValue: Rollback, ExeA, Version")); |
30 | } | 30 | } |
31 | 31 | ||
32 | [Fact] | 32 | [RuntimeFact] |
33 | public void CanCancelExePackageAndWaitUntilItCompletes() | 33 | public void CanCancelExePackageAndWaitUntilItCompletes() |
34 | { | 34 | { |
35 | var bundleD = this.CreateBundleInstaller("BundleD"); | 35 | var bundleD = this.CreateBundleInstaller("BundleD"); |
@@ -50,7 +50,7 @@ namespace WixToolsetTest.BurnE2E | |||
50 | bundleD.VerifyExeTestRegistryRootDeleted("ExeA"); | 50 | bundleD.VerifyExeTestRegistryRootDeleted("ExeA"); |
51 | } | 51 | } |
52 | 52 | ||
53 | [Fact] | 53 | [RuntimeFact] |
54 | public void CanCancelMsiPackageVeryEarly() | 54 | public void CanCancelMsiPackageVeryEarly() |
55 | { | 55 | { |
56 | var packageA = this.CreatePackageInstaller("PackageA"); | 56 | var packageA = this.CreatePackageInstaller("PackageA"); |
@@ -68,7 +68,7 @@ namespace WixToolsetTest.BurnE2E | |||
68 | packageB.VerifyInstalled(false); | 68 | packageB.VerifyInstalled(false); |
69 | } | 69 | } |
70 | 70 | ||
71 | [Fact] | 71 | [RuntimeFact] |
72 | public void CanCancelMsiPackageVeryLate() | 72 | public void CanCancelMsiPackageVeryLate() |
73 | { | 73 | { |
74 | var packageA = this.CreatePackageInstaller("PackageA"); | 74 | var packageA = this.CreatePackageInstaller("PackageA"); |
@@ -86,7 +86,7 @@ namespace WixToolsetTest.BurnE2E | |||
86 | packageB.VerifyInstalled(false); | 86 | packageB.VerifyInstalled(false); |
87 | } | 87 | } |
88 | 88 | ||
89 | [Fact] | 89 | [RuntimeFact] |
90 | public void CanCancelMsiPackageInOnProgress() | 90 | public void CanCancelMsiPackageInOnProgress() |
91 | { | 91 | { |
92 | var packageA = this.CreatePackageInstaller("PackageA"); | 92 | var packageA = this.CreatePackageInstaller("PackageA"); |
@@ -104,7 +104,7 @@ namespace WixToolsetTest.BurnE2E | |||
104 | packageB.VerifyInstalled(false); | 104 | packageB.VerifyInstalled(false); |
105 | } | 105 | } |
106 | 106 | ||
107 | [Fact] | 107 | [RuntimeFact] |
108 | public void CanCancelExecuteWhileCaching() | 108 | public void CanCancelExecuteWhileCaching() |
109 | { | 109 | { |
110 | var packageA = this.CreatePackageInstaller("PackageA"); | 110 | var packageA = this.CreatePackageInstaller("PackageA"); |
@@ -128,7 +128,7 @@ namespace WixToolsetTest.BurnE2E | |||
128 | /// PackageA is not compressed in the bundle and has a Name different from the source file. The Name points to a file that does not exist. | 128 | /// PackageA is not compressed in the bundle and has a Name different from the source file. The Name points to a file that does not exist. |
129 | /// BundleC should be able to install successfully by ignoring the missing PackageA and installing PackageB. | 129 | /// BundleC should be able to install successfully by ignoring the missing PackageA and installing PackageB. |
130 | /// </summary> | 130 | /// </summary> |
131 | [Fact] | 131 | [RuntimeFact] |
132 | public void CanInstallWhenMissingNonVitalPackage() | 132 | public void CanInstallWhenMissingNonVitalPackage() |
133 | { | 133 | { |
134 | var packageA = this.CreatePackageInstaller("PackageA"); | 134 | var packageA = this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/FilesInUseTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/FilesInUseTests.cs index 6ad68d22..042175f0 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/FilesInUseTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/FilesInUseTests.cs | |||
@@ -4,14 +4,13 @@ namespace WixToolsetTest.BurnE2E | |||
4 | { | 4 | { |
5 | using System.IO; | 5 | using System.IO; |
6 | using WixTestTools; | 6 | using WixTestTools; |
7 | using Xunit; | ||
8 | using Xunit.Abstractions; | 7 | using Xunit.Abstractions; |
9 | 8 | ||
10 | public class FilesInUseTests : BurnE2ETests | 9 | public class FilesInUseTests : BurnE2ETests |
11 | { | 10 | { |
12 | public FilesInUseTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 11 | public FilesInUseTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
13 | 12 | ||
14 | [Fact] | 13 | [RuntimeFact] |
15 | public void CanCancelInstallAfterRetryingLockedFile() | 14 | public void CanCancelInstallAfterRetryingLockedFile() |
16 | { | 15 | { |
17 | var packageA = this.CreatePackageInstaller("PackageA"); | 16 | var packageA = this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs index 357cf515..45c6c67d 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/ForwardCompatibleBundleTests.cs | |||
@@ -17,7 +17,7 @@ namespace WixToolsetTest.BurnE2E | |||
17 | private const string V100 = "1.0.0.0"; | 17 | private const string V100 = "1.0.0.0"; |
18 | private const string V200 = "2.0.0.0"; | 18 | private const string V200 = "2.0.0.0"; |
19 | 19 | ||
20 | [Fact] | 20 | [RuntimeFact] |
21 | public void CanIgnoreBundleDependentForUnsafeUninstall() | 21 | public void CanIgnoreBundleDependentForUnsafeUninstall() |
22 | { | 22 | { |
23 | string providerId = BundleAProviderId; | 23 | string providerId = BundleAProviderId; |
@@ -49,7 +49,7 @@ namespace WixToolsetTest.BurnE2E | |||
49 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); | 49 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); |
50 | } | 50 | } |
51 | 51 | ||
52 | [Fact] | 52 | [RuntimeFact] |
53 | public void CanTrack1ForwardCompatibleDependentThroughMajorUpgrade() | 53 | public void CanTrack1ForwardCompatibleDependentThroughMajorUpgrade() |
54 | { | 54 | { |
55 | string providerId = BundleAProviderId; | 55 | string providerId = BundleAProviderId; |
@@ -105,7 +105,7 @@ namespace WixToolsetTest.BurnE2E | |||
105 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); | 105 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); |
106 | } | 106 | } |
107 | 107 | ||
108 | [Fact] | 108 | [RuntimeFact] |
109 | public void CanTrack1ForwardCompatibleDependentThroughMajorUpgradeWithParentNone() | 109 | public void CanTrack1ForwardCompatibleDependentThroughMajorUpgradeWithParentNone() |
110 | { | 110 | { |
111 | string providerId = BundleAProviderId; | 111 | string providerId = BundleAProviderId; |
@@ -151,7 +151,7 @@ namespace WixToolsetTest.BurnE2E | |||
151 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); | 151 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); |
152 | } | 152 | } |
153 | 153 | ||
154 | [Fact] | 154 | [RuntimeFact] |
155 | public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgrade() | 155 | public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgrade() |
156 | { | 156 | { |
157 | string providerId = BundleAProviderId; | 157 | string providerId = BundleAProviderId; |
@@ -233,7 +233,7 @@ namespace WixToolsetTest.BurnE2E | |||
233 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); | 233 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); |
234 | } | 234 | } |
235 | 235 | ||
236 | [Fact] | 236 | [RuntimeFact] |
237 | public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradePerUser() | 237 | public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradePerUser() |
238 | { | 238 | { |
239 | string providerId = BundleCProviderId; | 239 | string providerId = BundleCProviderId; |
@@ -315,7 +315,7 @@ namespace WixToolsetTest.BurnE2E | |||
315 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); | 315 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); |
316 | } | 316 | } |
317 | 317 | ||
318 | [Fact] | 318 | [RuntimeFact] |
319 | public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradeWithParent() | 319 | public void CanTrack2ForwardCompatibleDependentsThroughMajorUpgradeWithParent() |
320 | { | 320 | { |
321 | string providerId = BundleAProviderId; | 321 | string providerId = BundleAProviderId; |
@@ -401,7 +401,7 @@ namespace WixToolsetTest.BurnE2E | |||
401 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); | 401 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); |
402 | } | 402 | } |
403 | 403 | ||
404 | [Fact] | 404 | [RuntimeFact] |
405 | public void CanUninstallForwardCompatibleWithBundlesUninstalledInFifoOrder() | 405 | public void CanUninstallForwardCompatibleWithBundlesUninstalledInFifoOrder() |
406 | { | 406 | { |
407 | string providerId = BundleAProviderId; | 407 | string providerId = BundleAProviderId; |
@@ -449,7 +449,7 @@ namespace WixToolsetTest.BurnE2E | |||
449 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); | 449 | Assert.False(BundleRegistration.TryGetDependencyProviderValue(providerId, "Version", out _)); |
450 | } | 450 | } |
451 | 451 | ||
452 | [Fact] | 452 | [RuntimeFact] |
453 | public void CanUninstallForwardCompatibleWithBundlesUninstalledInReverseOrder() | 453 | public void CanUninstallForwardCompatibleWithBundlesUninstalledInReverseOrder() |
454 | { | 454 | { |
455 | string providerId = BundleAProviderId; | 455 | string providerId = BundleAProviderId; |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/LayoutTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/LayoutTests.cs index 1e36e2a5..47a42750 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/LayoutTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/LayoutTests.cs | |||
@@ -5,6 +5,7 @@ namespace WixToolsetTest.BurnE2E | |||
5 | using System.Collections.Generic; | 5 | using System.Collections.Generic; |
6 | using System.IO; | 6 | using System.IO; |
7 | using WixBuildTools.TestSupport; | 7 | using WixBuildTools.TestSupport; |
8 | using WixTestTools; | ||
8 | using Xunit; | 9 | using Xunit; |
9 | using Xunit.Abstractions; | 10 | using Xunit.Abstractions; |
10 | 11 | ||
@@ -12,7 +13,7 @@ namespace WixToolsetTest.BurnE2E | |||
12 | { | 13 | { |
13 | public LayoutTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 14 | public LayoutTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
14 | 15 | ||
15 | [Fact] | 16 | [RuntimeFact] |
16 | public void CanLayoutBundleInPlaceWithMissingPayloads() | 17 | public void CanLayoutBundleInPlaceWithMissingPayloads() |
17 | { | 18 | { |
18 | var bundleA = this.CreateBundleInstaller("BundleA"); | 19 | var bundleA = this.CreateBundleInstaller("BundleA"); |
@@ -41,7 +42,7 @@ namespace WixToolsetTest.BurnE2E | |||
41 | Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.wxs"))); | 42 | Assert.True(File.Exists(Path.Combine(layoutDirectory, "BundleA.wxs"))); |
42 | } | 43 | } |
43 | 44 | ||
44 | [Fact] | 45 | [RuntimeFact] |
45 | public void CanLayoutBundleToNewDirectory() | 46 | public void CanLayoutBundleToNewDirectory() |
46 | { | 47 | { |
47 | var bundleA = this.CreateBundleInstaller("BundleA"); | 48 | var bundleA = this.CreateBundleInstaller("BundleA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/MsiTransactionTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/MsiTransactionTests.cs index cbfee806..d86ba3c3 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/MsiTransactionTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/MsiTransactionTests.cs | |||
@@ -12,7 +12,7 @@ namespace WixToolsetTest.BurnE2E | |||
12 | { | 12 | { |
13 | public MsiTransactionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 13 | public MsiTransactionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
14 | 14 | ||
15 | [Fact] | 15 | [RuntimeFact] |
16 | public void CanUpgradeBundleWithMsiTransaction() | 16 | public void CanUpgradeBundleWithMsiTransaction() |
17 | { | 17 | { |
18 | var packageA = this.CreatePackageInstaller("PackageA"); | 18 | var packageA = this.CreatePackageInstaller("PackageA"); |
@@ -82,7 +82,7 @@ namespace WixToolsetTest.BurnE2E | |||
82 | /// package F fails | 82 | /// package F fails |
83 | /// Thus, rolling back the transaction should reinstall package Bv1 | 83 | /// Thus, rolling back the transaction should reinstall package Bv1 |
84 | /// </summary> | 84 | /// </summary> |
85 | [Fact] | 85 | [RuntimeFact] |
86 | public void CanRelyOnMsiTransactionRollback() | 86 | public void CanRelyOnMsiTransactionRollback() |
87 | { | 87 | { |
88 | var packageA = this.CreatePackageInstaller("PackageA"); | 88 | var packageA = this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/PatchTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/PatchTests.cs index 6b829118..b63be5f5 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/PatchTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/PatchTests.cs | |||
@@ -5,6 +5,7 @@ namespace WixToolsetTest.BurnE2E | |||
5 | using System; | 5 | using System; |
6 | using System.IO; | 6 | using System.IO; |
7 | using System.Xml; | 7 | using System.Xml; |
8 | using WixTestTools; | ||
8 | using Xunit; | 9 | using Xunit; |
9 | using Xunit.Abstractions; | 10 | using Xunit.Abstractions; |
10 | 11 | ||
@@ -12,7 +13,7 @@ namespace WixToolsetTest.BurnE2E | |||
12 | { | 13 | { |
13 | public PatchTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 14 | public PatchTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
14 | 15 | ||
15 | [Fact] | 16 | [RuntimeFact] |
16 | public void CanRunDetectMultipleTimesWithPatches() | 17 | public void CanRunDetectMultipleTimesWithPatches() |
17 | { | 18 | { |
18 | var testBAController = this.CreateTestBAController(); | 19 | var testBAController = this.CreateTestBAController(); |
@@ -21,7 +22,7 @@ namespace WixToolsetTest.BurnE2E | |||
21 | this.CanInstallBundleWithPatchThenRemoveIt(); | 22 | this.CanInstallBundleWithPatchThenRemoveIt(); |
22 | } | 23 | } |
23 | 24 | ||
24 | [Fact] | 25 | [RuntimeFact] |
25 | public void CanInstallBundleWithPatchThenRemoveIt() | 26 | public void CanInstallBundleWithPatchThenRemoveIt() |
26 | { | 27 | { |
27 | var originalVersion = "1.0.0.0"; | 28 | var originalVersion = "1.0.0.0"; |
@@ -55,7 +56,7 @@ namespace WixToolsetTest.BurnE2E | |||
55 | packageAv1.VerifyTestRegistryRootDeleted(); | 56 | packageAv1.VerifyTestRegistryRootDeleted(); |
56 | } | 57 | } |
57 | 58 | ||
58 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6675")] | 59 | [RuntimeFact(Skip = "https://github.com/wixtoolset/issues/issues/6675")] |
59 | public void CanPatchSwidTag() | 60 | public void CanPatchSwidTag() |
60 | { | 61 | { |
61 | var originalVersion = "1.0.0.0"; | 62 | var originalVersion = "1.0.0.0"; |
@@ -84,7 +85,7 @@ namespace WixToolsetTest.BurnE2E | |||
84 | VerifySwidTagVersion(packageTagName, null); | 85 | VerifySwidTagVersion(packageTagName, null); |
85 | } | 86 | } |
86 | 87 | ||
87 | [Fact] | 88 | [RuntimeFact] |
88 | public void CanInstallBundleWithPatchesTargetingSingleProductThenRemoveIt() | 89 | public void CanInstallBundleWithPatchesTargetingSingleProductThenRemoveIt() |
89 | { | 90 | { |
90 | var originalVersion = "1.0.0.0"; | 91 | var originalVersion = "1.0.0.0"; |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/PrereqBaTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/PrereqBaTests.cs index ced2e08e..ec828f89 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/PrereqBaTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/PrereqBaTests.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 WixTestTools; | ||
7 | using Xunit; | 8 | using Xunit; |
8 | using Xunit.Abstractions; | 9 | using Xunit.Abstractions; |
9 | 10 | ||
@@ -18,7 +19,7 @@ namespace WixToolsetTest.BurnE2E | |||
18 | /// The preqba doesn't infinitely reload itself after failing to load the managed BA. | 19 | /// The preqba doesn't infinitely reload itself after failing to load the managed BA. |
19 | /// The engine automatically uninstalls the bundle since only permanent packages were installed. | 20 | /// The engine automatically uninstalls the bundle since only permanent packages were installed. |
20 | /// </summary> | 21 | /// </summary> |
21 | [Fact] | 22 | [RuntimeFact] |
22 | public void DncPreqBaDetectsInfiniteLoop() | 23 | public void DncPreqBaDetectsInfiniteLoop() |
23 | { | 24 | { |
24 | var packageA = this.CreatePackageInstaller("PackageA"); | 25 | var packageA = this.CreatePackageInstaller("PackageA"); |
@@ -49,7 +50,7 @@ namespace WixToolsetTest.BurnE2E | |||
49 | /// The preqba doesn't infinitely reload itself after failing to load the managed BA. | 50 | /// The preqba doesn't infinitely reload itself after failing to load the managed BA. |
50 | /// The engine automatically uninstalls the bundle since only permanent packages were installed. | 51 | /// The engine automatically uninstalls the bundle since only permanent packages were installed. |
51 | /// </summary> | 52 | /// </summary> |
52 | [Fact] | 53 | [RuntimeFact] |
53 | public void MbaPreqBaDetectsInfiniteLoop() | 54 | public void MbaPreqBaDetectsInfiniteLoop() |
54 | { | 55 | { |
55 | var packageB = this.CreatePackageInstaller("PackageB"); | 56 | var packageB = this.CreatePackageInstaller("PackageB"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs index 01ffa942..b45ec83a 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs | |||
@@ -3,6 +3,7 @@ | |||
3 | namespace WixToolsetTest.BurnE2E | 3 | namespace WixToolsetTest.BurnE2E |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using WixTestTools; | ||
6 | using WixToolset.Mba.Core; | 7 | using WixToolset.Mba.Core; |
7 | using Xunit; | 8 | using Xunit; |
8 | using Xunit.Abstractions; | 9 | using Xunit.Abstractions; |
@@ -11,7 +12,7 @@ namespace WixToolsetTest.BurnE2E | |||
11 | { | 12 | { |
12 | public RegistrationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 13 | public RegistrationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
13 | 14 | ||
14 | [Fact] | 15 | [RuntimeFact] |
15 | public void AllowsBAToKeepRegistration() | 16 | public void AllowsBAToKeepRegistration() |
16 | { | 17 | { |
17 | this.CreatePackageInstaller("PackageA"); | 18 | this.CreatePackageInstaller("PackageA"); |
@@ -37,7 +38,7 @@ namespace WixToolsetTest.BurnE2E | |||
37 | Assert.InRange(finalRegistration.EstimatedSize.Value, initialRegistration.EstimatedSize.Value + 1, Int32.MaxValue); | 38 | Assert.InRange(finalRegistration.EstimatedSize.Value, initialRegistration.EstimatedSize.Value + 1, Int32.MaxValue); |
38 | } | 39 | } |
39 | 40 | ||
40 | [Fact] | 41 | [RuntimeFact] |
41 | public void AutomaticallyUncachesBundleWhenNotInstalled() | 42 | public void AutomaticallyUncachesBundleWhenNotInstalled() |
42 | { | 43 | { |
43 | this.CreatePackageInstaller("PackageA"); | 44 | this.CreatePackageInstaller("PackageA"); |
@@ -53,19 +54,19 @@ namespace WixToolsetTest.BurnE2E | |||
53 | bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); | 54 | bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); |
54 | } | 55 | } |
55 | 56 | ||
56 | [Fact] | 57 | [RuntimeFact] |
57 | public void AutomaticallyUninstallsBundleWithoutBADoingApply() | 58 | public void AutomaticallyUninstallsBundleWithoutBADoingApply() |
58 | { | 59 | { |
59 | this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(true); | 60 | this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(true); |
60 | } | 61 | } |
61 | 62 | ||
62 | [Fact] | 63 | [RuntimeFact] |
63 | public void AutomaticallyUninstallsBundleWithoutBADoingDetect() | 64 | public void AutomaticallyUninstallsBundleWithoutBADoingDetect() |
64 | { | 65 | { |
65 | this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(false); | 66 | this.InstallBundleThenManuallyUninstallPackageAndRemovePackageFromCacheThenRunAndQuitWithoutApply(false); |
66 | } | 67 | } |
67 | 68 | ||
68 | [Fact] | 69 | [RuntimeFact] |
69 | public void RegistersInARPIfPrecached() | 70 | public void RegistersInARPIfPrecached() |
70 | { | 71 | { |
71 | this.CreatePackageInstaller("PackageA"); | 72 | this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs index effe4418..e04744b0 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.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 WixTestTools; | ||
7 | using Xunit; | 8 | using Xunit; |
8 | using Xunit.Abstractions; | 9 | using Xunit.Abstractions; |
9 | 10 | ||
@@ -22,7 +23,7 @@ namespace WixToolsetTest.BurnE2E | |||
22 | /// install package B | 23 | /// install package B |
23 | /// unregister since no non-permanent packages should be installed or cached. | 24 | /// unregister since no non-permanent packages should be installed or cached. |
24 | /// </summary> | 25 | /// </summary> |
25 | [Fact] | 26 | [RuntimeFact] |
26 | public void NonVitalRollbackBoundarySkipsToNextRollbackBoundary() | 27 | public void NonVitalRollbackBoundarySkipsToNextRollbackBoundary() |
27 | { | 28 | { |
28 | var packageA = this.CreatePackageInstaller("PackageA"); | 29 | var packageA = this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs index f6744e8d..9ef100ce 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs | |||
@@ -17,7 +17,7 @@ namespace WixToolsetTest.BurnE2E | |||
17 | private const string V100 = "1.0.0.0"; | 17 | private const string V100 = "1.0.0.0"; |
18 | private const string V101 = "1.0.1.0"; | 18 | private const string V101 = "1.0.1.0"; |
19 | 19 | ||
20 | [Fact] | 20 | [RuntimeFact] |
21 | public void CanInstallBundleWithSlipstreamedPatchThenRemoveIt() | 21 | public void CanInstallBundleWithSlipstreamedPatchThenRemoveIt() |
22 | { | 22 | { |
23 | var testRegistryValue = "PackageA"; | 23 | var testRegistryValue = "PackageA"; |
@@ -45,7 +45,7 @@ namespace WixToolsetTest.BurnE2E | |||
45 | /// BundleOnlyPatchA in uninstalled which should do nothing since BundleA has a dependency on it. | 45 | /// BundleOnlyPatchA in uninstalled which should do nothing since BundleA has a dependency on it. |
46 | /// Bundle is installed which should remove everything. | 46 | /// Bundle is installed which should remove everything. |
47 | /// </summary> | 47 | /// </summary> |
48 | [Fact] | 48 | [RuntimeFact] |
49 | public void ReferenceCountsSlipstreamedPatch() | 49 | public void ReferenceCountsSlipstreamedPatch() |
50 | { | 50 | { |
51 | var testRegistryValue = "PackageA"; | 51 | var testRegistryValue = "PackageA"; |
@@ -78,13 +78,13 @@ namespace WixToolsetTest.BurnE2E | |||
78 | packageAv1.VerifyTestRegistryRootDeleted(); | 78 | packageAv1.VerifyTestRegistryRootDeleted(); |
79 | } | 79 | } |
80 | 80 | ||
81 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] | 81 | [RuntimeFact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] |
82 | public void CanInstallBundleWithSlipstreamedPatchThenRepairIt() | 82 | public void CanInstallBundleWithSlipstreamedPatchThenRepairIt() |
83 | { | 83 | { |
84 | this.InstallBundleWithSlipstreamedPatchThenRepairIt(false); | 84 | this.InstallBundleWithSlipstreamedPatchThenRepairIt(false); |
85 | } | 85 | } |
86 | 86 | ||
87 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] | 87 | [RuntimeFact(Skip = "https://github.com/wixtoolset/issues/issues/6350")] |
88 | public void CanInstallReversedBundleWithSlipstreamedPatchThenRepairIt() | 88 | public void CanInstallReversedBundleWithSlipstreamedPatchThenRepairIt() |
89 | { | 89 | { |
90 | this.InstallBundleWithSlipstreamedPatchThenRepairIt(true); | 90 | this.InstallBundleWithSlipstreamedPatchThenRepairIt(true); |
@@ -121,13 +121,13 @@ namespace WixToolsetTest.BurnE2E | |||
121 | packageAv1.VerifyTestRegistryRootDeleted(); | 121 | packageAv1.VerifyTestRegistryRootDeleted(); |
122 | } | 122 | } |
123 | 123 | ||
124 | [Fact] | 124 | [RuntimeFact] |
125 | public void CanInstallSlipstreamedPatchThroughForcedRepair() | 125 | public void CanInstallSlipstreamedPatchThroughForcedRepair() |
126 | { | 126 | { |
127 | this.InstallSlipstreamedPatchThroughForcedRepair(false); | 127 | this.InstallSlipstreamedPatchThroughForcedRepair(false); |
128 | } | 128 | } |
129 | 129 | ||
130 | [Fact] | 130 | [RuntimeFact] |
131 | public void CanInstallSlipstreamedPatchThroughReversedForcedRepair() | 131 | public void CanInstallSlipstreamedPatchThroughReversedForcedRepair() |
132 | { | 132 | { |
133 | this.InstallSlipstreamedPatchThroughForcedRepair(true); | 133 | this.InstallSlipstreamedPatchThroughForcedRepair(true); |
@@ -177,7 +177,7 @@ namespace WixToolsetTest.BurnE2E | |||
177 | packageAv1.VerifyTestRegistryRootDeleted(); | 177 | packageAv1.VerifyTestRegistryRootDeleted(); |
178 | } | 178 | } |
179 | 179 | ||
180 | [Fact] | 180 | [RuntimeFact] |
181 | public void CanUninstallSlipstreamedPatchAlone() | 181 | public void CanUninstallSlipstreamedPatchAlone() |
182 | { | 182 | { |
183 | var testRegistryValue = "PackageA"; | 183 | var testRegistryValue = "PackageA"; |
@@ -207,7 +207,7 @@ namespace WixToolsetTest.BurnE2E | |||
207 | packageAv1.VerifyTestRegistryRootDeleted(); | 207 | packageAv1.VerifyTestRegistryRootDeleted(); |
208 | } | 208 | } |
209 | 209 | ||
210 | [Fact] | 210 | [RuntimeFact] |
211 | public void CanModifyToUninstallPackageWithSlipstreamedPatch() | 211 | public void CanModifyToUninstallPackageWithSlipstreamedPatch() |
212 | { | 212 | { |
213 | var testRegistryValue = "PackageA"; | 213 | var testRegistryValue = "PackageA"; |
@@ -244,7 +244,7 @@ namespace WixToolsetTest.BurnE2E | |||
244 | packageBv1.VerifyTestRegistryRootDeleted(); | 244 | packageBv1.VerifyTestRegistryRootDeleted(); |
245 | } | 245 | } |
246 | 246 | ||
247 | [Fact] | 247 | [RuntimeFact] |
248 | public void UninstallsPackageWithSlipstreamedPatchDuringRollback() | 248 | public void UninstallsPackageWithSlipstreamedPatchDuringRollback() |
249 | { | 249 | { |
250 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 250 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -266,7 +266,7 @@ namespace WixToolsetTest.BurnE2E | |||
266 | packageBv1.VerifyTestRegistryRootDeleted(); | 266 | packageBv1.VerifyTestRegistryRootDeleted(); |
267 | } | 267 | } |
268 | 268 | ||
269 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6402")] | 269 | [RuntimeFact(Skip = "https://github.com/wixtoolset/issues/issues/6402")] |
270 | public void CanAutomaticallyPredetermineSlipstreamPatchesAtBuildTime() | 270 | public void CanAutomaticallyPredetermineSlipstreamPatchesAtBuildTime() |
271 | { | 271 | { |
272 | var testRegistryValueA = "PackageA"; | 272 | var testRegistryValueA = "PackageA"; |
@@ -300,7 +300,7 @@ namespace WixToolsetTest.BurnE2E | |||
300 | packageAv1.VerifyTestRegistryRootDeleted(); | 300 | packageAv1.VerifyTestRegistryRootDeleted(); |
301 | } | 301 | } |
302 | 302 | ||
303 | [Fact] | 303 | [RuntimeFact] |
304 | public void CanInstallSlipstreamedPatchWithPackageDuringMajorUpgrade() | 304 | public void CanInstallSlipstreamedPatchWithPackageDuringMajorUpgrade() |
305 | { | 305 | { |
306 | var testRegistryValue = "PackageA"; | 306 | var testRegistryValue = "PackageA"; |
@@ -327,7 +327,7 @@ namespace WixToolsetTest.BurnE2E | |||
327 | packageAv1.VerifyTestRegistryRootDeleted(); | 327 | packageAv1.VerifyTestRegistryRootDeleted(); |
328 | } | 328 | } |
329 | 329 | ||
330 | [Fact] | 330 | [RuntimeFact] |
331 | public void RespectsSlipstreamedPatchInstallCondition() | 331 | public void RespectsSlipstreamedPatchInstallCondition() |
332 | { | 332 | { |
333 | var testRegistryValue = "PackageA"; | 333 | var testRegistryValue = "PackageA"; |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs index 9fcd428b..df666833 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs | |||
@@ -6,6 +6,7 @@ namespace WixToolsetTest.BurnE2E | |||
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.Diagnostics; | 7 | using System.Diagnostics; |
8 | using System.IO; | 8 | using System.IO; |
9 | using WixTestTools; | ||
9 | using Xunit; | 10 | using Xunit; |
10 | using Xunit.Abstractions; | 11 | using Xunit.Abstractions; |
11 | 12 | ||
@@ -13,7 +14,7 @@ namespace WixToolsetTest.BurnE2E | |||
13 | { | 14 | { |
14 | public UpdateBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 15 | public UpdateBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
15 | 16 | ||
16 | [Fact] | 17 | [RuntimeFact] |
17 | public void CanLaunchUpdateBundleFromLocalSourceInsteadOfInstall() | 18 | public void CanLaunchUpdateBundleFromLocalSourceInsteadOfInstall() |
18 | { | 19 | { |
19 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 20 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -39,7 +40,7 @@ namespace WixToolsetTest.BurnE2E | |||
39 | packageAv2.VerifyInstalled(false); | 40 | packageAv2.VerifyInstalled(false); |
40 | } | 41 | } |
41 | 42 | ||
42 | [Fact] | 43 | [RuntimeFact] |
43 | public void CanLaunchUpdateBundleFromLocalSourceInsteadOfModify() | 44 | public void CanLaunchUpdateBundleFromLocalSourceInsteadOfModify() |
44 | { | 45 | { |
45 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 46 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -71,7 +72,7 @@ namespace WixToolsetTest.BurnE2E | |||
71 | packageAv2.VerifyInstalled(false); | 72 | packageAv2.VerifyInstalled(false); |
72 | } | 73 | } |
73 | 74 | ||
74 | [Fact] | 75 | [RuntimeFact] |
75 | public void ForwardsArgumentsToUpdateBundle() | 76 | public void ForwardsArgumentsToUpdateBundle() |
76 | { | 77 | { |
77 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 78 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -107,7 +108,7 @@ namespace WixToolsetTest.BurnE2E | |||
107 | } | 108 | } |
108 | 109 | ||
109 | // Installs bundle Bv1.0 then tries to update to latest version during modify (but no server exists). | 110 | // Installs bundle Bv1.0 then tries to update to latest version during modify (but no server exists). |
110 | [Fact] | 111 | [RuntimeFact] |
111 | public void CanCheckUpdateServerDuringModifyAndDoNothingWhenServerIsntResponsive() | 112 | public void CanCheckUpdateServerDuringModifyAndDoNothingWhenServerIsntResponsive() |
112 | { | 113 | { |
113 | var packageB = this.CreatePackageInstaller("PackageBv1"); | 114 | var packageB = this.CreatePackageInstaller("PackageBv1"); |
@@ -133,7 +134,7 @@ namespace WixToolsetTest.BurnE2E | |||
133 | } | 134 | } |
134 | 135 | ||
135 | // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, no feed). | 136 | // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, no feed). |
136 | [Fact] | 137 | [RuntimeFact] |
137 | public void CanCheckUpdateServerDuringModifyAndDoNothingWhenFeedIsMissing() | 138 | public void CanCheckUpdateServerDuringModifyAndDoNothingWhenFeedIsMissing() |
138 | { | 139 | { |
139 | var packageB = this.CreatePackageInstaller("PackageBv1"); | 140 | var packageB = this.CreatePackageInstaller("PackageBv1"); |
@@ -162,7 +163,7 @@ namespace WixToolsetTest.BurnE2E | |||
162 | } | 163 | } |
163 | 164 | ||
164 | // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, v1.0 feed). | 165 | // Installs bundle Bv1.0 then tries to update to latest version during modify (server exists, v1.0 feed). |
165 | [Fact] | 166 | [RuntimeFact] |
166 | public void CanCheckUpdateServerDuringModifyAndDoNothingWhenAlreadyLatestVersion() | 167 | public void CanCheckUpdateServerDuringModifyAndDoNothingWhenAlreadyLatestVersion() |
167 | { | 168 | { |
168 | var packageB = this.CreatePackageInstaller("PackageBv1"); | 169 | var packageB = this.CreatePackageInstaller("PackageBv1"); |
@@ -195,7 +196,7 @@ namespace WixToolsetTest.BurnE2E | |||
195 | } | 196 | } |
196 | 197 | ||
197 | // Installs bundle Bv1.0 then does an update to bundle Bv2.0 during modify (server exists, v2.0 feed). | 198 | // Installs bundle Bv1.0 then does an update to bundle Bv2.0 during modify (server exists, v2.0 feed). |
198 | [Fact] | 199 | [RuntimeFact] |
199 | public void CanLaunchUpdateBundleFromDownloadInsteadOfModify() | 200 | public void CanLaunchUpdateBundleFromDownloadInsteadOfModify() |
200 | { | 201 | { |
201 | var packageBv1 = this.CreatePackageInstaller("PackageBv1"); | 202 | var packageBv1 = this.CreatePackageInstaller("PackageBv1"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs index 32a04e5c..fbd26d73 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs | |||
@@ -12,7 +12,7 @@ namespace WixToolsetTest.BurnE2E | |||
12 | { | 12 | { |
13 | public UpgradeRelatedBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 13 | public UpgradeRelatedBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
14 | 14 | ||
15 | [Fact] | 15 | [RuntimeFact] |
16 | public void ReinstallsOlderBundleAfterFailure() | 16 | public void ReinstallsOlderBundleAfterFailure() |
17 | { | 17 | { |
18 | var packageAv2 = this.CreatePackageInstaller("PackageAv2"); | 18 | var packageAv2 = this.CreatePackageInstaller("PackageAv2"); |
@@ -39,7 +39,7 @@ namespace WixToolsetTest.BurnE2E | |||
39 | packageAv3.VerifyInstalled(false); | 39 | packageAv3.VerifyInstalled(false); |
40 | } | 40 | } |
41 | 41 | ||
42 | [Fact] | 42 | [RuntimeFact] |
43 | public void ReportsRelatedBundleMissingFromCache() | 43 | public void ReportsRelatedBundleMissingFromCache() |
44 | { | 44 | { |
45 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 45 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -60,7 +60,7 @@ namespace WixToolsetTest.BurnE2E | |||
60 | Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerMachine, version: 1\.0\.0\.0, cached: No")); | 60 | Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerMachine, version: 1\.0\.0\.0, cached: No")); |
61 | } | 61 | } |
62 | 62 | ||
63 | [Fact] | 63 | [RuntimeFact] |
64 | public void Bundle64UpgradesBundle32() | 64 | public void Bundle64UpgradesBundle32() |
65 | { | 65 | { |
66 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 66 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
@@ -79,7 +79,7 @@ namespace WixToolsetTest.BurnE2E | |||
79 | Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2x64InstallLogFilePath, @"Detected related package: \{[0-9A-Za-z\-]{36}\}, scope: PerMachine, version: 1.0.0.0, language: 1033 operation: MajorUpgrade")); | 79 | Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2x64InstallLogFilePath, @"Detected related package: \{[0-9A-Za-z\-]{36}\}, scope: PerMachine, version: 1.0.0.0, language: 1033 operation: MajorUpgrade")); |
80 | } | 80 | } |
81 | 81 | ||
82 | [Fact] | 82 | [RuntimeFact] |
83 | public void Bundle32UpgradesBundle64() | 83 | public void Bundle32UpgradesBundle64() |
84 | { | 84 | { |
85 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 85 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs index fcec1df2..16a5d648 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs | |||
@@ -14,7 +14,7 @@ namespace WixToolsetTest.BurnE2E | |||
14 | { | 14 | { |
15 | public VariableTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 15 | public VariableTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
16 | 16 | ||
17 | [Fact] | 17 | [RuntimeFact] |
18 | public void CanHideHiddenVariables() | 18 | public void CanHideHiddenVariables() |
19 | { | 19 | { |
20 | var packageA = this.CreatePackageInstaller("PackageA"); | 20 | var packageA = this.CreatePackageInstaller("PackageA"); |
@@ -32,7 +32,7 @@ namespace WixToolsetTest.BurnE2E | |||
32 | Assert.False(LogVerifier.MessageInLogFile(logFilePath, "supersecretkey")); | 32 | Assert.False(LogVerifier.MessageInLogFile(logFilePath, "supersecretkey")); |
33 | } | 33 | } |
34 | 34 | ||
35 | [Fact] | 35 | [RuntimeFact] |
36 | public void CanSupportCaseSensitiveVariables() | 36 | public void CanSupportCaseSensitiveVariables() |
37 | { | 37 | { |
38 | var packageA = this.CreatePackageInstaller("PackageA"); | 38 | var packageA = this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/WixStdBaTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/WixStdBaTests.cs index e3418cc1..fe05419f 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/WixStdBaTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/WixStdBaTests.cs | |||
@@ -3,14 +3,13 @@ | |||
3 | namespace WixToolsetTest.BurnE2E | 3 | namespace WixToolsetTest.BurnE2E |
4 | { | 4 | { |
5 | using WixTestTools; | 5 | using WixTestTools; |
6 | using Xunit; | ||
7 | using Xunit.Abstractions; | 6 | using Xunit.Abstractions; |
8 | 7 | ||
9 | public class WixStdBaTests : BurnE2ETests | 8 | public class WixStdBaTests : BurnE2ETests |
10 | { | 9 | { |
11 | public WixStdBaTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 10 | public WixStdBaTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
12 | 11 | ||
13 | [Fact] | 12 | [RuntimeFact] |
14 | public void ExitsWithErrorWhenDowngradingWithoutSuppression() | 13 | public void ExitsWithErrorWhenDowngradingWithoutSuppression() |
15 | { | 14 | { |
16 | var packageA = this.CreatePackageInstaller("PackageA"); | 15 | var packageA = this.CreatePackageInstaller("PackageA"); |
@@ -31,7 +30,7 @@ namespace WixToolsetTest.BurnE2E | |||
31 | packageA.VerifyInstalled(true); | 30 | packageA.VerifyInstalled(true); |
32 | } | 31 | } |
33 | 32 | ||
34 | [Fact] | 33 | [RuntimeFact] |
35 | public void ExitsWithoutErrorWhenDowngradingWithSuppression() | 34 | public void ExitsWithoutErrorWhenDowngradingWithSuppression() |
36 | { | 35 | { |
37 | var packageA = this.CreatePackageInstaller("PackageA"); | 36 | var packageA = this.CreatePackageInstaller("PackageA"); |
diff --git a/src/test/msi/WixToolsetTest.MsiE2E/MsiE2EFixture.cs b/src/test/msi/WixToolsetTest.MsiE2E/MsiE2EFixture.cs deleted file mode 100644 index a7646568..00000000 --- a/src/test/msi/WixToolsetTest.MsiE2E/MsiE2EFixture.cs +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
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.MsiE2E | ||
4 | { | ||
5 | using System; | ||
6 | using System.Security.Principal; | ||
7 | |||
8 | public class MsiE2EFixture | ||
9 | { | ||
10 | const string RequiredEnvironmentVariableName = "RuntimeTestsEnabled"; | ||
11 | |||
12 | public MsiE2EFixture() | ||
13 | { | ||
14 | using var identity = WindowsIdentity.GetCurrent(); | ||
15 | var principal = new WindowsPrincipal(identity); | ||
16 | if (!principal.IsInRole(WindowsBuiltInRole.Administrator)) | ||
17 | { | ||
18 | throw new InvalidOperationException("These tests must run elevated."); | ||
19 | } | ||
20 | |||
21 | var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); | ||
22 | if (!bool.TryParse(testsEnabledString, out var testsEnabled) || !testsEnabled) | ||
23 | { | ||
24 | throw new InvalidOperationException($"These tests affect machine state. Set the {RequiredEnvironmentVariableName} environment variable to true to accept the consequences."); | ||
25 | } | ||
26 | } | ||
27 | } | ||
28 | } | ||
diff --git a/src/test/msi/WixToolsetTest.MsiE2E/MsiE2ETests.cs b/src/test/msi/WixToolsetTest.MsiE2E/MsiE2ETests.cs index 22f2173b..ca7f15ed 100644 --- a/src/test/msi/WixToolsetTest.MsiE2E/MsiE2ETests.cs +++ b/src/test/msi/WixToolsetTest.MsiE2E/MsiE2ETests.cs | |||
@@ -38,7 +38,7 @@ namespace WixToolsetTest.MsiE2E | |||
38 | } | 38 | } |
39 | 39 | ||
40 | [CollectionDefinition("MsiE2E", DisableParallelization = true)] | 40 | [CollectionDefinition("MsiE2E", DisableParallelization = true)] |
41 | public class MsiE2ECollectionDefinition : ICollectionFixture<MsiE2EFixture> | 41 | public class MsiE2ECollectionDefinition |
42 | { | 42 | { |
43 | } | 43 | } |
44 | } | 44 | } |
diff --git a/src/test/msi/WixToolsetTest.MsiE2E/UtilExtensionUserTests.cs b/src/test/msi/WixToolsetTest.MsiE2E/UtilExtensionUserTests.cs index 21491858..fcdfde52 100644 --- a/src/test/msi/WixToolsetTest.MsiE2E/UtilExtensionUserTests.cs +++ b/src/test/msi/WixToolsetTest.MsiE2E/UtilExtensionUserTests.cs | |||
@@ -15,7 +15,7 @@ namespace WixToolsetTest.MsiE2E | |||
15 | const string TempUsername = "USERNAME"; | 15 | const string TempUsername = "USERNAME"; |
16 | 16 | ||
17 | // Verify that the users specified in the authoring are created as expected. | 17 | // Verify that the users specified in the authoring are created as expected. |
18 | [Fact] | 18 | [RuntimeFact] |
19 | public void CanInstallAndUninstallUsers() | 19 | public void CanInstallAndUninstallUsers() |
20 | { | 20 | { |
21 | var arguments = new string[] | 21 | var arguments = new string[] |
@@ -49,7 +49,7 @@ namespace WixToolsetTest.MsiE2E | |||
49 | } | 49 | } |
50 | 50 | ||
51 | // Verify the rollback action reverts all Users changes. | 51 | // Verify the rollback action reverts all Users changes. |
52 | [Fact] | 52 | [RuntimeFact] |
53 | public void CanRollbackUsers() | 53 | public void CanRollbackUsers() |
54 | { | 54 | { |
55 | var arguments = new string[] | 55 | var arguments = new string[] |
@@ -74,7 +74,7 @@ namespace WixToolsetTest.MsiE2E | |||
74 | } | 74 | } |
75 | 75 | ||
76 | // Verify that the users specified in the authoring are created as expected on repair. | 76 | // Verify that the users specified in the authoring are created as expected on repair. |
77 | [Fact(Skip = "Test demonstrates failure")] | 77 | [RuntimeFact(Skip = "Test demonstrates failure")] |
78 | public void CanRepairUsers() | 78 | public void CanRepairUsers() |
79 | { | 79 | { |
80 | var arguments = new string[] | 80 | var arguments = new string[] |
@@ -113,7 +113,7 @@ namespace WixToolsetTest.MsiE2E | |||
113 | } | 113 | } |
114 | 114 | ||
115 | // Verify that Installation fails if FailIfExisits is set. | 115 | // Verify that Installation fails if FailIfExisits is set. |
116 | [Fact] | 116 | [RuntimeFact] |
117 | public void FailsIfUserExists() | 117 | public void FailsIfUserExists() |
118 | { | 118 | { |
119 | var productFailIfExists = this.CreatePackageInstaller("ProductFailIfExists"); | 119 | var productFailIfExists = this.CreatePackageInstaller("ProductFailIfExists"); |
@@ -139,7 +139,7 @@ namespace WixToolsetTest.MsiE2E | |||
139 | } | 139 | } |
140 | 140 | ||
141 | // Verify that a user cannot be created on a domain on which you dont have create user permission. | 141 | // Verify that a user cannot be created on a domain on which you dont have create user permission. |
142 | [Fact] | 142 | [RuntimeFact] |
143 | public void FailsIfRestrictedDomain() | 143 | public void FailsIfRestrictedDomain() |
144 | { | 144 | { |
145 | var productRestrictedDomain = this.CreatePackageInstaller("ProductRestrictedDomain"); | 145 | var productRestrictedDomain = this.CreatePackageInstaller("ProductRestrictedDomain"); |
@@ -151,7 +151,7 @@ namespace WixToolsetTest.MsiE2E | |||
151 | } | 151 | } |
152 | 152 | ||
153 | // Verify that adding a user to a non-existent group does not fail the install when non-vital. | 153 | // Verify that adding a user to a non-existent group does not fail the install when non-vital. |
154 | [Fact] | 154 | [RuntimeFact] |
155 | public void IgnoresMissingGroupWhenNonVital() | 155 | public void IgnoresMissingGroupWhenNonVital() |
156 | { | 156 | { |
157 | var productNonVitalGroup = this.CreatePackageInstaller("ProductNonVitalUserGroup"); | 157 | var productNonVitalGroup = this.CreatePackageInstaller("ProductNonVitalUserGroup"); |