Skip to content

[browser] rename normal scenario to WasmTestOnV8 #101226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
scenarios:
- ${{ if eq(platform, 'browser_wasm') }}:
- normal
- WasmTestOnV8
- ${{ if eq(platform, 'browser_wasm_win') }}:
- WasmTestOnChrome
- ${{ if or(eq(platform, 'wasi_wasm_win'), eq(platform, 'wasi_wasm')) }}:
Expand Down
11 changes: 8 additions & 3 deletions eng/pipelines/common/templates/wasm-library-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ parameters:
isWasmOnlyBuild: false
nameSuffix: ''
platforms: []
scenarios: ['normal']
scenarios: ['WasmTestOnV8']
shouldContinueOnError: false
shouldRunSmokeOnly: false

Expand Down Expand Up @@ -65,8 +65,13 @@ jobs:
value: /p:InstallChromeForTests=true
${{ else }}:
value: ''
- name: firefoxInstallArg
${{ if containsValue(parameters.scenarios, 'WasmTestOnFirefox') }}:
value: /p:InstallFirefoxForTests=true
${{ else }}:
value: ''
- name: v8InstallArg
${{ if containsValue(parameters.scenarios, 'normal') }}:
${{ if containsValue(parameters.scenarios, 'WasmTestOnV8') }}:
value: /p:InstallV8ForTests=true
${{ else }}:
value: ''
Expand All @@ -75,7 +80,7 @@ jobs:
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
testGroup: innerloop
nameSuffix: LibraryTests${{ parameters.nameSuffix }}
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoEnableAssertMessages=true /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) $(v8InstallArg) ${{ parameters.extraBuildArgs }}
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 }}
timeoutInMinutes: 240
# if !alwaysRun, then:
# if this is runtime-wasm (isWasmOnlyBuild):
Expand Down
10 changes: 5 additions & 5 deletions eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
scenarios:
- normal
- WasmTestOnV8
- WasmTestOnChrome

# this only runs on the extra pipeline
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
shouldContinueOnError: ${{ not(parameters.isWasmOnlyBuild) }}
alwaysRun: ${{ variables.isRollingBuild }}
scenarios:
- normal
- WasmTestOnV8

# Hybrid Globalization tests
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
Expand All @@ -197,7 +197,7 @@ jobs:
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
alwaysRun: true
scenarios:
- normal
- WasmTestOnV8
- WasmTestOnChrome
- WasmTestOnNodeJS

Expand All @@ -214,7 +214,7 @@ jobs:
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
alwaysRun: true
scenarios:
- normal
- WasmTestOnV8
- WasmTestOnChrome
- WasmTestOnNodeJS

Expand Down Expand Up @@ -321,4 +321,4 @@ jobs:
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
scenarios:
- normal
- WasmTestOnV8
2 changes: 1 addition & 1 deletion eng/pipelines/libraries/outerloop-mono.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extends:
- template: /eng/pipelines/libraries/helix.yml
parameters:
scenarios:
- normal
- WasmTestOnV8
testScope: outerloop
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
2 changes: 1 addition & 1 deletion eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ extends:
alwaysRun: ${{ variables.isRollingBuild }}
extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
scenarios:
- normal
- WasmTestOnV8
- WasmTestOnChrome

- template: /eng/pipelines/common/templates/wasm-library-tests.yml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Project>
<PropertyGroup Condition="'$(IsRunningLibraryTests)' == 'true' and
('$(Scenario)' == '' or '$(Scenario)' == 'normal' or
'$(Scenario)' == 'WasmTestOnChrome' or '$(Scenario)' == 'WasmTestOnNodeJS')">
('$(Scenario)' == 'WasmTestOnV8' or
'$(Scenario)' == 'WasmTestOnChrome' or
'$(Scenario)' == 'WasmTestOnFirefox' or
'$(Scenario)' == 'WasmTestOnNodeJS')">

<HelixExtensionTargets>$(HelixExtensionTargets);_AddMiddlewarePayload</HelixExtensionTargets>
<TestEchoMiddleware>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(Configuration)', '$(AspNetCoreAppCurrent)'))</TestEchoMiddleware>
Expand Down
19 changes: 14 additions & 5 deletions src/libraries/sendtohelix-browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@

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

<IsWasmDebuggerTests Condition="'$(Scenario)' == 'WasmDebuggerTests'">true</IsWasmDebuggerTests>
<IsRunningLibraryTests Condition="'$(Scenario)' == 'normal' or '$(Scenario)' == 'WasmTestOnChrome' or '$(Scenario)' == 'WasmTestOnNodeJS'">true</IsRunningLibraryTests>
<IsRunningLibraryTests Condition="'$(Scenario)' == 'WasmTestOnV8' or
'$(Scenario)' == 'WasmTestOnChrome' or
'$(Scenario)' == 'WasmTestOnFirefox' or
'$(Scenario)' == 'WasmTestOnNodeJS'">true</IsRunningLibraryTests>

<HelixExtensionTargets />
<PrepareForBuildHelixWorkItems_WasmDependsOn>
Expand Down Expand Up @@ -92,8 +95,9 @@

<ItemGroup Condition="'$(WindowsShell)' != 'true'">
<HelixPreCommand Condition="'$(Scenario)' != ''" Include="export SCENARIO=$(Scenario)" />
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnChrome'" Include="export XHARNESS_COMMAND=test" />
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnChrome' and '$(Scenario)' != 'WasmTestOnFirefox'" Include="export XHARNESS_COMMAND=test" />
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnChrome'" Include="export XHARNESS_COMMAND=test-browser" />
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnFirefox'" Include="export XHARNESS_COMMAND=&quot;test-browser --browser=Firefox&quot;" />
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnNodeJS'" Include="export JS_ENGINE=--engine=NodeJS" />

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

<ItemGroup Condition="'$(WindowsShell)' == 'true'">
<HelixPreCommand Condition="'$(Scenario)' != ''" Include="set SCENARIO=$(Scenario)" />
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnChrome'" Include="set XHARNESS_COMMAND=test" />
<HelixPreCommand Condition="'$(Scenario)' != 'WasmTestOnChrome' and '$(Scenario)' != 'WasmTestOnFirefox'" Include="set XHARNESS_COMMAND=test" />
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnChrome'" Include="set XHARNESS_COMMAND=test-browser" />
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnFirefox'" Include="set &quot;XHARNESS_COMMAND=test-browser --browser=Firefox&quot;" />
<HelixPreCommand Condition="'$(Scenario)' == 'WasmTestOnNodeJS'" Include="set &quot;JS_ENGINE=--engine^=NodeJS&quot;" />

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

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

<Error Condition="'$(NeedsToRunOnChrome)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDir))"
Expand Down Expand Up @@ -229,6 +235,8 @@
<_WasmWorkItem Include="$(TestArchiveRoot)browseronly/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnChrome'" />
<_WasmWorkItem Include="$(TestArchiveRoot)chromeonly/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnChrome'" />
<_WasmWorkItem Include="$(TestArchiveRoot)browserornodejs/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnChrome'" />
<_WasmWorkItem Include="$(TestArchiveRoot)browseronly/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnFirefox'" />
<_WasmWorkItem Include="$(TestArchiveRoot)browserornodejs/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnFirefox'" />
<_WasmWorkItem Include="$(TestArchiveRoot)browserornodejs/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnNodeJS'" />
<_WasmWorkItem Include="$(TestArchiveRoot)nodejsonly/**/*.zip" Condition="'$(Scenario)' == 'WasmTestOnNodeJS'" />

Expand All @@ -249,9 +257,10 @@

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

<HelixWorkItem Include="@(_WasmSampleZipFile -> '%(FileName)')">
<PayloadArchive>%(Identity)</PayloadArchive>
Expand Down
1 change: 1 addition & 0 deletions src/mono/sample/wasi/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
-->
<TestArchiveTestsRoot>$(TestArchiveRoot)wasmtimeonly/</TestArchiveTestsRoot>
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
</PropertyGroup>

<Import Project="..\Directory.Build.props"/>
Expand Down
1 change: 1 addition & 0 deletions src/mono/sample/wasm/DefaultBrowserSample.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<RunScriptCommand>$(ExecXHarnessCmd) wasm test-browser --app=. --browser=Chrome $(XHarnessBrowserPathArg) $(WasmXHarnessArgs) --html-file=index.html --output-directory=$(XHarnessOutput) -- $(MSBuildProjectName).dll</RunScriptCommand>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<TestArchiveTestsRoot>$(TestArchiveRoot)chromeonly/</TestArchiveTestsRoot>
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<!-- '/.dockerenv' - is to check if this is running in a codespace -->
<!-- taken from tests.browser.targets -->
<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and ('$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv'))">true</InstallChromeForTests>
<InstallFirefoxForTests Condition="'$(InstallFirefoxForTests)' == '' and ('$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv'))">true</InstallFirefoxForTests>
<InstallV8ForTests Condition="'$(InstallV8ForTests)' == '' and ('$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv'))">true</InstallV8ForTests>

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

<_WasmFirefoxPathForTests Condition="'$(FIREFOX_PATH_FOR_TESTS)' != ''">$(FIREFOX_PATH_FOR_TESTS)</_WasmFirefoxPathForTests>
<_WasmFirefoxPathForTests Condition="'$(_WasmFirefoxPathForTests)' == '' and '$(InstallFirefoxForTests)' == 'true'">$(FirefoxBinaryPath)</_WasmFirefoxPathForTests>

<RunScriptInputName Condition="'$(OS)' == 'Windows_NT'">RunScriptTemplate.cmd</RunScriptInputName>
<RunScriptInputName Condition="'$(OS)' != 'Windows_NT'">RunScriptTemplate.sh</RunScriptInputName>

Expand Down Expand Up @@ -63,6 +67,7 @@
<SetScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
<SetScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
</ItemGroup>

<ItemGroup Condition="'$(TestUsingWorkloads)' == 'true'">
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export WORKLOAD_PACKS_VER=$(PackageVersionForWorkloadManifests)" />
<RunScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set WORKLOAD_PACKS_VER=$(PackageVersionForWorkloadManifests)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void RunOutOfAppBundle(BuildArgs buildArgs, RunHost host, string id)
indexHtmlPath = Path.Combine(outerDir, "index.html");
if (!File.Exists(indexHtmlPath))
{
var html = @"<html><body><script type=""module"" src=""./AppBundle/test-main.js""></script></body></html>";
var html = @"<!DOCTYPE html><html><body><script type=""module"" src=""./AppBundle/test-main.js""></script></body></html>";
File.WriteAllText(indexHtmlPath, html);
}
}
Expand Down
Loading