diff options
Diffstat (limited to 'src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs')
-rw-r--r-- | src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs index 6862f2a8..71255165 100644 --- a/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs +++ b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs | |||
@@ -12,6 +12,7 @@ namespace WixToolsetTest.MSBuild | |||
12 | public class MsbuildFixture | 12 | public class MsbuildFixture |
13 | { | 13 | { |
14 | [Theory] | 14 | [Theory] |
15 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
15 | [InlineData(BuildSystem.MSBuild)] | 16 | [InlineData(BuildSystem.MSBuild)] |
16 | [InlineData(BuildSystem.MSBuild64)] | 17 | [InlineData(BuildSystem.MSBuild64)] |
17 | public void CanBuildSimpleBundle(BuildSystem buildSystem) | 18 | public void CanBuildSimpleBundle(BuildSystem buildSystem) |
@@ -44,6 +45,7 @@ namespace WixToolsetTest.MSBuild | |||
44 | } | 45 | } |
45 | 46 | ||
46 | [Theory] | 47 | [Theory] |
48 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
47 | [InlineData(BuildSystem.MSBuild)] | 49 | [InlineData(BuildSystem.MSBuild)] |
48 | [InlineData(BuildSystem.MSBuild64)] | 50 | [InlineData(BuildSystem.MSBuild64)] |
49 | public void CanBuildSimpleMergeModule(BuildSystem buildSystem) | 51 | public void CanBuildSimpleMergeModule(BuildSystem buildSystem) |
@@ -76,6 +78,7 @@ namespace WixToolsetTest.MSBuild | |||
76 | } | 78 | } |
77 | 79 | ||
78 | [Theory] | 80 | [Theory] |
81 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
79 | [InlineData(BuildSystem.MSBuild)] | 82 | [InlineData(BuildSystem.MSBuild)] |
80 | [InlineData(BuildSystem.MSBuild64)] | 83 | [InlineData(BuildSystem.MSBuild64)] |
81 | public void CanBuildSimpleMsiPackage(BuildSystem buildSystem) | 84 | public void CanBuildSimpleMsiPackage(BuildSystem buildSystem) |
@@ -112,6 +115,7 @@ namespace WixToolsetTest.MSBuild | |||
112 | } | 115 | } |
113 | 116 | ||
114 | [Theory] | 117 | [Theory] |
118 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
115 | [InlineData(BuildSystem.MSBuild)] | 119 | [InlineData(BuildSystem.MSBuild)] |
116 | [InlineData(BuildSystem.MSBuild64)] | 120 | [InlineData(BuildSystem.MSBuild64)] |
117 | public void CanBuildSimpleMsiPackageWithMergeModule(BuildSystem buildSystem) | 121 | public void CanBuildSimpleMsiPackageWithMergeModule(BuildSystem buildSystem) |
@@ -145,6 +149,7 @@ namespace WixToolsetTest.MSBuild | |||
145 | } | 149 | } |
146 | 150 | ||
147 | [Theory] | 151 | [Theory] |
152 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
148 | [InlineData(BuildSystem.MSBuild)] | 153 | [InlineData(BuildSystem.MSBuild)] |
149 | [InlineData(BuildSystem.MSBuild64)] | 154 | [InlineData(BuildSystem.MSBuild64)] |
150 | public void CanBuildWithDefaultAndExplicitlyFullWixpdbs(BuildSystem buildSystem) | 155 | public void CanBuildWithDefaultAndExplicitlyFullWixpdbs(BuildSystem buildSystem) |
@@ -161,6 +166,7 @@ namespace WixToolsetTest.MSBuild | |||
161 | } | 166 | } |
162 | 167 | ||
163 | [Theory] | 168 | [Theory] |
169 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
164 | [InlineData(BuildSystem.MSBuild)] | 170 | [InlineData(BuildSystem.MSBuild)] |
165 | [InlineData(BuildSystem.MSBuild64)] | 171 | [InlineData(BuildSystem.MSBuild64)] |
166 | public void CanBuildWithNoWixpdb(BuildSystem buildSystem) | 172 | public void CanBuildWithNoWixpdb(BuildSystem buildSystem) |
@@ -198,6 +204,7 @@ namespace WixToolsetTest.MSBuild | |||
198 | } | 204 | } |
199 | 205 | ||
200 | [Theory] | 206 | [Theory] |
207 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
201 | [InlineData(BuildSystem.MSBuild)] | 208 | [InlineData(BuildSystem.MSBuild)] |
202 | [InlineData(BuildSystem.MSBuild64)] | 209 | [InlineData(BuildSystem.MSBuild64)] |
203 | public void CanBuild64BitMsiPackage(BuildSystem buildSystem) | 210 | public void CanBuild64BitMsiPackage(BuildSystem buildSystem) |
@@ -234,6 +241,7 @@ namespace WixToolsetTest.MSBuild | |||
234 | } | 241 | } |
235 | 242 | ||
236 | [Theory(Skip = "Currently fails")] | 243 | [Theory(Skip = "Currently fails")] |
244 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
237 | [InlineData(BuildSystem.MSBuild)] | 245 | [InlineData(BuildSystem.MSBuild)] |
238 | [InlineData(BuildSystem.MSBuild64)] | 246 | [InlineData(BuildSystem.MSBuild64)] |
239 | public void CanBuildSimpleMsiPackageWithIceSuppressions(BuildSystem buildSystem) | 247 | public void CanBuildSimpleMsiPackageWithIceSuppressions(BuildSystem buildSystem) |
@@ -249,13 +257,14 @@ namespace WixToolsetTest.MSBuild | |||
249 | 257 | ||
250 | var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] | 258 | var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] |
251 | { | 259 | { |
252 | "-p:SuppressIces=\"ICE45;ICE46\"", | 260 | MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressIces", "ICE45;ICE46"), |
253 | }); | 261 | }); |
254 | result.AssertSuccess(); | 262 | result.AssertSuccess(); |
255 | } | 263 | } |
256 | } | 264 | } |
257 | 265 | ||
258 | [Theory] | 266 | [Theory] |
267 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
259 | [InlineData(BuildSystem.MSBuild)] | 268 | [InlineData(BuildSystem.MSBuild)] |
260 | [InlineData(BuildSystem.MSBuild64)] | 269 | [InlineData(BuildSystem.MSBuild64)] |
261 | public void CanBuildSimpleMsiPackageWithWarningSuppressions(BuildSystem buildSystem) | 270 | public void CanBuildSimpleMsiPackageWithWarningSuppressions(BuildSystem buildSystem) |
@@ -271,7 +280,7 @@ namespace WixToolsetTest.MSBuild | |||
271 | 280 | ||
272 | var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] | 281 | var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] |
273 | { | 282 | { |
274 | "-p:SuppressSpecificWarnings=\"1118;1102\"", | 283 | MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressSpecificWarnings", "1118;1102"), |
275 | }); | 284 | }); |
276 | result.AssertSuccess(); | 285 | result.AssertSuccess(); |
277 | 286 | ||
@@ -281,6 +290,8 @@ namespace WixToolsetTest.MSBuild | |||
281 | } | 290 | } |
282 | 291 | ||
283 | [Theory] | 292 | [Theory] |
293 | [InlineData(BuildSystem.DotNetCoreSdk, null)] | ||
294 | [InlineData(BuildSystem.DotNetCoreSdk, true)] | ||
284 | [InlineData(BuildSystem.MSBuild, null)] | 295 | [InlineData(BuildSystem.MSBuild, null)] |
285 | [InlineData(BuildSystem.MSBuild, true)] | 296 | [InlineData(BuildSystem.MSBuild, true)] |
286 | [InlineData(BuildSystem.MSBuild64, null)] | 297 | [InlineData(BuildSystem.MSBuild64, null)] |
@@ -302,10 +313,8 @@ namespace WixToolsetTest.MSBuild | |||
302 | }, outOfProc: outOfProc); | 313 | }, outOfProc: outOfProc); |
303 | result.AssertSuccess(); | 314 | result.AssertSuccess(); |
304 | 315 | ||
305 | var expectedOutOfProc = outOfProc.HasValue && outOfProc.Value; | 316 | var wixBuildCommands = MsbuildUtilities.GetToolCommandLines(result, "wix", "build", buildSystem, outOfProc); |
306 | var expectedWixCommand = $"{(expectedOutOfProc ? "wix.exe" : "(wix.exe)")} build"; | 317 | Assert.Single(wixBuildCommands); |
307 | var buildCommands = result.Output.Where(line => line.TrimStart().Contains(expectedWixCommand)); | ||
308 | Assert.Single(buildCommands); | ||
309 | 318 | ||
310 | var path = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) | 319 | var path = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) |
311 | .Select(s => s.Substring(baseFolder.Length + 1)) | 320 | .Select(s => s.Substring(baseFolder.Length + 1)) |
@@ -315,6 +324,7 @@ namespace WixToolsetTest.MSBuild | |||
315 | } | 324 | } |
316 | 325 | ||
317 | [Theory] | 326 | [Theory] |
327 | [InlineData(BuildSystem.DotNetCoreSdk)] | ||
318 | [InlineData(BuildSystem.MSBuild)] | 328 | [InlineData(BuildSystem.MSBuild)] |
319 | [InlineData(BuildSystem.MSBuild64)] | 329 | [InlineData(BuildSystem.MSBuild64)] |
320 | public void CanBuildAndCleanSimpleMsiPackage(BuildSystem buildSystem) | 330 | public void CanBuildAndCleanSimpleMsiPackage(BuildSystem buildSystem) |
@@ -328,10 +338,7 @@ namespace WixToolsetTest.MSBuild | |||
328 | var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj"); | 338 | var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj"); |
329 | 339 | ||
330 | // Build | 340 | // Build |
331 | var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] | 341 | var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, verbosityLevel: "diag"); |
332 | { | ||
333 | "-v:diag", | ||
334 | }); | ||
335 | result.AssertSuccess(); | 342 | result.AssertSuccess(); |
336 | 343 | ||
337 | var buildOutput = String.Join("\r\n", result.Output); | 344 | var buildOutput = String.Join("\r\n", result.Output); |
@@ -346,8 +353,7 @@ namespace WixToolsetTest.MSBuild | |||
346 | result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] | 353 | result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] |
347 | { | 354 | { |
348 | "-t:Clean", | 355 | "-t:Clean", |
349 | "-v:diag", | 356 | }, verbosityLevel: "diag"); |
350 | }); | ||
351 | result.AssertSuccess(); | 357 | result.AssertSuccess(); |
352 | 358 | ||
353 | var cleanOutput = String.Join("\r\n", result.Output); | 359 | var cleanOutput = String.Join("\r\n", result.Output); |