Skip to content

Commit a587fa4

Browse files
[wasm] Run browser tests on helix/windows (#52699)
* [wasm] Run browser tests on helix/windows * Build just wasm/browsertests on helix/windows * Use $(ChromiumRevision) in windows links * Fix conditions * Set PATH differently * Use backslash in PATH on windows * Try different version of chromium * Pass scenario and browser host to build And set browser path on windows to be able to start chrome from xharness * Try to get more info from the helix workitems * Fix dir separator, add broser path * Create WasmBuildSupportDir * Revert "Try to get more info from the helix workitems" This reverts commit 8807434. * Put the dir cmds back, fix mkdir call * More debug info * Bump xharness * Bump xharness again With darc this time * StressLogAnalyzer didn't print the number of messages correctly if it exceeded the int range (2 billion). (#54832) Fix is to just use 64 bit ints instead. * Found a race condition where the LOH flag on a segment is set too late. This gives another thread the chance to allocate in a fresh LOH region that doesn't have the LOH flag set just yet and trip over an assert in Object::ValidateInner. (#54839) The fix is simply to set the flag in get_new_region before the region is put on the list for the LOH generation. * Try to show the chrome logs * Use different path for chrome logs * Use newer image with font for chrome The chrome was crashing, because it didn't find any sans-serif font. * Increase timeouts * Disable tests which timeout * Remove debug calls * Put back normal scenario * Do not set scenario in build args * Add browser sample exclusion * Restore the platform matrix * Remove the wasm build test changes That will be handled in #54451 * Remove duplicate exclusion * Suggested property name change * Fix last merge * Simplify condition We don't pass Scenario anymore * Include chrome and chromedriver in the payload Co-authored-by: Peter Sollich <petersol@microsoft.com>
1 parent 62fad9d commit a587fa4

File tree

5 files changed

+38
-11
lines changed

5 files changed

+38
-11
lines changed

eng/pipelines/libraries/helix-queues-setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,6 @@ jobs:
189189

190190
# WebAssembly windows
191191
- ${{ if eq(parameters.platform, 'Browser_wasm_win') }}:
192-
- (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210531091615-f5c7a43
192+
- (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210702131541-6837048
193193

194194
${{ insert }}: ${{ parameters.jobParameters }}

eng/pipelines/runtime-staging.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ jobs:
354354
timeoutInMinutes: 90
355355

356356
#
357-
# Build Browser_wasm, on windows
357+
# Build Browser_wasm, on windows, run console and browser tests
358358
#
359359
- template: /eng/pipelines/common/platform-matrix.yml
360360
parameters:
@@ -374,7 +374,7 @@ jobs:
374374
testGroup: innerloop
375375
nameSuffix: Browser_wasm_Windows
376376
buildArgs: -subset mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:BrowserHost=windows
377-
timeoutInMinutes: 120
377+
timeoutInMinutes: 180
378378
condition: >-
379379
or(
380380
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
@@ -389,6 +389,7 @@ jobs:
389389
extraHelixArguments: /p:BrowserHost=windows
390390
scenarios:
391391
- normal
392+
- wasmtestonbrowser
392393
condition: >-
393394
or(
394395
eq(variables['librariesContainsChange'], true),

eng/testing/tests.wasm.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<_XHarnessArgs Condition="'$(OS)' == 'Windows_NT'">wasm %XHARNESS_COMMAND% --app=. --output-directory=%XHARNESS_OUT%</_XHarnessArgs>
2323

2424
<_XHarnessArgs Condition="'$(Scenario)' != 'WasmTestOnBrowser'">$(_XHarnessArgs) --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js</_XHarnessArgs>
25+
<_XHarnessArgs Condition="'$(BrowserHost)' == 'windows'">$(_XHarnessArgs) --browser=chrome --browser-path=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe</_XHarnessArgs>
2526
<_XHarnessArgs Condition="'$(IsFunctionalTest)' == 'true'" >$(_XHarnessArgs) --expected-exit-code=$(ExpectedExitCode)</_XHarnessArgs>
2627
<_XHarnessArgs Condition="'$(WasmXHarnessArgs)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgs)</_XHarnessArgs>
2728

src/libraries/sendtohelixhelp.proj

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and '$(Outerloop)' == 'true'">00:20:00</_workItemTimeout>
3535
<_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == ''">00:15:00</_workItemTimeout>
3636
<_workItemTimeout Condition="'$(Scenario)' != '' and '$(_workItemTimeout)' == ''">00:30:00</_workItemTimeout>
37+
<_workItemTimeout Condition="'$(Scenario)' == 'wasmtestonbrowser' and '$(BrowserHost)' == 'windows'">00:45:00</_workItemTimeout>
3738

3839
<!-- The Helix runtime payload and the tests to run -->
3940
<!-- TestArchiveRuntimeFile will be passed as a property by the calling project -->
@@ -110,6 +111,10 @@
110111
<HelixPreCommand Include="export PATH=$HELIX_CORRELATION_PAYLOAD/chromedriver_linux64:$PATH" />
111112
<HelixPreCommand Include="export PATH=$HELIX_CORRELATION_PAYLOAD/chrome-linux:$PATH" />
112113
</ItemGroup>
114+
<ItemGroup Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(WindowsShell)' == 'true'">
115+
<HelixPreCommand Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\chromedriver_win32%3B%PATH%" />
116+
<HelixPreCommand Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\chrome-win%3B%PATH%" />
117+
</ItemGroup>
113118

114119
<Choose>
115120
<When Condition="'$(NeedsWorkload)' == 'true'">
@@ -308,18 +313,25 @@
308313
</ItemGroup>
309314

310315
<PropertyGroup Condition="'$(TargetOS)' == 'Browser'">
311-
<!-- Version number to revision number mapping from http://omahaproxy.appspot.com/ -->
312-
<!-- 84.0.4147.105 is 768962 for example -->
313-
<ChromiumRevision>768968</ChromiumRevision>
314-
<ChromiumUrl>https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/$(ChromiumRevision)/chrome-linux.zip</ChromiumUrl>
315-
<ChromeDriverUrl>https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/$(ChromiumRevision)/chromedriver_linux64.zip</ChromeDriverUrl>
316316
<EmSdkDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'emsdk'))</EmSdkDir>
317317
<WasmBuildTargetsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'build'))</WasmBuildTargetsDir>
318318
<TestEchoMiddleware>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'NetCoreServer', '$(NetCoreAppCurrent)-$(Configuration)'))</TestEchoMiddleware>
319319
<RemoteLoopMiddleware>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin', 'RemoteLoopServer', '$(NetCoreAppCurrent)-$(Configuration)'))</RemoteLoopMiddleware>
320320
<WorkItemPrefix Condition="'$(Scenario)' == 'BuildWasmApps' and '$(TestUsingWorkloads)' == 'true'">Workloads-</WorkItemPrefix>
321321
<WorkItemPrefix Condition="'$(Scenario)' == 'BuildWasmApps' and '$(TestUsingWorkloads)' != 'true'">EMSDK-</WorkItemPrefix>
322322
</PropertyGroup>
323+
<PropertyGroup Condition="'$(TargetOS)' == 'Browser' and '$(BrowserHost)' != 'windows'">
324+
<!-- Version number to revision number mapping from http://omahaproxy.appspot.com/ -->
325+
<!-- 84.0.4147.105 is 768962 for example -->
326+
<ChromiumRevision>768968</ChromiumRevision>
327+
<ChromiumUrl>https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/$(ChromiumRevision)/chrome-linux.zip</ChromiumUrl>
328+
<ChromeDriverUrl>https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/$(ChromiumRevision)/chromedriver_linux64.zip</ChromeDriverUrl>
329+
</PropertyGroup>
330+
<PropertyGroup Condition="'$(TargetOS)' == 'Browser' and '$(BrowserHost)' == 'windows'">
331+
<ChromiumRevision>768983</ChromiumRevision>
332+
<ChromiumUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/$(ChromiumRevision)/chrome-win.zip</ChromiumUrl>
333+
<ChromeDriverUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/$(ChromiumRevision)/chromedriver_win32.zip</ChromeDriverUrl>
334+
</PropertyGroup>
323335

324336
<PropertyGroup Condition="'$(RuntimeFlavor)' == 'Mono'">
325337
<_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(MonoAotCrossDir), 'mono-aot-cross'))</_MonoAotCrossCompilerPath>
@@ -369,8 +381,8 @@
369381
<HelixCorrelationPayload Include="$(HelixCorrelationPayload)"
370382
Condition="'$(IncludeHelixCorrelationPayload)' == 'true' and '$(TargetOS)' != 'Browser'"
371383
AsArchive="$(HelixCorrelationPayload.EndsWith('.zip'))" />
372-
<HelixCorrelationPayload Include="chromium" Uri="$(ChromiumUrl)" Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(BrowserHost)' != 'windows'" />
373-
<HelixCorrelationPayload Include="chromedriver" Uri="$(ChromeDriverUrl)" Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(BrowserHost)' != 'windows'" />
384+
<HelixCorrelationPayload Include="chromium" Uri="$(ChromiumUrl)" Condition="'$(NeedsToRunOnBrowser)' == 'true'" />
385+
<HelixCorrelationPayload Include="chromedriver" Uri="$(ChromeDriverUrl)" Condition="'$(NeedsToRunOnBrowser)' == 'true'" />
374386

375387
<_WorkItem Include="$(WorkItemArchiveWildCard)" Exclude="$(HelixCorrelationPayload)" />
376388
<_WorkItem Include="$(TestArchiveRoot)runonly/**/WebAssembly.Console.*.Test.zip" Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' != 'WasmTestOnBrowser' and '$(Scenario)' != 'BuildWasmApps'" />
@@ -393,6 +405,7 @@
393405
<ExecXHarnessCmd>dotnet exec %XHARNESS_CLI_PATH%</ExecXHarnessCmd>
394406
<XHarnessOutput>%HELIX_WORKITEM_UPLOAD_ROOT%\xharness-output</XHarnessOutput>
395407
<XHarnessCommand>%XHARNESS_COMMAND%</XHarnessCommand>
408+
<XHarnessBrowserPathArg>--browser-path=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe</XHarnessBrowserPathArg>
396409
</PropertyGroup>
397410

398411
<ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' != 'WasmTestOnBrowser' and '$(Scenario)' != 'BuildWasmApps'">
@@ -411,7 +424,7 @@
411424
<HelixWorkItem Include="@(_RunOnlyWorkItem -> '%(FileName)')" >
412425
<PayloadArchive>%(Identity)</PayloadArchive>
413426
<!-- No RunTests script generated for the sample project so we just use the direct command -->
414-
<Command>$(ExecXHarnessCmd) wasm $(XHarnessCommand) --app=. --browser=Chrome --html-file=index.html --output-directory=$(XHarnessOutput) -- %(FileName).dll --testing</Command>
427+
<Command>$(ExecXHarnessCmd) wasm $(XHarnessCommand) --app=. --browser=Chrome $(XHarnessBrowserPathArg) --html-file=index.html --output-directory=$(XHarnessOutput) -- %(FileName).dll --testing</Command>
415428
</HelixWorkItem>
416429
</ItemGroup>
417430

src/libraries/tests.proj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,18 @@
321321
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.Compression.ZipFile\tests\System.IO.Compression.ZipFile.Tests.csproj" />
322322
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\Xslt\XslCompiledTransformApi\System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj" />
323323
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\console\Wasm.Console.Sample.csproj" />
324+
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser\Wasm.Browser.Sample.csproj" />
325+
</ItemGroup>
326+
327+
<ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(BrowserHost)' == 'windows' and '$(Scenario)' == 'WasmTestOnBrowser' and '$(RunDisabledWasmTestsOnWindows)' != 'true'">
328+
<!-- Issue: https://github.com/dotnet/runtime/issues/55429 -->
329+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.VisualBasic.Core\tests\Microsoft.VisualBasic.Core.Tests.csproj" />
330+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO\tests\System.IO.Tests.csproj" />
331+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Linq.Expressions\tests\System.Linq.Expressions.Tests.csproj" />
332+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Memory\tests\System.Memory.Tests.csproj" />
333+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Runtime.Tests.csproj" />
334+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\Writers\XmlWriterApi\System.Xml.RW.XmlWriterApi.Tests.csproj" />
335+
<ProjectExclusions Include="$(RepoRoot)\src\tests\BuildWasmApps\Wasm.Build.Tests\Wasm.Build.Tests.csproj" />
324336
</ItemGroup>
325337

326338
<ItemGroup Condition="'$(TargetOS)' == 'OSX' and '$(TargetArchitecture)' == 'arm64' and '$(RunDisabledAppleSiliconTests)' != 'true'">

0 commit comments

Comments
 (0)