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

Run Wasm browser sample on Helix #46144

Merged

Conversation

MaximLipnin
Copy link
Contributor

This is a continuation of #45768 for the browser sample.
Which sample to run depends on the Helix scenario:

  • the console sample runs under normal scenario;
  • the browser sample runs under WasmTestOnBrowser scenario.

Relates to #43865

@radical
Copy link
Member

radical commented Dec 17, 2020

There are a few things to note here:

  1. xharness wasm test-browser is used with WasmTestRunner in other tests, and that expects to run an assembly with the Xunit tests.
  2. Another way to use the test-browser command would be to directly run an assembly in the browser, like the sample here. but then we need to somehow perform the test. In this case, we can test for the result of the simple TestMeaning() function call, as is displayed in the html anyway.
    • but XHarness is expecting the test result in a certain way, so that it can pass/fail the run

I implemented (2) in c9dccc0 .
If we want to add more tests/checks on the same sample, then adding Xunit tests would be preferable.

/cc @steveisok @lewing @akoeplinger

@radical radical added the arch-wasm WebAssembly architecture label Dec 17, 2020
MaximLipnin and others added 4 commits December 18, 2020 09:48
- Add a `--testing` argument, in presence of which the index.html emits
the a test exit code that can be picked up by xharness
- Also, catch loading errors, and exit the test for those too
@MaximLipnin MaximLipnin force-pushed the run_wasm_browser_sample_on_helix branch from 38dd7e9 to 767af99 Compare December 18, 2020 06:50
@MaximLipnin
Copy link
Contributor Author

Rebased the latest master to pick up Steve's AOT changes

Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

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

Looks good to me but yeah ideally we'd have a similar functionality in xharness like we do for iOS/Android where we pass the --expected-exit-code instead of expecting an xunit test run+result. But that can be cleaned up later :)

@MaximLipnin MaximLipnin merged commit ae144f2 into dotnet:master Dec 18, 2020
@MaximLipnin MaximLipnin deleted the run_wasm_browser_sample_on_helix branch December 18, 2020 17:02
@ghost ghost locked as resolved and limited conversation to collaborators Jan 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants