diff options
Diffstat (limited to 'src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs')
-rw-r--r-- | src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs | 285 |
1 files changed, 0 insertions, 285 deletions
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs b/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs deleted file mode 100644 index fe644d2d..00000000 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs +++ /dev/null | |||
@@ -1,285 +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.ManagedHost | ||
4 | { | ||
5 | using System; | ||
6 | using WixInternal.TestSupport; | ||
7 | using WixInternal.TestSupport.XunitExtensions; | ||
8 | using Xunit; | ||
9 | |||
10 | public class DncHostFixture | ||
11 | { | ||
12 | static readonly string bundleBasePath = TestData.Get("..", "examples"); | ||
13 | |||
14 | [Fact] | ||
15 | public void CanLoadFDDEarliestCoreMBA() | ||
16 | { | ||
17 | using (var fs = new DisposableFileSystem()) | ||
18 | { | ||
19 | var baseFolder = fs.GetFolder(); | ||
20 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleFDD.exe"); | ||
21 | var testEngine = new TestEngine(); | ||
22 | |||
23 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
24 | WixAssert.CompareLineByLine(new[] | ||
25 | { | ||
26 | "Loading .NET Core FDD bootstrapper application.", | ||
27 | "Creating BA thread to run asynchronously.", | ||
28 | "EarliestCoreBA", | ||
29 | "Shutdown,ReloadBootstrapper,0", | ||
30 | }, result.Output.ToArray()); | ||
31 | } | ||
32 | } | ||
33 | |||
34 | [SkippableFact] | ||
35 | public void CanLoadFDDx86EarliestCoreMBA() | ||
36 | { | ||
37 | // https://github.com/microsoft/vstest/issues/3586 | ||
38 | Environment.SetEnvironmentVariable("DOTNET_ROOT", null); | ||
39 | |||
40 | using (var fs = new DisposableFileSystem()) | ||
41 | { | ||
42 | var baseFolder = fs.GetFolder(); | ||
43 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleFDDx86.exe"); | ||
44 | var testEngine = new TestEngine(); | ||
45 | |||
46 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder, x86: true); | ||
47 | var resultOutput = result.Output.ToArray(); | ||
48 | |||
49 | if (resultOutput.Length > 0 && (resultOutput[0] == "error from hostfxr: It was not possible to find any compatible framework version" || | ||
50 | resultOutput[0] == "error from hostfxr: You must install or update .NET to run this application.")) | ||
51 | { | ||
52 | WixAssert.Skip(String.Join(Environment.NewLine, resultOutput)); | ||
53 | } | ||
54 | |||
55 | WixAssert.CompareLineByLine(new[] | ||
56 | { | ||
57 | "Loading .NET Core FDD bootstrapper application.", | ||
58 | "Creating BA thread to run asynchronously.", | ||
59 | "EarliestCoreBA", | ||
60 | "Shutdown,ReloadBootstrapper,0", | ||
61 | }, resultOutput); | ||
62 | } | ||
63 | } | ||
64 | |||
65 | [Fact] | ||
66 | public void CanLoadSCDEarliestCoreMBA() | ||
67 | { | ||
68 | using (var fs = new DisposableFileSystem()) | ||
69 | { | ||
70 | var baseFolder = fs.GetFolder(); | ||
71 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleSCD.exe"); | ||
72 | var testEngine = new TestEngine(); | ||
73 | |||
74 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
75 | WixAssert.CompareLineByLine(new[] | ||
76 | { | ||
77 | "Loading .NET Core SCD bootstrapper application.", | ||
78 | "Creating BA thread to run asynchronously.", | ||
79 | "EarliestCoreBA", | ||
80 | "Shutdown,ReloadBootstrapper,0", | ||
81 | }, result.Output.ToArray()); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | [Fact] | ||
86 | public void CanLoadTrimmedSCDEarliestCoreMBA() | ||
87 | { | ||
88 | using (var fs = new DisposableFileSystem()) | ||
89 | { | ||
90 | var baseFolder = fs.GetFolder(); | ||
91 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleTrimmedSCD.exe"); | ||
92 | var testEngine = new TestEngine(); | ||
93 | |||
94 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
95 | WixAssert.CompareLineByLine(new[] | ||
96 | { | ||
97 | "Loading .NET Core SCD bootstrapper application.", | ||
98 | "Creating BA thread to run asynchronously.", | ||
99 | "EarliestCoreBA", | ||
100 | "Shutdown,ReloadBootstrapper,0", | ||
101 | }, result.Output.ToArray()); | ||
102 | } | ||
103 | } | ||
104 | |||
105 | [Fact] | ||
106 | public void CanReloadSCDEarliestCoreMBA() | ||
107 | { | ||
108 | using (var fs = new DisposableFileSystem()) | ||
109 | { | ||
110 | var baseFolder = fs.GetFolder(); | ||
111 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleSCD.exe"); | ||
112 | var testEngine = new TestEngine(); | ||
113 | |||
114 | var result = testEngine.RunReloadEngine(bundleFile, baseFolder); | ||
115 | WixAssert.CompareLineByLine(new[] | ||
116 | { | ||
117 | "Loading .NET Core SCD bootstrapper application.", | ||
118 | "Creating BA thread to run asynchronously.", | ||
119 | "EarliestCoreBA", | ||
120 | "Shutdown,ReloadBootstrapper,0", | ||
121 | "Loading .NET Core SCD bootstrapper application.", | ||
122 | "Reloaded 1 time(s)", // dnchost doesn't currently support unloading | ||
123 | "Creating BA thread to run asynchronously.", | ||
124 | "EarliestCoreBA", | ||
125 | "Shutdown,Restart,0", | ||
126 | |||
127 | }, result.Output.ToArray()); | ||
128 | } | ||
129 | } | ||
130 | |||
131 | [Fact] | ||
132 | public void CanLoadFDDLatestCoreMBA() | ||
133 | { | ||
134 | using (var fs = new DisposableFileSystem()) | ||
135 | { | ||
136 | var baseFolder = fs.GetFolder(); | ||
137 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDD.exe"); | ||
138 | var testEngine = new TestEngine(); | ||
139 | |||
140 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
141 | WixAssert.CompareLineByLine(new[] | ||
142 | { | ||
143 | "Loading .NET Core FDD bootstrapper application.", | ||
144 | "Creating BA thread to run asynchronously.", | ||
145 | "LatestCoreBA", | ||
146 | "Shutdown,ReloadBootstrapper,0", | ||
147 | }, result.Output.ToArray()); | ||
148 | } | ||
149 | } | ||
150 | |||
151 | [Fact] | ||
152 | public void CanLoadFDDx86LatestCoreMBA() | ||
153 | { | ||
154 | // https://github.com/microsoft/vstest/issues/3586 | ||
155 | Environment.SetEnvironmentVariable("DOTNET_ROOT", null); | ||
156 | |||
157 | using (var fs = new DisposableFileSystem()) | ||
158 | { | ||
159 | var baseFolder = fs.GetFolder(); | ||
160 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDDx86.exe"); | ||
161 | var testEngine = new TestEngine(); | ||
162 | |||
163 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder, x86: true); | ||
164 | WixAssert.CompareLineByLine(new[] | ||
165 | { | ||
166 | "Loading .NET Core FDD bootstrapper application.", | ||
167 | "Creating BA thread to run asynchronously.", | ||
168 | "LatestCoreBA", | ||
169 | "Shutdown,ReloadBootstrapper,0", | ||
170 | }, result.Output.ToArray()); | ||
171 | } | ||
172 | } | ||
173 | |||
174 | [Fact] | ||
175 | public void CanReloadFDDLatestCoreMBA() | ||
176 | { | ||
177 | using (var fs = new DisposableFileSystem()) | ||
178 | { | ||
179 | var baseFolder = fs.GetFolder(); | ||
180 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDD.exe"); | ||
181 | var testEngine = new TestEngine(); | ||
182 | |||
183 | var result = testEngine.RunReloadEngine(bundleFile, baseFolder); | ||
184 | WixAssert.CompareLineByLine(new[] | ||
185 | { | ||
186 | "Loading .NET Core FDD bootstrapper application.", | ||
187 | "Creating BA thread to run asynchronously.", | ||
188 | "LatestCoreBA", | ||
189 | "Shutdown,ReloadBootstrapper,0", | ||
190 | "Loading .NET Core FDD bootstrapper application.", | ||
191 | "Reloaded 1 time(s)", // dnchost doesn't currently support unloading | ||
192 | "Creating BA thread to run asynchronously.", | ||
193 | "LatestCoreBA", | ||
194 | "Shutdown,Restart,0", | ||
195 | }, result.Output.ToArray()); | ||
196 | } | ||
197 | } | ||
198 | |||
199 | [Fact] | ||
200 | public void CanLoadSCDLatestCoreMBA() | ||
201 | { | ||
202 | using (var fs = new DisposableFileSystem()) | ||
203 | { | ||
204 | var baseFolder = fs.GetFolder(); | ||
205 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleSCD.exe"); | ||
206 | var testEngine = new TestEngine(); | ||
207 | |||
208 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
209 | WixAssert.CompareLineByLine(new[] | ||
210 | { | ||
211 | "Loading .NET Core SCD bootstrapper application.", | ||
212 | "Creating BA thread to run asynchronously.", | ||
213 | "LatestCoreBA", | ||
214 | "Shutdown,ReloadBootstrapper,0", | ||
215 | }, result.Output.ToArray()); | ||
216 | var logMessages = result.Output; | ||
217 | } | ||
218 | } | ||
219 | |||
220 | [Fact] | ||
221 | public void CanLoadTrimmedSCDLatestCoreMBA() | ||
222 | { | ||
223 | using (var fs = new DisposableFileSystem()) | ||
224 | { | ||
225 | var baseFolder = fs.GetFolder(); | ||
226 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleTrimmedSCD.exe"); | ||
227 | var testEngine = new TestEngine(); | ||
228 | |||
229 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
230 | WixAssert.CompareLineByLine(new[] | ||
231 | { | ||
232 | "Loading .NET Core SCD bootstrapper application.", | ||
233 | "Creating BA thread to run asynchronously.", | ||
234 | "LatestCoreBA", | ||
235 | "Shutdown,ReloadBootstrapper,0", | ||
236 | }, result.Output.ToArray()); | ||
237 | } | ||
238 | } | ||
239 | |||
240 | [Fact] | ||
241 | public void CanReloadSCDLatestCoreMBA() | ||
242 | { | ||
243 | using (var fs = new DisposableFileSystem()) | ||
244 | { | ||
245 | var baseFolder = fs.GetFolder(); | ||
246 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleSCD.exe"); | ||
247 | var testEngine = new TestEngine(); | ||
248 | |||
249 | var result = testEngine.RunReloadEngine(bundleFile, baseFolder); | ||
250 | WixAssert.CompareLineByLine(new[] | ||
251 | { | ||
252 | "Loading .NET Core SCD bootstrapper application.", | ||
253 | "Creating BA thread to run asynchronously.", | ||
254 | "LatestCoreBA", | ||
255 | "Shutdown,ReloadBootstrapper,0", | ||
256 | "Loading .NET Core SCD bootstrapper application.", | ||
257 | "Reloaded 1 time(s)", // dnchost doesn't currently support unloading | ||
258 | "Creating BA thread to run asynchronously.", | ||
259 | "LatestCoreBA", | ||
260 | "Shutdown,Restart,0", | ||
261 | }, result.Output.ToArray()); | ||
262 | } | ||
263 | } | ||
264 | |||
265 | [Fact] | ||
266 | public void CanLoadFDDWPFCoreMBA() | ||
267 | { | ||
268 | using (var fs = new DisposableFileSystem()) | ||
269 | { | ||
270 | var baseFolder = fs.GetFolder(); | ||
271 | var bundleFile = TestData.Get(bundleBasePath, "WPFCoreBundleFDD.exe"); | ||
272 | var testEngine = new TestEngine(); | ||
273 | |||
274 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
275 | WixAssert.CompareLineByLine(new[] | ||
276 | { | ||
277 | "Loading .NET Core FDD bootstrapper application.", | ||
278 | "Creating BA thread to run asynchronously.", | ||
279 | "WPFCoreBA", | ||
280 | "Shutdown,ReloadBootstrapper,0", | ||
281 | }, result.Output.ToArray()); | ||
282 | } | ||
283 | } | ||
284 | } | ||
285 | } | ||