Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara committed Apr 11, 2024
1 parent 93010da commit ec42368
Show file tree
Hide file tree
Showing 29 changed files with 179 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
targetRid: ''
testRunNamePrefixSuffix: ''
testScope: 'innerloop' # innerloop | outerloop | all
scenarios: ['normal']
scenarios: ['WasmTestOnV8']

steps:
- ${{ if ne(parameters.additionalSteps, '') }}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ parameters:
runtimeVariant: 'monointerpreter'
llvmAotStepContainer: ''
scenarios:
- normal
- WasmTestOnV8
variables: {}
pool: ''
dependsOn: []
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/common/templates/runtimes/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,13 @@ jobs:
${{ if eq(parameters.runtimeFlavor, 'mono') }}:
# tiered compilation isn't done on mono yet
scenarios:
- normal
- WasmTestOnV8
${{ elseif eq(variables['Build.Reason'], 'PullRequest') }}:
scenarios:
- no_tiered_compilation
${{ else }}:
scenarios:
- normal
- WasmTestOnV8
- no_tiered_compilation

${{ if in(parameters.testGroup, 'jitstress') }}:
Expand Down Expand Up @@ -516,11 +516,11 @@ jobs:
${{ if in(parameters.testGroup, 'gc-longrunning') }}:
longRunningGcTests: true
scenarios:
- normal
- WasmTestOnV8
${{ if in(parameters.testGroup, 'gc-simulator') }}:
gcSimulatorTests: true
scenarios:
- normal
- WasmTestOnV8
${{ if in(parameters.testGroup, 'gc-standalone') }}:
scenarios:
- gcstandalone
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/templates/wasm-library-aot-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
scenarios:
- ${{ if eq(platform, 'browser_wasm_win') }}:
- WasmTestOnBrowser
- WasmTestOnChrome
- ${{ if ne(platform, 'browser_wasm_win') }}:
- normal
- WasmTestOnV8
13 changes: 9 additions & 4 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 @@ -61,12 +61,17 @@ jobs:
- name: _wasmRunSmokeTestsOnlyArg
value: /p:RunSmokeTestsOnly=$(shouldRunSmokeOnlyVar)
- name: chromeInstallArg
${{ if containsValue(parameters.scenarios, 'wasmtestonbrowser') }}:
${{ if containsValue(parameters.scenarios, 'WasmTestOnChrome') }}:
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:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) $(v8InstallArg) ${{ parameters.extraBuildArgs }}
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) $(firefoxInstallArg) $(v8InstallArg) ${{ parameters.extraBuildArgs }}
timeoutInMinutes: 240
# if !alwaysRun, then:
# if this is runtime-wasm (isWasmOnlyBuild):
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/superpmi-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ extends:
dependsOnTestBuildConfiguration: Release
dependsOnTestArchitecture: x64
scenarios:
- normal
- WasmTestOnV8
SuperPmiCollect: true
SuperPmiCollectionName: libraries_tests
unifiedArtifactsName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked
Expand Down
19 changes: 10 additions & 9 deletions eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ jobs:
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
scenarios:
- normal
- WasmTestOnBrowser
- WasmTestOnV8
- WasmTestOnChrome

# this only runs on the extra pipeline
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
Expand All @@ -114,7 +114,7 @@ jobs:
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
scenarios:
- WasmTestOnBrowser
- WasmTestOnChrome
- WasmTestOnNodeJS

# EAT Library tests - only run on linux
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,8 +197,9 @@ jobs:
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
alwaysRun: true
scenarios:
- normal
- WasmTestOnBrowser
- WasmTestOnV8
- WasmTestOnChrome
- WasmTestOnFirefox
- WasmTestOnNodeJS

# Hybrid Globalization AOT tests
Expand All @@ -214,8 +215,8 @@ jobs:
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
alwaysRun: true
scenarios:
- normal
- WasmTestOnBrowser
- WasmTestOnV8
- WasmTestOnChrome
- WasmTestOnNodeJS

- ${{ if and(ne(parameters.isRollingBuild, true), ne(parameters.excludeNonLibTests, true), ne(parameters.debuggerTestsOnly, true)) }}:
Expand Down Expand Up @@ -321,4 +322,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)
6 changes: 3 additions & 3 deletions eng/pipelines/runtime-sanitized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extends:
creator: dotnet-bot
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
scenarios:
- normal
- WasmTestOnV8
- no_tiered_compilation
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
Expand Down Expand Up @@ -80,7 +80,7 @@ extends:
creator: dotnet-bot
testRunNamePrefixSuffix: Libraries_$(_BuildConfig)
scenarios:
- normal
- WasmTestOnV8

#
# Build the whole product with CoreCLR and run libraries tests with AddressSanitizer
Expand Down Expand Up @@ -112,7 +112,7 @@ extends:
creator: dotnet-bot
testRunNamePrefixSuffix: Libraries_$(_BuildConfig)
scenarios:
- normal
- WasmTestOnV8

#
# NativeAOT release build and smoke tests with AddressSanitizer
Expand Down
12 changes: 7 additions & 5 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -823,8 +823,9 @@ extends:
alwaysRun: ${{ variables.isRollingBuild }}
extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
scenarios:
- normal
- WasmTestOnBrowser
- WasmTestOnV8
- WasmTestOnChrome
- WasmTestOnFirefox

- template: /eng/pipelines/common/templates/wasm-library-tests.yml
parameters:
Expand All @@ -833,7 +834,7 @@ extends:
alwaysRun: ${{ variables.isRollingBuild }}
extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
scenarios:
- WasmTestOnBrowser
- WasmTestOnChrome

# Library tests with full threading
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
Expand All @@ -846,7 +847,8 @@ extends:
alwaysRun: ${{ variables.isRollingBuild }}
shouldRunSmokeOnly: onLibrariesAndIllinkChanges
scenarios:
- WasmTestOnBrowser
- WasmTestOnChrome
- WasmTestOnFirefox
#- WasmTestOnNodeJS - this is not supported yet, https://github.com/dotnet/runtime/issues/85592

# EAT Library tests - only run on linux
Expand Down Expand Up @@ -935,7 +937,7 @@ extends:
shouldRunSmokeOnly: true
alwaysRun: ${{ variables.isRollingBuild }}
scenarios:
- normal
- WasmTestOnV8

- template: /eng/pipelines/common/templates/simple-wasm-build-tests.yml
parameters:
Expand Down
2 changes: 2 additions & 0 deletions eng/testing/ChromeVersions.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
<win_ChromeRevision>1250580</win_ChromeRevision>
<win_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1250586</win_ChromeBaseSnapshotUrl>
<win_V8Version>12.3.219</win_V8Version>
<linux_FirefoxRevision>124.0.2</FirefoxRevision>
<linux_GeckoDriverRevision>0.34.0</GeckoDriverRevision>
</PropertyGroup>
</Project>
4 changes: 3 additions & 1 deletion eng/testing/WasmRunnerAOTTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ else
fi

if [[ -z "$XHARNESS_COMMAND" ]]; then
if [[ "$SCENARIO" == "WasmTestOnBrowser" || "$SCENARIO" == "wasmtestonbrowser" ]]; then
if [[ "$SCENARIO" == "WasmTestOnFirefox" || "$SCENARIO" == "wasmtestonfirefox" ]]; then
XHARNESS_COMMAND="test-browser --browser=Firefox"
elif [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
XHARNESS_COMMAND="test-browser"
else
XHARNESS_COMMAND="test"
Expand Down
14 changes: 10 additions & 4 deletions eng/testing/WasmRunnerTemplate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ if [%XHARNESS_CLI_PATH%] NEQ [] (
)

if [%XHARNESS_COMMAND%] == [] (
if /I [%SCENARIO%]==[WasmTestOnBrowser] (
if /I [%SCENARIO%]==[WasmTestOnChrome] (
set XHARNESS_COMMAND=test-browser
) else (
set XHARNESS_COMMAND=test
if /I [%SCENARIO%]==[WasmTestOnFirefox] (
set "XHARNESS_COMMAND=test-browser --browser=Firefox"
) else (
set XHARNESS_COMMAND=test
)
)
)

Expand All @@ -56,8 +60,10 @@ if /I [%XHARNESS_COMMAND%] == [test] (
)
)
) else (
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe"
if /I [%SCENARIO%] == [WasmTestOnChrome] (
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe"
)
)
if [%JS_ENGINE_ARGS%] == [] (
set "JS_ENGINE_ARGS=--browser-arg^=--js-flags^=--stack-trace-limit^=1000"
Expand Down
4 changes: 3 additions & 1 deletion eng/testing/WasmRunnerTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ else
fi

if [[ -z "$XHARNESS_COMMAND" ]]; then
if [[ "$SCENARIO" == "WasmTestOnBrowser" || "$SCENARIO" == "wasmtestonbrowser" ]]; then
if [[ "$SCENARIO" == "WasmTestOnFirefox" || "$SCENARIO" == "wasmtestonfirefox" ]]; then
XHARNESS_COMMAND="test-browser --browser=Firefox"
elif [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
XHARNESS_COMMAND="test-browser"
else
XHARNESS_COMMAND="test"
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/helix-extension-example.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup Condition="'$(IsRunningLibraryTests)' == 'true' and '$(Scenario)' == 'WasmTestOnBrowser'">
<PropertyGroup Condition="'$(IsRunningLibraryTests)' == 'true' and '$(Scenario)' == 'WasmTestOnChrome'">
<HelixExtensionTargets>$(HelixExtensionTargets);_AddHelixCrypoItems</HelixExtensionTargets>
<_CryptoProjectName>System.Security.Cryptography.Tests</_CryptoProjectName>
</PropertyGroup>
Expand Down
10 changes: 9 additions & 1 deletion eng/testing/tests.browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
<!-- '/.dockerenv' - is to check if this is running in a codespace -->
<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and
('$(ContinuousIntegrationBuild)' != 'true' or Exists('/.dockerenv')) and
'$(Scenario)' == 'WasmTestOnBrowser'">true</InstallChromeForTests>
'$(Scenario)' == 'WasmTestOnChrome'">true</InstallChromeForTests>
<InstallFirefoxForTests Condition="'$(InstallFirefoxForTests)' == '' and
('$(ContinuousIntegrationBuild)' != 'true' or Exists('/.dockerenv')) and
'$(Scenario)' == 'WasmTestOnFirefox'">true</InstallFirefoxForTests>
<InstallV8ForTests Condition="'$(InstallV8ForTests)' == '' and
('$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv')) and
($([MSBuild]::IsOSPlatform('windows')) or $([MSBuild]::IsOSPlatform('linux')))"
Expand Down Expand Up @@ -55,6 +58,9 @@
<_WasmBrowserPathForTests Condition="'$(BROWSER_PATH_FOR_TESTS)' != ''">$(BROWSER_PATH_FOR_TESTS)</_WasmBrowserPathForTests>
<_WasmBrowserPathForTests Condition="'$(_WasmBrowserPathForTests)' == '' and '$(InstallChromeForTests)' == 'true'">$(ChromeBinaryPath)</_WasmBrowserPathForTests>

<_WasmBrowserPathForTests Condition="'$(BROWSER_PATH_FOR_TESTS)' != ''">$(BROWSER_PATH_FOR_TESTS)</_WasmBrowserPathForTests>
<_WasmBrowserPathForTests Condition="'$(_WasmBrowserPathForTests)' == '' and '$(InstallFirefoxForTests)' == 'true'">$(FirefoxBinaryPath)</_WasmBrowserPathForTests>

<_WasmJSEnginePathForTests Condition="'$(V8_PATH_FOR_TESTS)' != ''">$(V8_PATH_FOR_TESTS)</_WasmJSEnginePathForTests>
<_WasmJSEnginePathForTests Condition="'$(_WasmJSEnginePathForTests)' == '' and '$(InstallV8ForTests)' == 'true'">$(V8BinaryPath)</_WasmJSEnginePathForTests>
</PropertyGroup>
Expand Down Expand Up @@ -252,13 +258,15 @@
<RunScriptCommands Include="if [[ &quot;$SCENARIO&quot; == &quot;WasmTestOnNodeJS&quot; || &quot;$SCENARIO&quot; == &quot;wasmtestonnodejs&quot; ]]; then npm ci; fi" />

<SetScriptCommands Condition="'$(InstallChromeForTests)' == 'true' and '$(ChromeDriverBinaryPath)' != ''" Include="export PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(ChromeDriverBinaryPath)))" />
<SetScriptCommands Condition="'$(InstallFirefoxForTests)' == 'true' and '$(GeckoDriverBinaryPath)' != ''" Include="export PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
<SetScriptCommands Condition="'$(IsBrowserWasmProject)' == 'true'" Include="export RuntimeIdentifier=browser-wasm" />
</ItemGroup>
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<SetScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( set &quot;WasmXHarnessMonoArgs=%WasmXHarnessMonoArgs% --setenv=NPM_MODULES^=$(NodeNpmModuleString)&quot; )" />
<RunScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( call npm ci )" />

<SetScriptCommands Condition="'$(InstallChromeForTests)' == 'true' and '$(ChromeDriverBinaryPath)' != ''" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(ChromeDriverBinaryPath)))" />
<SetScriptCommands Condition="'$(InstallFirefoxForTests)' == 'true' and '$(GeckoDriverBinaryPath)' != ''" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
<SetScriptCommands Condition="'$(IsBrowserWasmProject)' == 'true'" Include="set RuntimeIdentifier=browser-wasm" />
</ItemGroup>
</Target>
Expand Down
Loading

0 comments on commit ec42368

Please sign in to comment.