Skip to content

Commit b77017a

Browse files
authored
Run tests under wasmtime as part of the CI (#278)
1 parent 388a7ca commit b77017a

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
restore-keys: |
3939
0-cache-macos-latest
4040
if: matrix.os == 'macos-latest'
41+
- name: Install wasmtime for tests
42+
run: curl -f -L --retry 5 https://wasmtime.dev/install.sh | bash -s -- --version v2.0.2
4143
- uses: actions/checkout@v1
4244
with:
4345
submodules: true
@@ -51,7 +53,7 @@ jobs:
5153
run: NINJA_FLAGS=-v make package LLVM_CMAKE_FLAGS=-DLLVM_CCACHE_BUILD=ON
5254
shell: bash
5355
- name: Run the testsuite
54-
run: NINJA_FLAGS=-v make check
56+
run: NINJA_FLAGS=-v make check RUNTIME=~/.wasmtime/bin/wasmtime
5557
- name: Upload artifacts
5658
uses: actions/upload-artifact@v1
5759
with:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ default: build
4747
check:
4848
CC="clang --sysroot=$(BUILD_PREFIX)/share/wasi-sysroot" \
4949
CXX="clang++ --sysroot=$(BUILD_PREFIX)/share/wasi-sysroot -fno-exceptions" \
50-
PATH="$(PATH_PREFIX)/bin:$$PATH" tests/run.sh
50+
PATH="$(PATH_PREFIX)/bin:$$PATH" tests/run.sh $(RUNTIME)
5151

5252
clean:
5353
rm -rf build $(DESTDIR)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Error: failed to run main module `abort.c.---.wasm`
22

33
Caused by:
4-
0: failed to invoke `_start`
5-
1: wasm trap: unreachable, source location: @----
4+
0: failed to invoke command default
5+
1: wasm trap: wasm `unreachable` instruction executed
66
wasm backtrace:

tests/general/assert-fail.c.stderr.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ Assertion failed: false (assert-fail.c: main: 5)
22
Error: failed to run main module `assert-fail.c.---.wasm`
33

44
Caused by:
5-
0: failed to invoke `_start`
6-
1: wasm trap: unreachable, source location: @----
5+
0: failed to invoke command default
6+
1: wasm trap: wasm `unreachable` instruction executed
77
wasm backtrace:
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
raising SIGABRT...
2-
Program recieved fatal signal: Aborted
2+
Program received fatal signal: Aborted
33
Error: failed to run main module `sigabrt.c.---.wasm`
44

55
Caused by:
6-
0: failed to invoke `_start`
7-
1: wasm trap: unreachable, source location: @----
8-
wasm backtrace:
6+
0: failed to invoke command default

0 commit comments

Comments
 (0)