Skip to content

Commit

Permalink
[wasm] Make Wasm.Build.Tests on CI, green again (#73314)
Browse files Browse the repository at this point in the history
* [wasm] Fix Wasm.Build.Tests builds

Issue: #73312

* [wasm] Disable failing Wasm.Build.Tests test on windows

Issue: #71887
  • Loading branch information
radical authored Aug 3, 2022
1 parent e4fe491 commit bb3be81
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<MoqVersion>4.12.0</MoqVersion>
<FsCheckVersion>2.14.3</FsCheckVersion>
<!-- Uncomment to set a fixed version, else the latest is used -->
<!--<SdkVersionForWorkloadTesting>7.0.100-preview.3.22151.18</SdkVersionForWorkloadTesting>-->
<SdkVersionForWorkloadTesting>7.0.100-rc.1.22402.35</SdkVersionForWorkloadTesting>
<CompilerPlatformTestingVersion>1.1.2-beta1.22205.2</CompilerPlatformTestingVersion>
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>7.0.0-preview-20220721.1</MicrosoftPrivateIntellisenseVersion>
Expand Down
25 changes: 20 additions & 5 deletions src/tests/BuildWasmApps/Wasm.Build.Tests/WasmTemplateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Xunit;
Expand Down Expand Up @@ -170,12 +171,26 @@ public void ConsoleBuildAndRun(string config, bool relinking)
Assert.Contains("args[2] = z", output);
}

public static TheoryData<string, bool, bool> TestDataForConsolePublishAndRun()
{
var data = new TheoryData<string, bool, bool>();
data.Add("Debug", false, false);
data.Add("Debug", false, false);
data.Add("Debug", false, true);
data.Add("Release", false, false); // Release relinks by default

// [ActiveIssue("https://github.com/dotnet/runtime/issues/71887", TestPlatforms.Windows)]
if (!OperatingSystem.IsWindows())
{
data.Add("Debug", true, false);
data.Add("Release", true, false);
}

return data;
}

[ConditionalTheory(typeof(BuildTestBase), nameof(IsUsingWorkloads))]
[InlineData("Debug", false, false)]
[InlineData("Debug", false, true)]
[InlineData("Debug", true, false)]
[InlineData("Release", false, false)] // Release relinks by default
[InlineData("Release", true, false)]
[MemberData(nameof(TestDataForConsolePublishAndRun))]
public void ConsolePublishAndRun(string config, bool aot, bool relinking)
{
string id = $"{config}_{Path.GetRandomFileName()}";
Expand Down

0 comments on commit bb3be81

Please sign in to comment.