Skip to content

Commit

Permalink
ci: Convert wast to json
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast authored and axic committed Aug 23, 2020
1 parent 2323ad8 commit 3efd8f7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,23 +146,30 @@ commands:
default: 3
expected_skipped:
type: integer
default: 477
default: 492

steps:
- run:
name: "Install WABT"
command: |
wast2json --version || (sudo apt-get -q update && sudo apt-get -yq install wabt)
- run:
name: "Download spectest files"
working_directory: ~/build
command: |
if [ ! -d wasm-spec ]; then
git clone https://github.com/wasmx/wasm-spec --branch vanilla-json --depth 1
if [ ! -d spec ]; then
git clone https://github.com/WebAssembly/spec --branch w3c-1.0 --depth 1
mkdir json && cd json
find ../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 3efd8f7

Please sign in to comment.