Skip to content

[Mono WASM] CoreCLR tests on WASM: Interop tests failed due to lack of support on WASM #41519

@fanyang-mono

Description

@fanyang-mono

Description

The following tests are failing due to lack of Interop support on WASM:

  • Interop/ICustomMarshaler/*
  • Interop/NativeLibrary/*
  • Interop/PInvoke/*
  • Interop/UnmanagedCallersOnly/*

Configuration

  1. Get dotnet/runtime repo
  2. Remove the test(s) that you would like to reproduce from <repo_root>/src/coreclr/tests/issues.targets
  3. Build WASM: ./build.sh --os Browser --arch wasm --subset mono+libs -c Release
  4. Build runtime tests: cd src/coreclr/ && ./build-test.sh -skipstressdependencies -excludemonofailures os Browser wasm Release
  5. To run all runtime tests, at the end of the runtime tests build log, there is "Example runtest.sh command". Use that command plus wasm. For example, for me it was
    ./tests/runtest.sh --coreOverlayDir=/Users/fanyang/Documents/work/dotnet_naricc/runtime/artifacts/tests/coreclr/Browser.wasm.Release/Tests/Core_Root --testNativeBinDir=/Users/fanyang/Documents/work/dotnet_naricc/runtime/artifacts/obj/coreclr/Browser.wasm.Release/tests --testRootDir=/Users/fanyang/Documents/work/dotnet_naricc/runtime/artifacts/tests/coreclr/Browser.wasm.Release --copyNativeTestBin Release wasm
  6. To run a single test, you could do
set CORE_ROOT=<repo_root>/artifacts/tests/coreclr/Browser.wasm.Release/Tests/Core_Root     
<repo_root>/artifacts/tests/coreclr/Browser.wasm.Release/JIT/Methodical/switch/switch5/switch5.sh

Regression?

No. WASM is a new product.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions