Skip to content

Commit 2f9dcfd

Browse files
[release/8.0-staging] [browser] Remove experimental args from NodeJS WBT runner (#113008)
1 parent 7ea3ab4 commit 2f9dcfd

File tree

4 files changed

+3
-32
lines changed

4 files changed

+3
-32
lines changed

src/mono/wasm/Wasm.Build.Tests/ConfigSrcTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public ConfigSrcTests(ITestOutputHelper output, SharedBuildPerTestClassFixture b
1616

1717
// NOTE: port number determinizes dynamically, so could not generate absolute URI
1818
[Theory]
19-
[BuildAndRun(host: RunHost.V8 | RunHost.NodeJS)]
19+
[BuildAndRun(host: RunHost.V8)]
2020
public void ConfigSrcAbsolutePath(BuildArgs buildArgs, RunHost host, string id)
2121
{
2222
buildArgs = buildArgs with { ProjectName = $"configsrcabsolute_{buildArgs.Config}_{buildArgs.AOT}" };

src/mono/wasm/Wasm.Build.Tests/HostRunner/NodeJSHostRunner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ namespace Wasm.Build.Tests;
88
public class NodeJSHostRunner : IHostRunner
99
{
1010
public string GetTestCommand() => "wasm test";
11-
public string GetXharnessArgsWindowsOS(XHarnessArgsOptions options) => $"--js-file={options.jsRelativePath} --engine=NodeJS -v trace --engine-arg=--experimental-wasm-simd --engine-arg=--experimental-wasm-eh";
12-
public string GetXharnessArgsOtherOS(XHarnessArgsOptions options) => $"--js-file={options.jsRelativePath} --engine=NodeJS -v trace --locale={options.environmentLocale} --engine-arg=--experimental-wasm-simd --engine-arg=--experimental-wasm-eh";
11+
public string GetXharnessArgsWindowsOS(XHarnessArgsOptions options) => $"--js-file={options.jsRelativePath} --engine=NodeJS -v trace";
12+
public string GetXharnessArgsOtherOS(XHarnessArgsOptions options) => $"--js-file={options.jsRelativePath} --engine=NodeJS -v trace --locale={options.environmentLocale}";
1313
public bool UseWasmConsoleOutput() => true;
1414
public bool CanRunWBT() => true;
1515
}

src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public void Build_NoAOT_ShouldNotRelink(BuildArgs buildArgs, RunHost host, strin
4141
Assert.DoesNotContain("Compiling native assets with emcc", output);
4242

4343
RunAndTestWasmApp(buildArgs,
44-
extraXHarnessArgs: host == RunHost.NodeJS ? "--engine-arg=--experimental-wasm-simd --engine-arg=--experimental-wasm-eh" : "",
4544
expectedExitCode: 42,
4645
test: output =>
4746
{
@@ -66,7 +65,6 @@ public void PublishWithSIMD_AOT(BuildArgs buildArgs, RunHost host, string id)
6665
DotnetWasmFromRuntimePack: false));
6766

6867
RunAndTestWasmApp(buildArgs,
69-
extraXHarnessArgs: host == RunHost.NodeJS ? "--engine-arg=--experimental-wasm-simd --engine-arg=--experimental-wasm-eh" : "",
7068
expectedExitCode: 42,
7169
test: output =>
7270
{

src/mono/wasm/Wasm.Build.Tests/WasmTemplateTestBase.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -49,38 +49,11 @@ public string CreateWasmTemplateProject(string id, string template = "wasmbrowse
4949
if (runAnalyzers)
5050
extraProperties += "<RunAnalyzers>true</RunAnalyzers>";
5151

52-
if (template == "wasmconsole")
53-
{
54-
UpdateRuntimeconfigTemplateForNode(_projectDir);
55-
}
56-
5752
AddItemsPropertiesToProject(projectfile, extraProperties);
5853

5954
return projectfile;
6055
}
6156

62-
private static void UpdateRuntimeconfigTemplateForNode(string projectDir)
63-
{
64-
// TODO: Can be removed once Node >= 20
65-
66-
string runtimeconfigTemplatePath = Path.Combine(projectDir, "runtimeconfig.template.json");
67-
string runtimeconfigTemplateContent = File.ReadAllText(runtimeconfigTemplatePath);
68-
var runtimeconfigTemplate = JsonObject.Parse(runtimeconfigTemplateContent);
69-
if (runtimeconfigTemplate == null)
70-
throw new Exception($"Unable to parse runtimeconfigtemplate at '{runtimeconfigTemplatePath}'");
71-
72-
var perHostConfigs = runtimeconfigTemplate?["wasmHostProperties"]?["perHostConfig"]?.AsArray();
73-
if (perHostConfigs == null || perHostConfigs.Count == 0 || perHostConfigs[0] == null)
74-
throw new Exception($"Unable to find perHostConfig in runtimeconfigtemplate at '{runtimeconfigTemplatePath}'");
75-
76-
perHostConfigs[0]!["host-args"] = new JsonArray(
77-
"--experimental-wasm-simd",
78-
"--experimental-wasm-eh"
79-
);
80-
81-
File.WriteAllText(runtimeconfigTemplatePath, runtimeconfigTemplate!.ToString());
82-
}
83-
8457
public (string projectDir, string buildOutput) BuildTemplateProject(BuildArgs buildArgs,
8558
string id,
8659
BuildProjectOptions buildProjectOptions)

0 commit comments

Comments
 (0)