1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-08 03:27:04 +09:00
Satori/docs/workflow/testing/libraries/testing-wasm.md
Youssef Victor d14b50ae21
Fix trailing whitespaces (#40891)
* Trim trailing whitespaces

* Match raw with rendered

* Delete extra asterisks and |

* Update ELT Hooks - tail calls.md

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2020-08-19 17:29:01 -07:00

1.6 KiB

Testing Libraries on WebAssembly

In order to be able to run tests, the following JavaScript engines should be installed:

  • V8
  • JavaScriptCore
  • SpiderMonkey

They can be installed as a part of jsvu.

Please make sure that a JavaScript engine binary is available via command line, e.g. for V8:

$ v8
V8 version 8.5.62

If you use jsvu, first add its location to PATH variable e.g. for V8

PATH=/Users/<your_user>/.jsvu/:$PATH V8

Building Libs and Tests for WebAssembly

Now we're ready to build everything for WebAssembly (for more details, please read this document):

./build.sh --arch wasm --os Browser -c release

and even run tests one by one for each library:

./build.sh --subset libs.tests -t --arch wasm --os Browser -c release

Running individual test suites

The following shows how to run tests for a specific library

./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release

Running tests using different JavaScript engines

It's possible to set a JavaScript engine explicitly by adding /p:JSEngine property:

./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:JSEngine=SpiderMonkey

At the moment supported values are:

  • V8
  • JavaScriptCore
  • SpiderMonkey

By default, V8 engine is used.

Test App Design

TBD

Obtaining the logs

TBD

Existing Limitations

TBD