Skip to content

Commit 849c0fd

Browse files
authored
[wasm] Use specific version of v8 for tests (#91633)
* [wasm] Add support for installing V8 * [wasm] Use provisioned v8 for library tests * [wasm] WBT: Use provisioned v8 * [wasm] enable use of provisioned v8 for library tests * [wasm] add MSBUILD_ARGS for build-runtime-tests make target * update docs * Don't install v8 for runtime tests * [wasm] CI: trigger library test jobs when chrome version changes * Disable provisioning v8 when building runtime tests * address review feedback * [wasm] Disable installing v8 for runtime tests * Address review feedback * fix stamping for v8
1 parent 5b217b1 commit 849c0fd

20 files changed

+197
-37
lines changed

eng/pipelines/common/evaluate-default-paths.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ jobs:
273273
- src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/*
274274
- ${{ parameters._const_paths._always_exclude }}
275275

276+
- subset: wasm_chrome
277+
include:
278+
- ${{ parameters._const_paths._wasm_chrome }}
279+
276280
# anything other than mono, or wasm specific paths
277281
- subset: non_mono_and_wasm
278282
exclude:

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
eq(variables['wasmDarcDependenciesChanged'], true),
3737
eq(dependencies.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true),
3838
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
39+
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm_chrome.containsChange'], true),
3940
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm_specific_except_wbt_dbg.containsChange'], true))
4041
]
4142
- name: _wasmRunSmokeTestsOnlyArg
@@ -45,12 +46,17 @@ jobs:
4546
value: /p:InstallChromeForTests=true
4647
${{ else }}:
4748
value: ''
49+
- name: v8InstallArg
50+
${{ if containsValue(parameters.scenarios, 'normal') }}:
51+
value: /p:InstallV8ForTests=true
52+
${{ else }}:
53+
value: ''
4854

4955
jobParameters:
5056
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
5157
testGroup: innerloop
5258
nameSuffix: LibraryTests${{ parameters.nameSuffix }}
53-
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) ${{ parameters.extraBuildArgs }}
59+
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) $(v8InstallArg) ${{ parameters.extraBuildArgs }}
5460
timeoutInMinutes: 240
5561
# if !alwaysRun, then:
5662
# if this is runtime-wasm (isWasmOnlyBuild):

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
3737
nameSuffix: AllSubsets_Mono_RuntimeTests
3838
runtimeVariant: monointerpreter
39-
buildArgs: -s mono+libs -c $(_BuildConfig) ${{ parameters.extraBuildArgs }}
39+
buildArgs: -s mono+libs -c $(_BuildConfig) /p:InstallV8ForTests=false ${{ parameters.extraBuildArgs }}
4040
timeoutInMinutes: 180
4141
condition: >-
4242
or(
@@ -47,5 +47,6 @@ jobs:
4747
parameters:
4848
creator: dotnet-bot
4949
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
50+
testBuildArgs: /p:InstallV8ForTests=false
5051
extraVariablesTemplates:
5152
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml

eng/testing/WasmRunnerAOTTemplate.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ if [[ -z "$XHARNESS_COMMAND" ]]; then
3434
fi
3535

3636
if [[ "$XHARNESS_COMMAND" == "test" ]]; then
37-
if [[ -z "$JS_ENGINE" ]]; then
38-
if [[ "$SCENARIO" == "WasmTestOnNodeJS" || "$SCENARIO" == "wasmtestonnodejs" ]]; then
39-
JS_ENGINE="--engine=NodeJS"
40-
else
41-
JS_ENGINE="--engine=V8"
42-
fi
43-
fi
44-
4537
if [[ -z "$JS_ENGINE_ARGS" ]]; then
4638
JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000"
4739
if [[ "$SCENARIO" != "WasmTestOnNodeJS" && "$SCENARIO" != "wasmtestonnodejs" ]]; then
@@ -55,6 +47,17 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then
5547
if [[ -z "$MAIN_JS" ]]; then
5648
MAIN_JS="--js-file=test-main.js"
5749
fi
50+
51+
if [[ -z "$JS_ENGINE" ]]; then
52+
if [[ "$SCENARIO" == "WasmTestOnNodeJS" || "$SCENARIO" == "wasmtestonnodejs" ]]; then
53+
JS_ENGINE="--engine=NodeJS"
54+
else
55+
JS_ENGINE="--engine=V8"
56+
if [[ -n "$V8_PATH_FOR_TESTS" ]]; then
57+
JS_ENGINE_ARGS="$JS_ENGINE_ARGS --js-engine-path=$V8_PATH_FOR_TESTS"
58+
fi
59+
fi
60+
fi
5861
fi
5962

6063
if [[ -z "$XHARNESS_ARGS" ]]; then
@@ -123,4 +126,4 @@ echo ----- end $(date) ----- exit code $_exitCode ------------------------------
123126

124127
echo "XHarness artifacts: $XHARNESS_OUT"
125128

126-
exit $_exitCode
129+
exit $_exitCode

eng/testing/WasmRunnerTemplate.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ if [[ -z "$XHARNESS_COMMAND" ]]; then
3434
fi
3535

3636
if [[ "$XHARNESS_COMMAND" == "test" ]]; then
37-
if [[ -z "$JS_ENGINE" ]]; then
38-
if [[ "$SCENARIO" == "WasmTestOnNodeJS" || "$SCENARIO" == "wasmtestonnodejs" ]]; then
39-
JS_ENGINE="--engine=NodeJS"
40-
else
41-
JS_ENGINE="--engine=V8"
42-
fi
43-
fi
44-
4537
if [[ -z "$MAIN_JS" ]]; then
4638
MAIN_JS="--js-file=test-main.js"
4739
fi
@@ -55,6 +47,17 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then
5547
JS_ENGINE_ARGS="$JS_ENGINE_ARGS --engine-arg=--experimental-wasm-eh"
5648
fi
5749
fi
50+
51+
if [[ -z "$JS_ENGINE" ]]; then
52+
if [[ "$SCENARIO" == "WasmTestOnNodeJS" || "$SCENARIO" == "wasmtestonnodejs" ]]; then
53+
JS_ENGINE="--engine=NodeJS"
54+
else
55+
JS_ENGINE="--engine=V8"
56+
if [[ -n "$V8_PATH_FOR_TESTS" ]]; then
57+
JS_ENGINE_ARGS="$JS_ENGINE_ARGS --js-engine-path=$V8_PATH_FOR_TESTS"
58+
fi
59+
fi
60+
fi
5861
fi
5962

6063
if [[ -z "$XHARNESS_ARGS" ]]; then

eng/testing/tests.browser.targets

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@
2424
<WasmIgnoreNet6WorkloadInstallErrors Condition="'$(WasmIgnoreNet6WorkloadInstallErrors)' != 'true'">false</WasmIgnoreNet6WorkloadInstallErrors>
2525
<!--<InstallWorkloadUsingArtifactsDependsOn>_GetWorkloadsToInstall;$(InstallWorkloadUsingArtifactsDependsOn)</InstallWorkloadUsingArtifactsDependsOn>-->
2626
<GetWorkloadInputsDependsOn>_GetWorkloadsToInstall;$(GetWorkloadInputsDependsOn)</GetWorkloadInputsDependsOn>
27+
<!-- '/.dockerenv' - is to check if this is running in a codespace -->
2728
<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and
2829
('$(ContinuousIntegrationBuild)' != 'true' or Exists('/.dockerenv')) and
2930
'$(Scenario)' == 'WasmTestOnBrowser'">true</InstallChromeForTests>
31+
<InstallV8ForTests Condition="'$(InstallV8ForTests)' == '' and
32+
('$(ContinuousIntegrationBuild)' != 'true' or Exists('/.dockerenv')) and
33+
('$(Scenario)' == 'normal' or '$(Scenario)' == '')">true</InstallV8ForTests>
3034

3135
<GetNuGetsToBuildForWorkloadTestingDependsOn>_GetRuntimePackNuGetsToBuild;_GetNugetsForAOT;$(GetNuGetsToBuildForWorkloadTestingDependsOn)</GetNuGetsToBuildForWorkloadTestingDependsOn>
3236
<_BundleAOTTestWasmAppForHelixDependsOn>$(_BundleAOTTestWasmAppForHelixDependsOn);PrepareForWasmBuildApp;_PrepareForAOTOnHelix</_BundleAOTTestWasmAppForHelixDependsOn>
@@ -59,11 +63,14 @@
5963
<!-- On CI this is installed as part of pretest, but it should still be installed
6064
for WBT, and debugger tests -->
6165
<Import Project="$(MSBuildThisFileDirectory)wasm-provisioning.targets"
62-
Condition="'$(InstallChromeForTests)' == 'true' and ('$(ContinuousIntegrationBuild)' != 'true' or '$(IsBrowserWasmProject)' != 'true')" />
66+
Condition="'$(ContinuousIntegrationBuild)' != 'true' or '$(IsBrowserWasmProject)' != 'true'" />
6367

6468
<PropertyGroup>
6569
<_WasmBrowserPathForTests Condition="'$(BROWSER_PATH_FOR_TESTS)' != ''">$(BROWSER_PATH_FOR_TESTS)</_WasmBrowserPathForTests>
6670
<_WasmBrowserPathForTests Condition="'$(_WasmBrowserPathForTests)' == '' and '$(InstallChromeForTests)' == 'true'">$(ChromeBinaryPath)</_WasmBrowserPathForTests>
71+
72+
<_WasmJSEnginePathForTests Condition="'$(V8_PATH_FOR_TESTS)' != ''">$(V8_PATH_FOR_TESTS)</_WasmJSEnginePathForTests>
73+
<_WasmJSEnginePathForTests Condition="'$(_WasmJSEnginePathForTests)' == '' and '$(InstallV8ForTests)' == 'true'">$(V8BinaryPath)</_WasmJSEnginePathForTests>
6774
</PropertyGroup>
6875

6976
<!--
@@ -75,6 +82,7 @@
7582
<SetScriptCommands Condition="'$(Scenario)' != '' and '$(ContinuousIntegrationBuild)' != 'true'" Include="export SCENARIO=$(Scenario)" />
7683
<SetScriptCommands Condition="'$(JSEngine)' != ''" Include="export JS_ENGINE=--engine=$(JSEngine)" />
7784
<SetScriptCommands Condition="'$(JSEngineArgs)' != ''" Include="export JS_ENGINE_ARGS=$(JSEngineArgs)" />
85+
<SetScriptCommands Condition="'$(_WasmJSEnginePathForTests)' != ''" Include="export V8_PATH_FOR_TESTS=${V8_PATH_FOR_TESTS:=$(_WasmJSEnginePathForTests)}" />
7886
<SetScriptCommands Condition="'$(_WasmMainJSFileName)' != ''" Include="export MAIN_JS=--js-file=$(_WasmMainJSFileName)" />
7987
<!-- Workaround for https://github.com/dotnet/runtime/issues/74328 -->
8088
<SetScriptCommands Condition="'$(BuildAOTTestsOnHelix)' == 'true'" Include="export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1" />

eng/testing/wasm-provisioning.targets

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111

1212
<!-- disable by default on unsupported platforms -->
1313
<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and '$(ChromeOSIdentifier)' == ''">false</InstallChromeForTests>
14+
<InstallV8ForTests Condition="'$(InstallV8ForTests)' == ''">false</InstallV8ForTests>
1415

1516
<FirefoxDir>$(ArtifactsBinDir)firefox\</FirefoxDir>
1617
<FirefoxStampFile>$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(FirefoxRevision).stamp'))</FirefoxStampFile>
1718
<_BrowserStampDir>$(ArtifactsBinDir)\</_BrowserStampDir>
19+
20+
<WasmProvisionAfterTarget Condition="'$(WasmProvisionAfterTarget)' == ''">Build</WasmProvisionAfterTarget>
1821
</PropertyGroup>
1922

2023
<Import Project="$(MSBuildThisFileDirectory)ChromeVersions.props" />
@@ -38,6 +41,11 @@
3841

3942
<ChromeUrl>$(linux_ChromeBaseSnapshotUrl)/chrome-linux.zip</ChromeUrl>
4043
<ChromeDriverUrl>$(linux_ChromeBaseSnapshotUrl)/chromedriver_linux64.zip</ChromeDriverUrl>
44+
45+
<V8Version>$(linux_V8Version)</V8Version>
46+
<V8DirName>v8-$(linux_V8Version)</V8DirName>
47+
<V8BinaryName>$(V8DirName).sh</V8BinaryName>
48+
<_V8PlatformId>linux64</_V8PlatformId>
4149
</PropertyGroup>
4250

4351
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
@@ -53,6 +61,11 @@
5361

5462
<ChromeUrl>$(win_ChromeBaseSnapshotUrl)/chrome-win.zip</ChromeUrl>
5563
<ChromeDriverUrl>$(win_ChromeBaseSnapshotUrl)/chromedriver_win32.zip</ChromeDriverUrl>
64+
65+
<V8Version>$(win_V8Version)</V8Version>
66+
<V8DirName>v8-$(win_V8Version)</V8DirName>
67+
<V8BinaryName>$(V8DirName).cmd</V8BinaryName>
68+
<_V8PlatformId>win32</_V8PlatformId>
5669
</PropertyGroup>
5770

5871
<PropertyGroup Condition="'$(ChromeVersion)' != ''">
@@ -65,16 +78,24 @@
6578
<ChromeDriverBinaryPath>$([MSBuild]::NormalizePath($(ChromeDriverDir), $(ChromeDriverDirName), $(ChromeDriverBinaryName)))</ChromeDriverBinaryPath>
6679
</PropertyGroup>
6780

81+
<PropertyGroup Condition="'$(V8Version)' != ''">
82+
<V8Dir>$(ArtifactsBinDir)$(V8DirName)\</V8Dir>
83+
<V8StampFile>$([MSBuild]::NormalizePath('$(V8Dir)', '.install-$(V8Version).stamp'))</V8StampFile>
84+
<V8BinaryPath>$([MSBuild]::NormalizePath($(V8Dir), $(V8BinaryName)))</V8BinaryPath>
85+
</PropertyGroup>
86+
6887
<PropertyGroup Condition="'$(BrowserHost)' != 'windows'">
6988
<FirefoxRevision>108.0.1</FirefoxRevision>
7089
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2</FirefoxUrl>
7190
<FirefoxBinaryName>firefox</FirefoxBinaryName>
7291
</PropertyGroup>
7392

7493
<Target Name="DownloadAndInstallChrome"
75-
AfterTargets="Build"
94+
AfterTargets="$(WasmProvisionAfterTarget)"
7695
Condition="(!Exists($(ChromeStampFile)) or !Exists($(ChromeBinaryPath))) and '$(InstallChromeForTests)' == 'true'">
7796

97+
<Error Condition="!$([MSBuild]::IsOSPlatform('linux')) and !$([MSBuild]::IsOSPlatform('windows'))"
98+
Text="Chrome provisioning only supported on Linux, and windows." />
7899
<Error Condition="'$(ChromeVersion)' == ''"
79100
Text="No %24(ChromeVersion) set. This can be set in eng/testing/ChromeVersions.props" />
80101

@@ -87,6 +108,7 @@
87108
<Output TaskParameter="DownloadedFile" PropertyName="_DownloadedFile" />
88109
</DownloadFile>
89110
<Unzip SourceFiles="$(_DownloadedFile)" DestinationFolder="$(ChromeDir)" />
111+
<Delete Files="$(_DownloadedFile)" />
90112

91113
<Error Text="Cannot find chrome at $(ChromeBinaryPath) in the downloaded copy"
92114
Condition="!Exists($(ChromeBinaryPath))" />
@@ -97,9 +119,11 @@
97119
</Target>
98120

99121
<Target Name="DownloadAndInstallChromeDriver"
100-
AfterTargets="Build"
122+
AfterTargets="$(WasmProvisionAfterTarget)"
101123
Condition="(!Exists($(ChromeDriverStampFile)) or !Exists($(ChromeDriverBinaryPath))) and '$(InstallChromeForTests)' == 'true'">
102124

125+
<Error Condition="!$([MSBuild]::IsOSPlatform('linux')) and !$([MSBuild]::IsOSPlatform('windows'))"
126+
Text="ChromeDriver provisioning only supported on Linux, and windows." />
103127
<Error Condition="'$(ChromeVersion)' == ''"
104128
Text="No %24(ChromeVersion) set. This can be set in eng/testing/ChromeVersions.props" />
105129

@@ -121,8 +145,41 @@
121145
<Touch Files="$(ChromeDriverStampFile)" AlwaysCreate="true" />
122146
</Target>
123147

148+
<Target Name="DownloadAndInstallV8"
149+
AfterTargets="$(WasmProvisionAfterTarget)"
150+
Condition="(!Exists($(V8StampFile)) or !Exists($(V8BinaryPath))) and '$(InstallV8ForTests)' == 'true'">
151+
152+
<Error Condition="!$([MSBuild]::IsOSPlatform('linux')) and !$([MSBuild]::IsOSPlatform('windows'))"
153+
Text="V8 provisioning only supported on Linux, and windows." />
154+
<Error Condition="'$(V8Version)' == ''" Text="%24(V8Version) not set" />
155+
<Error Condition="'$(_V8PlatformId)' == ''" Text="%24(_V8PlatformId) not set, needed for constructing the snapshot url." />
156+
157+
<PropertyGroup>
158+
<_V8SnapshotUrl>https://storage.googleapis.com/chromium-v8/official/canary/v8-$(_V8PlatformId)-rel-$(V8Version).zip</_V8SnapshotUrl>
159+
160+
<_V8Script Condition="$([MSBuild]::IsOSPlatform('linux'))">#!/usr/bin/env bash
161+
export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &amp;> /dev/null &amp;&amp; pwd )
162+
"$__SCRIPT_DIR/d8" --snapshot_blob="$__SCRIPT_DIR/snapshot_blob.bin" "$@"
163+
</_V8Script>
164+
<_V8Script Condition="$([MSBuild]::IsOSPlatform('windows'))">@echo off
165+
"%~dp0\d8.exe --snapshot_blob="%~dp0\snapshot_blob.bin" %*
166+
</_V8Script>
167+
</PropertyGroup>
168+
169+
<DownloadFile SourceUrl="$(_V8SnapshotUrl)" DestinationFolder="$(V8Dir)" SkipUnchangedFiles="true">
170+
<Output TaskParameter="DownloadedFile" PropertyName="_DownloadedFile" />
171+
</DownloadFile>
172+
173+
<Unzip SourceFiles="$(_DownloadedFile)" DestinationFolder="$(V8Dir)" />
174+
175+
<WriteLinesToFile Lines="$(_V8Script)" File="$(V8BinaryPath)" Overwrite="true" />
176+
<Exec Command="chmod +x $(V8BinaryPath) $(V8Dir)/d8" Condition="$([MSBuild]::IsOSPlatform('linux'))" />
177+
178+
<Touch Files="$(V8StampFile)" AlwaysCreate="true" />
179+
</Target>
180+
124181
<Target Name="DownloadAndInstallFirefox"
125-
AfterTargets="Build"
182+
AfterTargets="$(WasmProvisionAfterTarget)"
126183
Condition="!Exists($(FirefoxStampFile)) and '$(InstallFirefoxForTests)' == 'true' and !$([MSBuild]::IsOSPlatform('windows'))">
127184
<ItemGroup>
128185
<_StampFile Include="$(_BrowserStampDir).install-firefox*.stamp" />

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ private static bool GetIsInContainer()
428428
return Registry.GetValue(key, "ContainerType", defaultValue: null) != null;
429429
}
430430

431+
// '/.dockerenv' - is to check if this is running in a codespace
431432
return (IsLinux && File.Exists("/.dockerenv"));
432433
}
433434

src/libraries/sendtohelix-wasm.targets

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<NeedsEMSDK Condition="'$(NeedsToBuildWasmAppsOnHelix)' == 'true'">true</NeedsEMSDK>
6060
<NeedsEMSDKNode Condition="'$(Scenario)' == 'WasmTestOnNodeJS' or '$(Scenario)' == 'BuildWasmApps'">false</NeedsEMSDKNode>
6161
<NeedsToRunOnBrowser Condition="'$(Scenario)' == 'WasmTestOnBrowser' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnBrowser>
62+
<NeedsToRunOnV8 Condition="'$(Scenario)' == '' or '$(Scenario)' == 'normal' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnV8>
6263
<NeedsBuiltNugets Condition="'$(Scenario)' == 'BuildWasmApps'">true</NeedsBuiltNugets>
6364

6465
<IncludeXHarnessCli>true</IncludeXHarnessCli>
@@ -101,6 +102,8 @@
101102

102103
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDriverDirName):$PATH" />
103104
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDirName):$PATH" />
105+
106+
<HelixPreCommand Condition="'$(NeedsToRunOnV8)' == 'true'" Include="export V8_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/$(V8DirName)/$(V8BinaryName)" />
104107
</ItemGroup>
105108

106109
<ItemGroup Condition="'$(WindowsShell)' == 'true'">
@@ -114,6 +117,8 @@
114117

115118
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDriverDirName)%3B%PATH%" />
116119
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDirName)%3B%PATH%" />
120+
121+
<HelixPreCommand Condition="'$(NeedsToRunOnV8)' == 'true'" Include="set V8_PATH_FOR_TESTS=%HELIX_CORRELATION_PAYLOAD%\$(V8DirName)\$(V8BinaryName)" />
117122
</ItemGroup>
118123

119124
<ItemGroup Condition="'$(NeedsEMSDKNode)' == 'true' and '$(WindowsShell)' != 'true'">
@@ -187,6 +192,8 @@
187192
Text="Could not find chrome at $(ChromeDir)" />
188193
<Error Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDriverDir))"
189194
Text="Could not find chromedriver at $(ChromeDriverDir)" />
195+
<Error Condition="'$(NeedsToRunOnV8)' == 'true' and !Exists($(V8BinaryPath))"
196+
Text="Could not find v8 at $(V8BinaryPath)" />
190197
<Error Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'firefox' and !Exists($(FirefoxDir))"
191198
Text="Could not find firefox at $(FirefoxDir)" />
192199

@@ -197,6 +204,10 @@
197204
<HelixCorrelationPayload Condition="'$(WindowsShell)' != 'true' and '$(DebuggerHost)' == 'firefox'" Include="$(FirefoxDir)" />
198205
</ItemGroup>
199206

207+
<ItemGroup>
208+
<HelixCorrelationPayload Condition="'$(NeedsToRunOnV8)' == 'true'" Include="$(V8Dir)" Destination="$(V8DirName)" />
209+
</ItemGroup>
210+
200211
<ItemGroup Condition="'$(NeedsEMSDK)' == 'true'">
201212
<HelixCorrelationPayload Include="$(EmSdkDirForHelixPayload)" Destination="build/emsdk" />
202213
<HelixCorrelationPayload Include="$(WasmAppBuilderDir)" Destination="build/WasmAppBuilder" />

src/mono/wasm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ run-browser-tests-%:
111111
PATH="$(GECKODRIVER):$(CHROMEDRIVER):$(PATH)" XHARNESS_COMMAND="test-browser --browser=$(XHARNESS_BROWSER)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test $(_MSBUILD_WASM_BUILD_ARGS) $(MSBUILD_ARGS)
112112

113113
build-runtime-tests:
114-
$(TOP)/src/tests/build.sh -mono os browser wasm $(CONFIG)
114+
$(TOP)/src/tests/build.sh -mono os browser wasm $(CONFIG) $(MSBUILD_ARGS)
115115

116116
build-debugger-tests-helix:
117117
$(DOTNET) build -restore -bl:$(LOG_PATH)/Wasm.Debugger.Tests.binlog \

0 commit comments

Comments
 (0)