Skip to content

Commit 8f76618

Browse files
authored
[browser] Remove experimental args from NodeJS WBT runner (#111655)
1 parent b1413ce commit 8f76618

File tree

4 files changed

+3
-31
lines changed

4 files changed

+3
-31
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public void PublishWithSIMD_AOT(BuildArgs buildArgs, RunHost host, string id)
6666
DotnetWasmFromRuntimePack: false));
6767

6868
RunAndTestWasmApp(buildArgs,
69-
extraXHarnessArgs: host == RunHost.NodeJS ? "--engine-arg=--experimental-wasm-simd --engine-arg=--experimental-wasm-eh" : "",
7069
expectedExitCode: 42,
7170
test: output =>
7271
{

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

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

60-
if (template == "wasmconsole")
61-
{
62-
UpdateRuntimeconfigTemplateForNode(_projectDir);
63-
}
64-
6560
AddItemsPropertiesToProject(projectfile, extraProperties);
6661

6762
return projectfile;
6863
}
6964

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

0 commit comments

Comments
 (0)