Skip to content

Commit

Permalink
Merge pull request #111 from kubernetes-sigs/fix-testdat
Browse files Browse the repository at this point in the history
make sure if there's no diff in ci
  • Loading branch information
k8s-ci-robot committed Jul 2, 2024
2 parents 06c9f99 + f3cce80 commit 45428bb
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/testdata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ jobs:
- name: "Set up wat2wasm"
run: | # Needed for testdata. wabt includes wat2wasm.
wabt_version=1.0.33
wabt_url=https://github.com/WebAssembly/wabt/releases/download/${wabt_version}/wabt-${wabt_version}-ubuntu.tar.gz
wabt_version=1.0.35
wabt_url=https://github.com/WebAssembly/wabt/releases/download/${wabt_version}/wabt-${wabt_version}-ubuntu-20.04.tar.gz
curl -sSL ${wabt_url} | tar --strip-components 2 -C /usr/local/bin -xzf - wabt-${wabt_version}/bin/wat2wasm
- run: make testdata
- name: "generate testdata"
run: make testdata

- name: Check diff
run: git diff --exit-code -- .
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@ guest/.tinygo-target.json: scheduler/go.mod

.PHONY: build-wat
build-wat: $(wildcard scheduler/test/testdata/*/*.wat)
@for f in $^; do \
@set -e; for f in $^; do \
wasm=$$(echo $$f | sed -e 's/\.wat/\.wasm/'); \
wat2wasm -o $$wasm --debug-names $$f; \
done

.PHONY: testdata
testdata:
@$(MAKE) build-tinygo
@$(MAKE) build-wat
testdata: build-tinygo build-wat

.PHONY: profile
profile: examples/advanced/main-debug.wasm
Expand Down
Binary file modified scheduler/test/testdata/test/bind_from_global.wasm
Binary file not shown.
Binary file modified scheduler/test/testdata/test/postbind_from_global.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion scheduler/test/testdata/test/postbind_from_global.wat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

(func (export "postbind")
(if (i32.eq (global.get $flag) (i32.const 1))
(unreachable)
(then unreachable)
)
)

Expand Down
Binary file modified scheduler/test/testdata/test/postfilter_from_global.wasm
Binary file not shown.
Binary file modified scheduler/test/testdata/test/prebind_from_global.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion scheduler/test/testdata/test/reserve_from_global.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

(func (export "unreserve")
(if (i32.eq (global.get $flag) (i32.const 1))
(unreachable)
(then unreachable)
)
)
)
Binary file modified scheduler/test/testdata/test/scoreextensions_from_global.wasm
Binary file not shown.

0 comments on commit 45428bb

Please sign in to comment.