Skip to content

Commit 9939f69

Browse files
committed
Add a wrapper script for the test runner that runs custom section tests
1 parent 7b6af09 commit 9939f69

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

test/custom/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
This directory contains tests for well-known WebAssembly custom sections and annotations.
2+
3+
Tests are written in the [S-Expression script format](https://github.com/WebAssembly/spec/blob/main/interpreter/README.md#s-expression-syntax) defined by the interpreter.
4+
5+
The test suite can be run with the spec interpreter as follows:
6+
```
7+
./run.py --wasm <path-to-wasm-interpreter>
8+
```
9+
where the path points to the spec interpreter executable (or a tool that understands similar options). If the binary is in the working directory, this option can be omitted.
10+
11+
In addition, the option `--js <path-to-js-interpreter>` can be given to point to a stand-alone JavaScript interpreter supporting the WebAssembly API. If provided, all tests are also executed in JavaScript.

test/custom/run.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
4+
5+
TESTS=$(ls ${SCRIPT_DIR}/*/*.wast)
6+
exec "${SCRIPT_DIR}/../core/run.py" --opts '-ca ' $@ -- ${TESTS}

0 commit comments

Comments
 (0)