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

[wasm] Add Wasm.Build tests, for testing wasm app builds #47683

Merged
merged 23 commits into from
Mar 9, 2021

Commits on Mar 3, 2021

  1. [wasm] Add Wasm.Build tests, for testing wasm app builds

    These tests will build wasm test projects, as part of each test method,
    and run them.
    
    Other library tests are run with `xharness`, and the test assembly is run
    under wasm.  But here we want to run them with xunit, outside wasm. So,
    this has different requirements for the helix payload, eg, the sdk,
    xunit console runner etc.
    
    To make it work, a new Scenario - `BuildWasmApps` is added, which emits
    it's archives in a `buildwasmapps/` folder, which makes it easy to pick
    up for the helix test run.
    
    The tests are added under `src/tests/BuildWasmApps/Wasm.Build.Tests`, but
    they use `Directory.Build*` from `src/libraries`, similar to how
    FunctionalTests do it.
    
    Another use case of this kinda scenario are the wasm debugger tests,
    in which the individual test methods launch wasm apps, and then debug
    them. (TBD)
    
    Tests:
    
    - The initial set of tests are just proof-of-concept, and more will be
      added once this is merged.
    
    Note: The individual tests build test projects, and then run them with
    `xharness`, under `v8`, and Chrome.
    radical committed Mar 3, 2021
    Configuration menu
    Copy the full SHA
    2739be7 View commit details
    Browse the repository at this point in the history
  2. [wasm] Disable il stripping completely

    This uses `mono-cil-strip` from a mono installation. And in it's current
    form it can cause issues, so disabling it for now.
    radical committed Mar 3, 2021
    Configuration menu
    Copy the full SHA
    25c2340 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3af97d1 View commit details
    Browse the repository at this point in the history
  4. [wasm] Cleanup builing RunScriptCommand

    .. this allows supporting other properties from xunit*targets, eg. to
    run a particular test `$(XUnitMethodName)`, which adds `-method foobar`
    to the command line.
    radical committed Mar 3, 2021
    Configuration menu
    Copy the full SHA
    8ef0923 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    03e8730 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9aee29e View commit details
    Browse the repository at this point in the history
  7. cleanup

    radical committed Mar 3, 2021
    Configuration menu
    Copy the full SHA
    33f6995 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ef0e104 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2021

  1. Configuration menu
    Copy the full SHA
    b074297 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e0c5a7c View commit details
    Browse the repository at this point in the history
  3. [wasm] Enable verbose output for xunit

    Instead of writing all the output to stdout also, use `-verbose` which
    gives output like:
    
    ```
          Wasm.Build.Tests.WasmBuildAppTest.InvariantGlobalization(config: "Debug", aot: False, invariantGlobalization: null) [STARTING]
      ============== wasm test =============
      ============== wasm test-browser =============
          Wasm.Build.Tests.WasmBuildAppTest.InvariantGlobalization(config: "Debug", aot: False, invariantGlobalization: null) [FINISHED] Time: 8.6357275s
    ```
    
    We log the detailed output to files anyway.
    radical committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    9600a13 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d10510e View commit details
    Browse the repository at this point in the history
  5. [wasm] fix tests

    radical committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    8aeec63 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b94865f View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2021

  1. Configuration menu
    Copy the full SHA
    33efd20 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a31092d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    204b3ee View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ac147c7 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2021

  1. Improve comment

    Co-authored-by: Mitchell Hwang <mitchhwang1418@gmail.com>
    radical and mdh1418 committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    2bf3845 View commit details
    Browse the repository at this point in the history
  2. Update eng/testing/tests.mobile.targets

    Co-authored-by: Mitchell Hwang <mitchhwang1418@gmail.com>
    radical and mdh1418 committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    31d5d2f View commit details
    Browse the repository at this point in the history
  3. Remove unrelated commit

    Instead, this is moved to a different AOT PR.
    
    Revert "[wasm] Disable il stripping completely"
    
    This reverts commit 25c2340.
    radical committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    ead13ee View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    17ce3d8 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2021

  1. Revert "Remove unrelated commit"

    This is needed because `mono-cil-strip` isn't available on helix. And we
    want to disable cil stripping anyway.
    
    This reverts commit ead13ee.
    radical committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    7be536d View commit details
    Browse the repository at this point in the history