Skip to content
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

Add Android functional test for invariant culture only mode #49204

Merged

Conversation

MaximLipnin
Copy link
Contributor

Contributes to #43865

  1. ./build.sh mono+libs -os Android -arch x64 -c Release
  2. ./dotnet.sh build /t:Test src/tests/FunctionalTests/Android/Device_Emulator/InvariantCultureOnlyMode /p:TargetOS=Android /p:TargetArchitecture=x64 /p:Configuration=Release

@ghost
Copy link

ghost commented Mar 5, 2021

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

Contributes to #43865

  1. ./build.sh mono+libs -os Android -arch x64 -c Release
  2. ./dotnet.sh build /t:Test src/tests/FunctionalTests/Android/Device_Emulator/InvariantCultureOnlyMode /p:TargetOS=Android /p:TargetArchitecture=x64 /p:Configuration=Release
Author: MaximLipnin
Assignees: -
Labels:

area-Infrastructure-mono

Milestone: -

Copy link
Member

@steveisok steveisok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this out of draft

@MaximLipnin MaximLipnin marked this pull request as ready for review March 9, 2021 12:31
@MaximLipnin MaximLipnin merged commit d67c5a1 into dotnet:main Mar 11, 2021
@MaximLipnin MaximLipnin deleted the add_android_invariant_mode_func_test branch March 11, 2021 08:23
radical added a commit to radical/runtime that referenced this pull request Mar 11, 2021
radical added a commit that referenced this pull request Mar 29, 2021
* [wasm] Wasm.Build.Tests: add support for shared builds

- Essentially, we want to share builds wherever possible. Example cases:

    - Same build, but run with different hosts like v8/chrome/safari, as
      separate test runs
    - Same build but run with different command line arguments

- Sharing builds especially helps when we are AOT'ing, which is slow!

- This is done by caching the builds with the key:

    `public record BuildArgs(string ProjectName, string Config, bool AOT, string ProjectFileContents, string? ExtraBuildArgs);`

- Also, ` SharedBuildClassFixture` is added, so that the builds can be
  cleaned up after all the tests in a particular class have finished
  running.

- Each test run gets a randomly generated test id. This is used for
  creating:
  1. build paths, like `artifacts/bin/Wasm.Build.Tests/net6.0-Release/browser-wasm/xharness-output/logs/n1xwbqxi.ict`
  2. and the log for running with xharness, eg. for Chrome, are in
     `artifacts/bin/Wasm.Build.Tests/net6.0-Release/browser-wasm/xharness-output/logs/n1xwbqxi.ict/Chrome/`

- split `WasmBuildAppTest.cs` into : `BuildTestBase.cs`, and
  `MainWithArgsTests.cs`.

* [wasm] Wasm.Build.Tests: Add test for relinking with InvariantGlobalization

* [wasm] Wasm.Build.Tests - Check `CultureInfo` for invariant culture

.. tests. Code stolen from @maximlipin's #49204

* fix invariant+aot test

* [wasm] Fix the order of include paths

For AOT we generate `pinvoke-table.h` in the obj directory. But there is
one present in the runtime pack too.

In my earlier changes the order in which these were passed as include
search paths was changed from:

`"-I/runtime/pack/microsoft.netcore.app.runtime.browser-wasm/Release/runtimes/browser-wasm/native/include/wasm" "-Iartifacts/obj/mono/Wasm.Console.Sample/wasm/Release/browser-wasm/wasm/"`

.. which meant that the one from the runtime pack took precedence, and
got used. So, fix the order!

And change the property names to indicate where they are sourced from.

* [wasm] Only test with Release config on CI

* [wasm] Fallback to `dotnet xharness` if `XHARNESS_CLI_PATH` is not set.

The environment variable is set on helix. During local testing it can be
useful when using a locally built xharness.

* [wasm] fix invariant test - 'en-ES' -> 'es-ES'

* [wasm] RunWithEmSdkEnv: log the working directory also

* [wasm] Re-enable wasm build tests

* [wasm] Add regression test for issue #49588

* fix test

* [wasm] Cleanup, and add more tests

* Update tests to track wasm relinking being default in some cases

* Fix InvariantGlobalization to track change in wasm relinking defaults

* [wasm] Update emsdk check message to track changes

* [wasm] Update tests to track changes

* [wasm] Move Scenario=BuildWasmApps to be submitted first

TLDR;
- this might help with the job getting scheduled first, and thus having
  a chance at completing at the same time as others.

Reasoning:

The problem this is trying to fix is:

1. The helix step submits 3 jobs:
    a. library tests to be run with v8
    b. library tests to be run with browser (scenario=wasmtestonbrowser)
    c. Wasm.Build.Tests (scenario=buildwasmapps)

2. The 3 jobs, individually take roughly 30mins each
3. And they get submitted at roughly the same time
4. But .. the first two seem to complete earlier, and the 3rd one
   completes 25-30mins later.

The hypothesis is that all the machines might be busy processing the
200+ work items from each of the first two steps, and so
Wasm.Build.Tests get scheduled pretty late.

So, here we move that to be submitted first, in the hope that it would
be able to run in parallel with the other jobs.
@ghost ghost locked as resolved and limited conversation to collaborators Apr 10, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants