diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-04-20 15:30:08 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-04-20 16:34:16 -0500 |
commit | b82c6a2b7d451212fb0b2e32ca4d5d86c953d81a (patch) | |
tree | 6405c7522555b8ba404b84a6d187c0f8f95d42d8 /src/ext/Bal/test/WixToolsetTest.ManagedHost | |
parent | 96ce05107d0e01014a3264e91ecb5731a9f28cc5 (diff) | |
download | wix-b82c6a2b7d451212fb0b2e32ca4d5d86c953d81a.tar.gz wix-b82c6a2b7d451212fb0b2e32ca4d5d86c953d81a.tar.bz2 wix-b82c6a2b7d451212fb0b2e32ca4d5d86c953d81a.zip |
Upgrade dnchost's nethost dependency to .NET 6.0.4.
Diffstat (limited to 'src/ext/Bal/test/WixToolsetTest.ManagedHost')
3 files changed, 55 insertions, 7 deletions
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs b/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs index 14b80fe8..25856f4d 100644 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs +++ b/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | namespace WixToolsetTest.ManagedHost | 3 | namespace WixToolsetTest.ManagedHost |
4 | { | 4 | { |
5 | using System; | ||
5 | using WixBuildTools.TestSupport; | 6 | using WixBuildTools.TestSupport; |
6 | using Xunit; | 7 | using Xunit; |
7 | 8 | ||
@@ -29,6 +30,29 @@ namespace WixToolsetTest.ManagedHost | |||
29 | } | 30 | } |
30 | } | 31 | } |
31 | 32 | ||
33 | [Fact(Skip = "Requires .NET Core 3.1 x86 runtime which might be missing")] | ||
34 | public void CanLoadFDDx86EarliestCoreMBA() | ||
35 | { | ||
36 | // https://github.com/microsoft/vstest/issues/3586 | ||
37 | Environment.SetEnvironmentVariable("DOTNET_ROOT", null); | ||
38 | |||
39 | using (var fs = new DisposableFileSystem()) | ||
40 | { | ||
41 | var baseFolder = fs.GetFolder(); | ||
42 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleFDDx86.exe"); | ||
43 | var testEngine = new TestEngine(); | ||
44 | |||
45 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder, x86: true); | ||
46 | WixAssert.CompareLineByLine(new[] | ||
47 | { | ||
48 | "Loading .NET Core FDD bootstrapper application.", | ||
49 | "Creating BA thread to run asynchronously.", | ||
50 | "EarliestCoreBA", | ||
51 | "Shutdown,ReloadBootstrapper,0", | ||
52 | }, result.Output.ToArray()); | ||
53 | } | ||
54 | } | ||
55 | |||
32 | [Fact] | 56 | [Fact] |
33 | public void CanLoadSCDEarliestCoreMBA() | 57 | public void CanLoadSCDEarliestCoreMBA() |
34 | { | 58 | { |
@@ -116,6 +140,29 @@ namespace WixToolsetTest.ManagedHost | |||
116 | } | 140 | } |
117 | 141 | ||
118 | [Fact] | 142 | [Fact] |
143 | public void CanLoadFDDx86LatestCoreMBA() | ||
144 | { | ||
145 | // https://github.com/microsoft/vstest/issues/3586 | ||
146 | Environment.SetEnvironmentVariable("DOTNET_ROOT", null); | ||
147 | |||
148 | using (var fs = new DisposableFileSystem()) | ||
149 | { | ||
150 | var baseFolder = fs.GetFolder(); | ||
151 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDDx86.exe"); | ||
152 | var testEngine = new TestEngine(); | ||
153 | |||
154 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder, x86: true); | ||
155 | WixAssert.CompareLineByLine(new[] | ||
156 | { | ||
157 | "Loading .NET Core FDD bootstrapper application.", | ||
158 | "Creating BA thread to run asynchronously.", | ||
159 | "LatestCoreBA", | ||
160 | "Shutdown,ReloadBootstrapper,0", | ||
161 | }, result.Output.ToArray()); | ||
162 | } | ||
163 | } | ||
164 | |||
165 | [Fact] | ||
119 | public void CanReloadFDDLatestCoreMBA() | 166 | public void CanReloadFDDLatestCoreMBA() |
120 | { | 167 | { |
121 | using (var fs = new DisposableFileSystem()) | 168 | using (var fs = new DisposableFileSystem()) |
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs b/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs index 4df52e87..0ca2b40f 100644 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs +++ b/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs | |||
@@ -12,18 +12,19 @@ namespace WixToolsetTest.ManagedHost | |||
12 | public class TestEngine | 12 | public class TestEngine |
13 | { | 13 | { |
14 | private static readonly string TestEngineFile = TestData.Get(@"..\x64\examples\Example.TestEngine\Example.TestEngine.exe"); | 14 | private static readonly string TestEngineFile = TestData.Get(@"..\x64\examples\Example.TestEngine\Example.TestEngine.exe"); |
15 | private static readonly string TestEngineFileX86 = TestData.Get(@"..\x86\examples\Example.TestEngine\Example.TestEngine.exe"); | ||
15 | 16 | ||
16 | public TestEngineResult RunReloadEngine(string bundleFilePath, string tempFolderPath) | 17 | public TestEngineResult RunReloadEngine(string bundleFilePath, string tempFolderPath, bool x86 = false) |
17 | { | 18 | { |
18 | return this.RunTestEngine("reload", bundleFilePath, tempFolderPath); | 19 | return this.RunTestEngine("reload", bundleFilePath, tempFolderPath, x86); |
19 | } | 20 | } |
20 | 21 | ||
21 | public TestEngineResult RunShutdownEngine(string bundleFilePath, string tempFolderPath) | 22 | public TestEngineResult RunShutdownEngine(string bundleFilePath, string tempFolderPath, bool x86 = false) |
22 | { | 23 | { |
23 | return this.RunTestEngine("shutdown", bundleFilePath, tempFolderPath); | 24 | return this.RunTestEngine("shutdown", bundleFilePath, tempFolderPath, x86); |
24 | } | 25 | } |
25 | 26 | ||
26 | private TestEngineResult RunTestEngine(string engineMode, string bundleFilePath, string tempFolderPath) | 27 | private TestEngineResult RunTestEngine(string engineMode, string bundleFilePath, string tempFolderPath, bool x86 = false) |
27 | { | 28 | { |
28 | var baFolderPath = Path.Combine(tempFolderPath, "ba"); | 29 | var baFolderPath = Path.Combine(tempFolderPath, "ba"); |
29 | var extractFolderPath = Path.Combine(tempFolderPath, "extract"); | 30 | var extractFolderPath = Path.Combine(tempFolderPath, "extract"); |
@@ -35,7 +36,7 @@ namespace WixToolsetTest.ManagedHost | |||
35 | '"' + bundleFilePath + '"', | 36 | '"' + bundleFilePath + '"', |
36 | '"' + extractResult.GetBAFilePath(baFolderPath) + '"', | 37 | '"' + extractResult.GetBAFilePath(baFolderPath) + '"', |
37 | }; | 38 | }; |
38 | return RunProcessCaptureOutput(TestEngineFile, args); | 39 | return RunProcessCaptureOutput(x86 ? TestEngineFileX86 : TestEngineFile, args); |
39 | } | 40 | } |
40 | 41 | ||
41 | private static TestEngineResult RunProcessCaptureOutput(string executablePath, string[] arguments = null, string workingFolder = null) | 42 | private static TestEngineResult RunProcessCaptureOutput(string executablePath, string[] arguments = null, string workingFolder = null) |
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj b/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj index 16dbec94..a55beac7 100644 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj +++ b/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- 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 | <!-- 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. --> |
3 | 3 | ||
4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="Microsoft.NET.Sdk"> |