Skip to content

Commit 8dda604

Browse files
authored
[browser] rename normal scenario to WasmTestOnV8 (#101226)
1 parent 588b775 commit 8dda604

File tree

11 files changed

+42
-19
lines changed

11 files changed

+42
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
3333
scenarios:
3434
- ${{ if eq(platform, 'browser_wasm') }}:
35-
- normal
35+
- WasmTestOnV8
3636
- ${{ if eq(platform, 'browser_wasm_win') }}:
3737
- WasmTestOnChrome
3838
- ${{ if or(eq(platform, 'wasi_wasm_win'), eq(platform, 'wasi_wasm')) }}:

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parameters:
66
isWasmOnlyBuild: false
77
nameSuffix: ''
88
platforms: []
9-
scenarios: ['normal']
9+
scenarios: ['WasmTestOnV8']
1010
shouldContinueOnError: false
1111
shouldRunSmokeOnly: false
1212

@@ -65,8 +65,13 @@ jobs:
6565
value: /p:InstallChromeForTests=true
6666
${{ else }}:
6767
value: ''
68+
- name: firefoxInstallArg
69+
${{ if containsValue(parameters.scenarios, 'WasmTestOnFirefox') }}:
70+
value: /p:InstallFirefoxForTests=true
71+
${{ else }}:
72+
value: ''
6873
- name: v8InstallArg
69-
${{ if containsValue(parameters.scenarios, 'normal') }}:
74+
${{ if containsValue(parameters.scenarios, 'WasmTestOnV8') }}:
7075
value: /p:InstallV8ForTests=true
7176
${{ else }}:
7277
value: ''
@@ -75,7 +80,7 @@ jobs:
7580
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
7681
testGroup: innerloop
7782
nameSuffix: LibraryTests${{ parameters.nameSuffix }}
78-
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoEnableAssertMessages=true /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) $(v8InstallArg) ${{ parameters.extraBuildArgs }}
83+
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoEnableAssertMessages=true /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) $(firefoxInstallArg) $(v8InstallArg) ${{ parameters.extraBuildArgs }}
7984
timeoutInMinutes: 240
8085
# if !alwaysRun, then:
8186
# if this is runtime-wasm (isWasmOnlyBuild):

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
9090
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
9191
scenarios:
92-
- normal
92+
- WasmTestOnV8
9393
- WasmTestOnChrome
9494

9595
# this only runs on the extra pipeline
@@ -183,7 +183,7 @@ jobs:
183183
shouldContinueOnError: ${{ not(parameters.isWasmOnlyBuild) }}
184184
alwaysRun: ${{ variables.isRollingBuild }}
185185
scenarios:
186-
- normal
186+
- WasmTestOnV8
187187

188188
# Hybrid Globalization tests
189189
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
@@ -197,7 +197,7 @@ jobs:
197197
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
198198
alwaysRun: true
199199
scenarios:
200-
- normal
200+
- WasmTestOnV8
201201
- WasmTestOnChrome
202202
- WasmTestOnNodeJS
203203

@@ -214,7 +214,7 @@ jobs:
214214
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
215215
alwaysRun: true
216216
scenarios:
217-
- normal
217+
- WasmTestOnV8
218218
- WasmTestOnChrome
219219
- WasmTestOnNodeJS
220220

@@ -321,4 +321,4 @@ jobs:
321321
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
322322
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
323323
scenarios:
324-
- normal
324+
- WasmTestOnV8

eng/pipelines/libraries/outerloop-mono.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extends:
6565
- template: /eng/pipelines/libraries/helix.yml
6666
parameters:
6767
scenarios:
68-
- normal
68+
- WasmTestOnV8
6969
testScope: outerloop
7070
creator: dotnet-bot
7171
testRunNamePrefixSuffix: Mono_$(_BuildConfig)

eng/pipelines/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ extends:
823823
alwaysRun: ${{ variables.isRollingBuild }}
824824
extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
825825
scenarios:
826-
- normal
826+
- WasmTestOnV8
827827
- WasmTestOnChrome
828828

829829
- template: /eng/pipelines/common/templates/wasm-library-tests.yml

src/libraries/Common/tests/System/Net/Prerequisites/LocalEchoServer.helix.targets

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<Project>
22
<PropertyGroup Condition="'$(IsRunningLibraryTests)' == 'true' and
3-
('$(Scenario)' == '' or '$(Scenario)' == 'normal' or
4-
'$(Scenario)' == 'WasmTestOnChrome' or '$(Scenario)' == 'WasmTestOnNodeJS')">
3+
('$(Scenario)' == 'WasmTestOnV8' or
4+
'$(Scenario)' == 'WasmTestOnChrome' or
5+
'$(Scenario)' == 'WasmTestOnFirefox' or
6+
'$(Scenario)' == 'WasmTestOnNodeJS')">
57

68
<HelixExtensionTargets>$(HelixExtensionTargets);_AddMiddlewarePayload</HelixExtensionTargets>
79
<TestEchoMiddleware>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(Configuration)', '$(AspNetCoreAppCurrent)'))</TestEchoMiddleware>

src/libraries/sendtohelix-browser.targets

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@
3232

3333
<PropertyGroup>
3434
<_ShippingPackagesPath>$([MSBuild]::NormalizeDirectory($(ArtifactsDir), 'packages', $(Configuration), 'Shipping'))</_ShippingPackagesPath>
35-
<WorkItemPrefix Condition="'$(WorkItemPrefix)' == '' and '$(Scenario)' != ''">$(Scenario)-</WorkItemPrefix>
35+
<WorkItemPrefix Condition="'$(WorkItemPrefix)' == ''">$(Scenario)-</WorkItemPrefix>
3636

3737
<IsWasmDebuggerTests Condition="'$(Scenario)' == 'WasmDebuggerTests'">true</IsWasmDebuggerTests>
38-
<IsRunningLibraryTests Condition="'$(Scenario)' == 'normal' or '$(Scenario)' == 'WasmTestOnChrome' or '$(Scenario)' == 'WasmTestOnNodeJS'">true</IsRunningLibraryTests>
38+
<IsRunningLibraryTests Condition="'$(Scenario)' == 'WasmTestOnV8' or
39+
'$(Scenario)' == 'WasmTestOnChrome' or
40+
'$(Scenario)' == 'WasmTestOnFirefox' or
41+
'$(Scenario)' == 'WasmTestOnNodeJS'">true</IsRunningLibraryTests>
3942

4043
<HelixExtensionTargets />
4144
<PrepareForBuildHelixWorkItems_WasmDependsOn>
@@ -92,8 +95,9 @@
9295

9396
<ItemGroup Condition="'$(WindowsShell)' != 'true'">
9497
<HelixPreCommand Condition="'$(Scenario)' != ''" Include="export SCENARIO=$(Scenario)" />
95-
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnChrome'" Include="export XHARNESS_COMMAND=test" />
98+
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnChrome' and '$(Scenario)' != 'WasmTestOnFirefox'" Include="export XHARNESS_COMMAND=test" />
9699
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnChrome'" Include="export XHARNESS_COMMAND=test-browser" />
100+
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnFirefox'" Include="export XHARNESS_COMMAND=&quot;test-browser --browser=Firefox&quot;" />
97101
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnNodeJS'" Include="export JS_ENGINE=--engine=NodeJS" />
98102

99103
<HelixPreCommand Include="export XHARNESS_DISABLE_COLORED_OUTPUT=true" />
@@ -108,8 +112,9 @@
108112

109113
<ItemGroup Condition="'$(WindowsShell)' == 'true'">
110114
<HelixPreCommand Condition="'$(Scenario)' != ''" Include="set SCENARIO=$(Scenario)" />
111-
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnChrome'" Include="set XHARNESS_COMMAND=test" />
115+
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnChrome' and '$(Scenario)' != 'WasmTestOnFirefox'" Include="set XHARNESS_COMMAND=test" />
112116
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnChrome'" Include="set XHARNESS_COMMAND=test-browser" />
117+
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnFirefox'" Include="set &quot;XHARNESS_COMMAND=test-browser --browser=Firefox&quot;" />
113118
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnNodeJS'" Include="set &quot;JS_ENGINE=--engine^=NodeJS&quot;" />
114119

115120
<HelixPreCommand Include="set XHARNESS_DISABLE_COLORED_OUTPUT=true" />
@@ -177,6 +182,7 @@
177182
<Import Project="$(RepositoryEngineeringDir)testing\wasm-provisioning.targets" />
178183

179184
<Target Name="PrepareHelixCorrelationPayload_Wasm">
185+
<Error Condition="'$(Scenario)' == '' or '$(Scenario)' == 'normal'" Text="Only supported scenarios are WasmTestOnV8, WasmTestOnNodeJS, WasmTestOnChrome, WasmTestOnFirefox, WasmDebuggerTests and BuildWasmApps at the moment." />
180186
<Message Condition="'$(NeedsEMSDK)' == 'true' or '$(NeedsEMSDKNode)' == 'true'" Importance="High" Text="Using emsdk: $(EmSdkDirForHelixPayload)" />
181187

182188
<Error Condition="'$(NeedsToRunOnChrome)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDir))"
@@ -229,6 +235,8 @@
229235
<_WasmWorkItem Include="$(TestArchiveRoot)browseronly/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnChrome'" />
230236
<_WasmWorkItem Include="$(TestArchiveRoot)chromeonly/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnChrome'" />
231237
<_WasmWorkItem Include="$(TestArchiveRoot)browserornodejs/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnChrome'" />
238+
<_WasmWorkItem Include="$(TestArchiveRoot)browseronly/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnFirefox'" />
239+
<_WasmWorkItem Include="$(TestArchiveRoot)browserornodejs/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnFirefox'" />
232240
<_WasmWorkItem Include="$(TestArchiveRoot)browserornodejs/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnNodeJS'" />
233241
<_WasmWorkItem Include="$(TestArchiveRoot)nodejsonly/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnNodeJS'" />
234242

@@ -249,9 +257,10 @@
249257

250258
<!-- Create work items for run-only WASM sample apps -->
251259
<ItemGroup>
252-
<_WasmSampleZipFile Condition="'$(Scenario)' == 'normal' or '$(Scenario)' == ''" Include="$(TestArchiveRoot)runonly/**/*.Console.V8.*.Sample.zip" />
260+
<_WasmSampleZipFile Condition="'$(Scenario)' == 'WasmTestOnV8'" Include="$(TestArchiveRoot)runonly/**/*.Console.V8.*.Sample.zip" />
253261
<_WasmSampleZipFile Condition="'$(Scenario)' == 'WasmTestOnNodeJS'" Include="$(TestArchiveRoot)runonly/**/*.Console.Node.*.Sample.zip" />
254262
<_WasmSampleZipFile Condition="'$(Scenario)' == 'WasmTestOnChrome'" Include="$(TestArchiveRoot)runonly/**/*.Browser.*.Sample.zip" />
263+
<_WasmSampleZipFile Condition="'$(Scenario)' == 'WasmTestOnFirefox'" Include="$(TestArchiveRoot)runonly/**/*.Browser.*.Sample.zip" />
255264

256265
<HelixWorkItem Include="@(_WasmSampleZipFile -> '%(FileName)')">
257266
<PayloadArchive>%(Identity)</PayloadArchive>

src/mono/sample/wasi/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
99
-->
1010
<TestArchiveTestsRoot>$(TestArchiveRoot)wasmtimeonly/</TestArchiveTestsRoot>
11+
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
1112
</PropertyGroup>
1213

1314
<Import Project="..\Directory.Build.props"/>

src/mono/sample/wasm/DefaultBrowserSample.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<RunScriptCommand>$(ExecXHarnessCmd) wasm test-browser --app=. --browser=Chrome $(XHarnessBrowserPathArg) $(WasmXHarnessArgs) --html-file=index.html --output-directory=$(XHarnessOutput) -- $(MSBuildProjectName).dll</RunScriptCommand>
1111
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
1212
<TestArchiveTestsRoot>$(TestArchiveRoot)chromeonly/</TestArchiveTestsRoot>
13+
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
1314
</PropertyGroup>
1415

1516
<ItemGroup>

src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<!-- '/.dockerenv' - is to check if this is running in a codespace -->
2020
<!-- taken from tests.browser.targets -->
2121
<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and ('$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv'))">true</InstallChromeForTests>
22+
<InstallFirefoxForTests Condition="'$(InstallFirefoxForTests)' == '' and ('$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv'))">true</InstallFirefoxForTests>
2223
<InstallV8ForTests Condition="'$(InstallV8ForTests)' == '' and ('$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv'))">true</InstallV8ForTests>
2324

2425
<!-- don't run any wasm build steps -->
@@ -35,6 +36,9 @@
3536
<_WasmFirefoxPathForTests Condition="'$(FIREFOX_PATH_FOR_TESTS)' != ''">$(FIREFOX_PATH_FOR_TESTS)</_WasmFirefoxPathForTests>
3637
<_WasmFirefoxPathForTests Condition="'$(_WasmFirefoxPathForTests)' == '' and '$(InstallFirefoxForTests)' == 'true'">$(FirefoxBinaryPath)</_WasmFirefoxPathForTests>
3738

39+
<_WasmFirefoxPathForTests Condition="'$(FIREFOX_PATH_FOR_TESTS)' != ''">$(FIREFOX_PATH_FOR_TESTS)</_WasmFirefoxPathForTests>
40+
<_WasmFirefoxPathForTests Condition="'$(_WasmFirefoxPathForTests)' == '' and '$(InstallFirefoxForTests)' == 'true'">$(FirefoxBinaryPath)</_WasmFirefoxPathForTests>
41+
3842
<RunScriptInputName Condition="'$(OS)' == 'Windows_NT'">RunScriptTemplate.cmd</RunScriptInputName>
3943
<RunScriptInputName Condition="'$(OS)' != 'Windows_NT'">RunScriptTemplate.sh</RunScriptInputName>
4044

@@ -63,6 +67,7 @@
6367
<SetScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
6468
<SetScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
6569
</ItemGroup>
70+
6671
<ItemGroup Condition="'$(TestUsingWorkloads)' == 'true'">
6772
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export WORKLOAD_PACKS_VER=$(PackageVersionForWorkloadManifests)" />
6873
<RunScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set WORKLOAD_PACKS_VER=$(PackageVersionForWorkloadManifests)" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void RunOutOfAppBundle(BuildArgs buildArgs, RunHost host, string id)
4141
indexHtmlPath = Path.Combine(outerDir, "index.html");
4242
if (!File.Exists(indexHtmlPath))
4343
{
44-
var html = @"<html><body><script type=""module"" src=""./AppBundle/test-main.js""></script></body></html>";
44+
var html = @"<!DOCTYPE html><html><body><script type=""module"" src=""./AppBundle/test-main.js""></script></body></html>";
4545
File.WriteAllText(indexHtmlPath, html);
4646
}
4747
}

0 commit comments

Comments
 (0)