Skip to content

Commit 9c3e55f

Browse files
authored
Merge branch 'main' into fix-wasm-mt-gc
2 parents 99c156a + 4fc6d4c commit 9c3e55f

File tree

219 files changed

+9767
-2909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+9767
-2909
lines changed

Directory.Build.props

+2
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@
184184
<TestExclusionListTasksAssemblyPath>$([MSBuild]::NormalizePath('$(TestExclusionListTasksDir)', 'TestExclusionListTasks.dll'))</TestExclusionListTasksAssemblyPath>
185185
<CoreCLRToolPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'coreclr', '$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)'))</CoreCLRToolPath>
186186
<ILAsmToolPath Condition="'$(DotNetBuildSourceOnly)' == 'true' or '$(BuildArchitecture)' == 's390x' or '$(BuildArchitecture)' == 'ppc64le'">$(CoreCLRToolPath)</ILAsmToolPath>
187+
<!-- force download temmporarily https://github.com/dotnet/runtime/issues/101528
187188
<WasmtimeDir Condition="'$(WasmtimeDir)' == '' and '$(WASMTIME_PATH)' != '' and Exists($(WASMTIME_PATH))">$(WASMTIME_PATH)</WasmtimeDir>
189+
-->
188190
<WasmtimeDir Condition="'$(WasmtimeDir)' == ''">$([MSBuild]::NormalizeDirectory($(ArtifactsObjDir), 'wasmtime'))</WasmtimeDir>
189191
<InstallWasmtimeForTests Condition="'$(InstallWasmtimeForTests)' == '' and !Exists($(WasmtimeDir))">true</InstallWasmtimeForTests>
190192
<WasmCommonTargetsPath>$([MSBuild]::NormalizeDirectory($(WasmProjectRoot), 'build'))</WasmCommonTargetsPath>

docs/coding-guidelines/coding-style.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The general rule we follow is "use Visual Studio defaults".
3636

3737
An [EditorConfig](https://editorconfig.org "EditorConfig homepage") file (`.editorconfig`) has been provided at the root of the runtime repository, enabling C# auto-formatting conforming to the above guidelines.
3838

39-
We also use the [.NET Codeformatter Tool](https://github.com/dotnet/codeformatter) to ensure the code base maintains a consistent style over time, the tool automatically fixes the code base to conform to the guidelines outlined above.
39+
We also use the [dotnet-format Tool](https://github.com/dotnet/format) to ensure the code base maintains a consistent style over time, the tool automatically fixes the code base to conform to the guidelines outlined above.
4040

4141
### Example File:
4242

eng/native/gen-buildsys.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if /i "%__Arch%" == "wasm" (
6262
if /i "%__Os%" == "wasi" (
6363
if "%WASI_SDK_PATH%" == "" (
6464
if not exist "%__repoRoot%\src\mono\wasi\wasi-sdk" (
65-
echo Error: Should set WASI_SDK_PATH environment variable pointing to emsdk root.
65+
echo Error: Should set WASI_SDK_PATH environment variable pointing to WASI SDK root.
6666
exit /B 1
6767
)
6868

eng/pipelines/common/platform-matrix.yml

+19
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,25 @@ jobs:
294294
helixQueueGroup: ${{ parameters.helixQueueGroup }}
295295
${{ insert }}: ${{ parameters.jobParameters }}
296296

297+
- ${{ if containsValue(parameters.platforms, 'linux_musl_x64_dev_innerloop') }}:
298+
- template: xplat-setup.yml
299+
parameters:
300+
jobTemplate: ${{ parameters.jobTemplate }}
301+
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
302+
variables: ${{ parameters.variables }}
303+
osGroup: linux
304+
osSubgroup: _musl
305+
archType: x64
306+
targetRid: linux-musl-x64
307+
platform: linux_musl_x64
308+
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
309+
container: linux_musl_x64_dev_innerloop
310+
jobParameters:
311+
runtimeFlavor: ${{ parameters.runtimeFlavor }}
312+
buildConfig: ${{ parameters.buildConfig }}
313+
helixQueueGroup: ${{ parameters.helixQueueGroup }}
314+
${{ insert }}: ${{ parameters.jobParameters }}
315+
297316
# GCC Linux x64 Build
298317

299318
- ${{ if containsValue(parameters.platforms, 'gcc_linux_x64') }}:

eng/pipelines/common/templates/pipeline-with-resources.yml

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ extends:
6868
linux_x64_dev_innerloop:
6969
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04
7070

71+
linux_musl_x64_dev_innerloop:
72+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode
73+
7174
# We use a CentOS Stream 8 image here to test building from source on CentOS Stream 8.
7275
SourceBuild_centos_x64:
7376
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8

eng/pipelines/common/templates/wasm-library-aot-tests.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
alwaysRun: false
33
extraBuildArgs: ''
4-
extraHelixArgs: ''
4+
extraHelixArguments: ''
55
isExtraPlatformsBuild: false
66
isWasmOnlyBuild: false
77
buildAOTOnHelix: true
@@ -26,7 +26,7 @@ jobs:
2626
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
2727
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
2828
extraBuildArgs: /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=${{ parameters.buildAOTOnHelix }} /p:RunAOTCompilation=${{ parameters.runAOT }} ${{ parameters.extraBuildArgs }}
29-
extraHelixArgs: /p:NeedsToBuildWasmAppsOnHelix=true ${{ parameters.extraHelixArgs }}
29+
extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true ${{ parameters.extraHelixArguments }}
3030
alwaysRun: ${{ parameters.alwaysRun }}
3131
shouldRunSmokeOnly: ${{ parameters.shouldRunSmokeOnly }}
3232
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
@@ -35,5 +35,6 @@ jobs:
3535
- WasmTestOnV8
3636
- ${{ if eq(platform, 'browser_wasm_win') }}:
3737
- WasmTestOnChrome
38+
- WasmTestOnFirefox
3839
- ${{ if or(eq(platform, 'wasi_wasm_win'), eq(platform, 'wasi_wasm')) }}:
3940
- WasmTestOnWasmtime

eng/pipelines/common/templates/wasm-library-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
alwaysRun: false
33
extraBuildArgs: ''
4-
extraHelixArgs: ''
4+
extraHelixArguments: ''
55
isExtraPlatformsBuild: false
66
isWasmOnlyBuild: false
77
nameSuffix: ''
@@ -97,5 +97,5 @@ jobs:
9797
parameters:
9898
creator: dotnet-bot
9999
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
100-
extraHelixArguments: /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) ${{ parameters.extraHelixArgs }}
100+
extraHelixArguments: /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) ${{ parameters.extraHelixArguments }}
101101
scenarios: ${{ parameters.scenarios }}

eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ jobs:
199199
scenarios:
200200
- WasmTestOnV8
201201
- WasmTestOnChrome
202+
- WasmTestOnFirefox
202203
- WasmTestOnNodeJS
203204

204205
# Hybrid Globalization AOT tests
@@ -321,4 +322,4 @@ jobs:
321322
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
322323
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
323324
scenarios:
324-
- WasmTestOnV8
325+
- WasmTestOnWasmtime

eng/pipelines/global-build.yml

+15-58
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# The purpose of this pipeline is to exercise local developer workflow in the consolidated
2-
# runtime repo. In particular, it is supposed to run the root "build" script just like any
3-
# normal developer normally would and monitor regressions w.r.t. this fundamental scenario.
1+
# The purpose of this pipeline is to exercise various developer workflows in the repo.
2+
# Primarily, it is meant to cover local (non-cross) build scenarios and
3+
# source-build scenarios that commonly cause build breaks.
44

55
trigger: none
66

@@ -41,28 +41,6 @@ extends:
4141
- stage: Build
4242
jobs:
4343

44-
#
45-
# Build with Release config and Debug runtimeConfiguration
46-
#
47-
- template: /eng/pipelines/common/platform-matrix.yml
48-
parameters:
49-
jobTemplate: /eng/pipelines/common/global-build-job.yml
50-
buildConfig: release
51-
platforms:
52-
- windows_x86
53-
- osx_x64
54-
- osx_arm64
55-
jobParameters:
56-
testGroup: innerloop
57-
nameSuffix: Runtime_Debug
58-
buildArgs: -c release -runtimeConfiguration debug
59-
timeoutInMinutes: 120
60-
condition:
61-
or(
62-
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
63-
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
64-
eq(variables['isRollingBuild'], true))
65-
6644
#
6745
# Build with Release config and runtimeConfiguration with MSBuild generator
6846
#
@@ -83,26 +61,6 @@ extends:
8361
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
8462
eq(variables['isRollingBuild'], true))
8563

86-
#
87-
# Build with Debug config and Release runtimeConfiguration
88-
#
89-
- template: /eng/pipelines/common/platform-matrix.yml
90-
parameters:
91-
jobTemplate: /eng/pipelines/common/global-build-job.yml
92-
buildConfig: debug
93-
platforms:
94-
- linux_x64_dev_innerloop
95-
jobParameters:
96-
testGroup: innerloop
97-
nameSuffix: Runtime_Release
98-
buildArgs: -c debug -runtimeConfiguration release
99-
timeoutInMinutes: 120
100-
condition:
101-
or(
102-
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
103-
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
104-
eq(variables['isRollingBuild'], true))
105-
10664
#
10765
# Build with RuntimeFlavor only. This exercise code paths where only RuntimeFlavor is
10866
# specified. Catches cases where we depend on Configuration also being specified
@@ -124,38 +82,37 @@ extends:
12482
eq(variables['isRollingBuild'], true))
12583

12684
#
127-
# Build Mono + Libraries. This exercises the code path where we build libraries without
128-
# first building CoreCLR
85+
# Build Libraries AllConfigurations. This exercises the code path where we build libraries for all
86+
# configurations on a non Windows operating system.
12987
#
13088
- template: /eng/pipelines/common/platform-matrix.yml
13189
parameters:
13290
jobTemplate: /eng/pipelines/common/global-build-job.yml
13391
buildConfig: debug
13492
platforms:
135-
- windows_x64
93+
- linux_x64_dev_innerloop
13694
jobParameters:
137-
testGroup: innerloop
138-
nameSuffix: Mono_Libraries
139-
buildArgs: -subset mono+libs /p:RuntimeFlavor=Mono
95+
nameSuffix: Libraries_AllConfigurations
96+
buildArgs: -subset libs -allconfigurations
14097
timeoutInMinutes: 120
14198
condition:
14299
or(
143-
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_wasm.containsChange'], true),
100+
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
144101
eq(variables['isRollingBuild'], true))
145102

146103
#
147-
# Build Libraries AllConfigurations. This exercises the code path where we build libraries for all
148-
# configurations on a non Windows operating system.
104+
# Build native assets on Alpine. This exercises more modern musl libc changes that have a tendendy to break source-build.
105+
# We don't add this as a source-build job as the repo source-build infrastructure isn't set up to run on alpine effectively.
149106
#
150107
- template: /eng/pipelines/common/platform-matrix.yml
151108
parameters:
152109
jobTemplate: /eng/pipelines/common/global-build-job.yml
153-
buildConfig: debug
110+
buildConfig: release
154111
platforms:
155-
- linux_x64_dev_innerloop
112+
- linux_musl_x64_dev_innerloop
156113
jobParameters:
157-
nameSuffix: Libraries_AllConfigurations
158-
buildArgs: -subset libs -allconfigurations
114+
nameSuffix: Musl_Validation
115+
buildArgs: -subset clr.native+libs.native+host.native -c $(_BuildConfig)
159116
timeoutInMinutes: 120
160117
condition:
161118
or(

eng/pipelines/runtime.yml

+3
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ extends:
843843
scenarios:
844844
- WasmTestOnV8
845845
- WasmTestOnChrome
846+
- WasmTestOnFirefox
846847

847848
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
848849
parameters:
@@ -861,10 +862,12 @@ extends:
861862
#- browser_wasm_win
862863
nameSuffix: _Threading
863864
extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
865+
extraHelixArguments: /p:WasmEnableThreads=true
864866
alwaysRun: ${{ variables.isRollingBuild }}
865867
shouldRunSmokeOnly: onLibrariesAndIllinkChanges
866868
scenarios:
867869
- WasmTestOnChrome
870+
- WasmTestOnFirefox
868871
#- WasmTestOnNodeJS - this is not supported yet, https://github.com/dotnet/runtime/issues/85592
869872

870873
# EAT Library tests - only run on linux

eng/testing/BrowserVersions.props

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
<win_ChromeRevision>1250580</win_ChromeRevision>
99
<win_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1250586</win_ChromeBaseSnapshotUrl>
1010
<win_V8Version>12.3.219</win_V8Version>
11-
<linux_FirefoxRevision>124.0.2</linux_FirefoxRevision>
11+
<linux_FirefoxRevision>125.0.1</linux_FirefoxRevision>
1212
<linux_GeckoDriverRevision>0.34.0</linux_GeckoDriverRevision>
13+
<win_FirefoxRevision>125.0.1</win_FirefoxRevision>
14+
<win_GeckoDriverRevision>0.34.0</win_GeckoDriverRevision>
1315
</PropertyGroup>
1416
</Project>

eng/testing/WasmRunnerTemplate.cmd

+24-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ if [%XHARNESS_COMMAND%] == [] (
3030
if /I [%SCENARIO%]==[WasmTestOnChrome] (
3131
set XHARNESS_COMMAND=test-browser
3232
) else (
33-
set XHARNESS_COMMAND=test
33+
if /I [%SCENARIO%]==[WasmTestOnFirefox] (
34+
set XHARNESS_COMMAND=test-browser
35+
) else (
36+
set XHARNESS_COMMAND=test
37+
)
3438
)
3539
)
3640

@@ -56,11 +60,25 @@ if /I [%XHARNESS_COMMAND%] == [test] (
5660
)
5761
)
5862
) else (
59-
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
60-
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe"
61-
)
62-
if [%JS_ENGINE_ARGS%] == [] (
63-
set "JS_ENGINE_ARGS=--browser-arg^=--js-flags^=--stack-trace-limit^=1000"
63+
if /I [%SCENARIO%] == [WasmTestOnChrome] (
64+
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
65+
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe"
66+
)
67+
if [%JS_ENGINE_ARGS%] == [] (
68+
set "JS_ENGINE_ARGS=--browser-arg^=--js-flags^=--stack-trace-limit^=1000"
69+
)
70+
) else (
71+
if /I [%SCENARIO%] == [WasmTestOnFirefox] (
72+
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
73+
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\firefox\firefox.exe"
74+
)
75+
if [%JS_ENGINE%] == [] (
76+
set "JS_ENGINE=--browser^=Firefox"
77+
)
78+
if [%JS_ENGINE_ARGS%] == [] (
79+
set "JS_ENGINE_ARGS=--browser-arg^=-private-window"
80+
)
81+
)
6482
)
6583
)
6684

eng/testing/WasmRunnerTemplate.sh

+14-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ else
2626
fi
2727

2828
if [[ -z "$XHARNESS_COMMAND" ]]; then
29-
if [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
29+
if [[ "$SCENARIO" == "WasmTestOnFirefox" || "$SCENARIO" == "wasmtestonfirefox" ]]; then
30+
XHARNESS_COMMAND="test-browser"
31+
elif [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
3032
XHARNESS_COMMAND="test-browser"
3133
else
3234
XHARNESS_COMMAND="test"
@@ -59,8 +61,17 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then
5961
fi
6062
fi
6163
else
62-
if [[ -z "$JS_ENGINE_ARGS" ]]; then
63-
JS_ENGINE_ARGS="--browser-arg=--js-flags=--stack-trace-limit=1000"
64+
if [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
65+
if [[ -z "$JS_ENGINE_ARGS" ]]; then
66+
JS_ENGINE_ARGS="--browser-arg=--js-flags=--stack-trace-limit=1000"
67+
fi
68+
elif [[ "$SCENARIO" == "WasmTestOnFirefox" || "$SCENARIO" == "wasmtestonfirefox" ]]; then
69+
if [[ -z "$JS_ENGINE" ]]; then
70+
JS_ENGINE="--browser=Firefox"
71+
fi
72+
if [[ -z "$JS_ENGINE_ARGS" ]]; then
73+
JS_ENGINE_ARGS="--browser-arg=-private-window"
74+
fi
6475
fi
6576
fi
6677

eng/testing/scenarios/BuildWasmAppsJobsList.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Wasm.Build.NativeRebuild.Tests.NoopNativeRebuildTest
33
Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests
44
Wasm.Build.NativeRebuild.Tests.ReferenceNewAssemblyRebuildTest
55
Wasm.Build.NativeRebuild.Tests.SimpleSourceChangeRebuildTest
6-
Wasm.Build.Templates.Tests.InterpPgoTests
6+
Wasm.Build.Tests.TestAppScenarios.InterpPgoTests
77
Wasm.Build.Templates.Tests.NativeBuildTests
88
Wasm.Build.Tests.Blazor.AppsettingsTests
99
Wasm.Build.Tests.Blazor.BuildPublishTests

eng/testing/tests.browser.targets

+9
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,18 @@
250250
<_NodeNpmModuleStringTrimmed Include="@(_NodeNpmModuleString->Trim(':'))" />
251251
</ItemGroup>
252252
<PropertyGroup>
253+
<Scenario Condition="'$(Scenario)' == ''">WasmTestOnV8</Scenario>
253254
<NodeNpmModuleString>@(_NodeNpmModuleStringTrimmed, ',')</NodeNpmModuleString>
254255
</PropertyGroup>
255256

257+
<Error Condition="'$(Scenario)' != 'WasmTestOnV8' and
258+
'$(Scenario)' != 'WasmTestOnChrome' and
259+
'$(Scenario)' != 'WasmTestOnFirefox' and
260+
'$(Scenario)' != 'WasmTestOnNodeJS' and
261+
'$(Scenario)' != 'WasmDebuggerTests' and
262+
'$(Scenario)' != 'BuildWasmApps'"
263+
Text="Only supported scenarios are WasmTestOnV8, WasmTestOnNodeJS, WasmTestOnChrome, WasmTestOnFirefox, WasmDebuggerTests and BuildWasmApps at the moment. It was $(Scenario)." />
264+
256265
<!-- Restore NPM packages -->
257266
<ItemGroup Condition="'$(OS)' != 'Windows_NT'">
258267
<SetScriptCommands Include="if [[ &quot;$SCENARIO&quot; == &quot;WasmTestOnNodeJS&quot; || &quot;$SCENARIO&quot; == &quot;wasmtestonnodejs&quot; ]]; then export WasmXHarnessMonoArgs=&quot;$WasmXHarnessMonoArgs --setenv=NPM_MODULES=$(NodeNpmModuleString)&quot;; fi" />

eng/testing/tests.wasi.targets

+8-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<_XHarnessArgs Condition="'$(IsFunctionalTest)' == 'true'" >$(_XHarnessArgs) --expected-exit-code=$(ExpectedExitCode)</_XHarnessArgs>
4747
<_XHarnessArgs Condition="'$(WasmXHarnessArgs)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgs)</_XHarnessArgs>
4848
<_XHarnessArgs Condition="'$(WasmXHarnessTestsTimeout)' != ''" >$(_XHarnessArgs) &quot;--timeout=$(WasmXHarnessTestsTimeout)&quot;</_XHarnessArgs>
49-
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=--max-wasm-stack=134217728</_XHarnessArgs>
49+
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=-W --engine-arg=max-wasm-stack=134217728</_XHarnessArgs>
5050
<_XHarnessArgs Condition="'$(WasmXHarnessArgsCli)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgsCli)</_XHarnessArgs>
5151

5252
<_InvariantGlobalization Condition="'$(InvariantGlobalization)' == 'true'">--env=DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true</_InvariantGlobalization>
@@ -147,6 +147,13 @@
147147
</Target>
148148

149149
<Target Name="_WasiAddToRunScript" BeforeTargets="GenerateRunScript">
150+
<PropertyGroup>
151+
<Scenario Condition="'$(Scenario)' == ''">WasmTestOnWasmtime</Scenario>
152+
</PropertyGroup>
153+
<Error Condition="'$(Scenario)' != 'WasmTestOnWasmtime' and
154+
'$(Scenario)' != 'BuildWasmApps'"
155+
Text="Only supported scenarios are WasmTestOnWasmtime and BuildWasmApps at the moment. It was $(Scenario)." />
156+
150157
<ItemGroup Condition="'$(OS)' != 'Windows_NT'">
151158
<SetScriptCommands Condition="'$(InstallWasmtimeForTests)' == 'true' and Exists($(WasmtimeDir))" Include="export PREPEND_PATH=$(WasmtimeDir)" />
152159
<SetScriptCommands Condition="'$(IsWasiProject)' == 'true'" Include="export RuntimeIdentifier=wasi-wasm" />

0 commit comments

Comments
 (0)