Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorAnkit Jain <radical@gmail.com>2021-03-17 20:12:16 +0300
committerGitHub <noreply@github.com>2021-03-17 20:12:16 +0300
commit4e3deb5100c815e880403a7cf31304a616db4e10 (patch)
tree70c0a8315486e142768ebb447565bf2f97f2b66e /src/tests
parent572605bd0f610d0d16dd58d3902bd7df98b43e79 (diff)
[wasm] Enable wasm relinking by default for Release config (#49251)
* [wasm] Set default value for $(WasmBuildNative) based on: - If $(WasmBuildNative) is already set (eg. by user project) to true, then error if EMSDK_PATH is unset - if unset, and$(PublishTrimmed) == false, then set to false - if unset, and $(Configuration) == "Release", then set to true - If it is $(WasmBuildNative) == true after above steps, and emsdk is missing => then emit a warning, and set it to false commits: * [wasm] Set WasmBuildNative=true for Release config - But set to `false` if `$(PublishTrimmed)` is not true Fixes: https://github.com/dotnet/runtime/issues/48349 * dotnet-linker-tests need mono-aot-cross * [wasm] Cleanup setting emcc flags * Address review feedback from @lewing .. and update tests to track the changes. * Correctly address review feedback:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/BuildWasmApps/Wasm.Build.Tests/WasmBuildAppTest.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/WasmBuildAppTest.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/WasmBuildAppTest.cs
index c6ff9aa45d3..29b31eea76d 100644
--- a/src/tests/BuildWasmApps/Wasm.Build.Tests/WasmBuildAppTest.cs
+++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/WasmBuildAppTest.cs
@@ -176,7 +176,8 @@ namespace Wasm.Build.Tests
string projectName = $"invariant_{invariantGlobalization?.ToString() ?? "unset"}";
BuildProject(projectName, config, aot: aot, extraProperties: extraProperties,
- hasIcudt: invariantGlobalization == null || invariantGlobalization.Value == false);
+ hasIcudt: invariantGlobalization == null || invariantGlobalization.Value == false,
+ dotnetWasmFromRuntimePack: !(aot || config == "Release"));
RunAndTestWasmApp(projectName, config, isAOT: aot, expectedExitCode: 42,
test: output => Assert.Contains("Hello, World!", output));
@@ -265,7 +266,7 @@ namespace Wasm.Build.Tests
void TestMain(string projectName, string programText, string config, bool aot)
{
File.WriteAllText(Path.Combine(_tempDir, "Program.cs"), programText);
- BuildProject(projectName, config, aot: aot);
+ BuildProject(projectName, config, aot: aot, dotnetWasmFromRuntimePack: !(aot || config == "Release"));
RunAndTestWasmApp(projectName, config, isAOT: aot, expectedExitCode: 42,
test: output => Assert.Contains("Hello, World!", output));
}
@@ -281,7 +282,7 @@ namespace Wasm.Build.Tests
string programText = programFormatString.Replace("##CODE##", code);
File.WriteAllText(Path.Combine(_tempDir, "Program.cs"), programText);
- BuildProject(projectName, config, aot: aot);
+ BuildProject(projectName, config, aot: aot, dotnetWasmFromRuntimePack: !(aot || config == "Release"));
RunAndTestWasmApp(projectName, config, isAOT: aot, expectedExitCode: 42 + args.Length, args: string.Join(' ', args),
test: output =>
{