Skip to content

Commit

Permalink
ci: Convert wast to JSON with WABT
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Sep 2, 2020
1 parent f42d4dc commit 010ba71
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,23 +146,35 @@ commands:
default: 3
expected_skipped:
type: integer
default: 477
default: 492

steps:
- run:
name: "Install WABT"
command: |
if type wast2json; then
wast2json --version
else
cd /usr/local
curl -L https://github.com/WebAssembly/wabt/releases/download/1.0.19/wabt-1.0.19-ubuntu.tar.gz | sudo tar xz --strip 1
fi
- run:
name: "Download spectest files"
working_directory: ~/build
command: |
if [ ! -d wasm-spec ]; then
git clone https://github.com/wasmx/wasm-spec --branch w3c-1.0-jsontests-20200813 --depth 1
git clone https://github.com/wasmx/wasm-spec --branch w3c-1.0-jsontests-20200813 --depth 1 wasm-spec
mkdir json && cd json
find ../wasm-spec/test/core -name '*.wast' -exec wast2json {} \;
fi
- run:
name: "Run spectest<<#parameters.skip_validation>> (skip validation)<</parameters.skip_validation>>"
working_directory: ~/build
command: |
set +e
expected=" PASSED <<parameters.expected_passed>>, FAILED <<parameters.expected_failed>>, SKIPPED <<parameters.expected_skipped>>."
result=$(bin/fizzy-spectests <<#parameters.skip_validation>>--skip-validation<</parameters.skip_validation>> wasm-spec/test/core/json | tail -1)
result=$(bin/fizzy-spectests <<#parameters.skip_validation>>--skip-validation<</parameters.skip_validation>> json | tail -1)
echo $result
if [ "$expected" != "$result" ]; then exit 1; fi
Expand Down

0 comments on commit 010ba71

Please sign in to comment.