Skip to content

Commit 45428bb

Browse files
authored
Merge pull request #111 from kubernetes-sigs/fix-testdat
make sure if there's no diff in ci
2 parents 06c9f99 + f3cce80 commit 45428bb

File tree

9 files changed

+11
-9
lines changed

9 files changed

+11
-9
lines changed

.github/workflows/testdata.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@ jobs:
4747
4848
- name: "Set up wat2wasm"
4949
run: | # Needed for testdata. wabt includes wat2wasm.
50-
wabt_version=1.0.33
51-
wabt_url=https://github.com/WebAssembly/wabt/releases/download/${wabt_version}/wabt-${wabt_version}-ubuntu.tar.gz
50+
wabt_version=1.0.35
51+
wabt_url=https://github.com/WebAssembly/wabt/releases/download/${wabt_version}/wabt-${wabt_version}-ubuntu-20.04.tar.gz
5252
curl -sSL ${wabt_url} | tar --strip-components 2 -C /usr/local/bin -xzf - wabt-${wabt_version}/bin/wat2wasm
5353
54-
- run: make testdata
54+
- name: "generate testdata"
55+
run: make testdata
56+
57+
- name: Check diff
58+
run: git diff --exit-code -- .

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,13 @@ guest/.tinygo-target.json: scheduler/go.mod
3636

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

4444
.PHONY: testdata
45-
testdata:
46-
@$(MAKE) build-tinygo
47-
@$(MAKE) build-wat
45+
testdata: build-tinygo build-wat
4846

4947
.PHONY: profile
5048
profile: examples/advanced/main-debug.wasm
16 Bytes
Binary file not shown.
9 Bytes
Binary file not shown.

scheduler/test/testdata/test/postbind_from_global.wat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
(func (export "postbind")
1111
(if (i32.eq (global.get $flag) (i32.const 1))
12-
(unreachable)
12+
(then unreachable)
1313
)
1414
)
1515

33 Bytes
Binary file not shown.
16 Bytes
Binary file not shown.

scheduler/test/testdata/test/reserve_from_global.wat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
(func (export "unreserve")
1616
(if (i32.eq (global.get $flag) (i32.const 1))
17-
(unreachable)
17+
(then unreachable)
1818
)
1919
)
2020
)
16 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)