Rename Go source dirs for Wasms to testdata. (#106)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2021-12-31 17:33:03 +09:00
committed by GitHub
parent 68c631e182
commit 26ee5eb735
22 changed files with 11 additions and 11 deletions

View File

@@ -7,11 +7,11 @@ bench:
.PHONY: build.bench
build.bench:
tinygo build -o bench/case/case.wasm -scheduler=none -target=wasi bench/case/case.go
tinygo build -o bench/testdata/case.wasm -scheduler=none -target=wasi bench/testdata/case.go
.PHONY: build.examples
build.examples:
@find ./examples/wasm -type f -name "*.go" | xargs -Ip /bin/sh -c 'tinygo build -o $$(echo p | sed -e 's/\.go/\.wasm/') -scheduler=none -target=wasi p'
@find ./examples/testdata -type f -name "*.go" | xargs -Ip /bin/sh -c 'tinygo build -o $$(echo p | sed -e 's/\.go/\.wasm/') -scheduler=none -target=wasi p'
spectests_cases_dir := wasm/spectests/cases
spec_version := wg-1.0

View File

@@ -22,7 +22,7 @@ func BenchmarkEngines(b *testing.B) {
}
func setUpStore(store *wasm.Store) {
buf, err := os.ReadFile("case/case.wasm")
buf, err := os.ReadFile("testdata/case.wasm")
if err != nil {
panic(err)
}

Binary file not shown.

View File

@@ -1,4 +1,4 @@
This is where we put e2e tests of virtual machine. Please place examples so that `examples/foo_test.go` is testing
`examples/wasm/foo.wasm` binary which is generated by compiling
`examples/wasm/foo.go` with latest version of TinyGo.
`examples/testdata/foo.wasm` binary which is generated by compiling
`examples/testdata/foo.go` with latest version of TinyGo.

View File

@@ -12,7 +12,7 @@ import (
)
func Test_fibonacci(t *testing.T) {
buf, err := os.ReadFile("wasm/fibonacci.wasm")
buf, err := os.ReadFile("testdata/fibonacci.wasm")
require.NoError(t, err)
mod, err := wasm.DecodeModule(buf)

View File

@@ -42,7 +42,7 @@ func readFile(fs wasi.FS, path string) ([]byte, error) {
}
func Test_file_system(t *testing.T) {
buf, err := os.ReadFile("wasm/file_system.wasm")
buf, err := os.ReadFile("testdata/file_system.wasm")
require.NoError(t, err)
mod, err := wasm.DecodeModule(buf)

View File

@@ -15,7 +15,7 @@ import (
)
func Test_hostFunc(t *testing.T) {
buf, err := os.ReadFile("wasm/host_func.wasm")
buf, err := os.ReadFile("testdata/host_func.wasm")
require.NoError(t, err)
mod, err := wasm.DecodeModule((buf))

View File

@@ -19,7 +19,7 @@ import (
// (start $hello)
// )
func Test_Simple(t *testing.T) {
buf, err := os.ReadFile("wasm/simple.wasm")
buf, err := os.ReadFile("testdata/simple.wasm")
require.NoError(t, err)
mod, err := wasm.DecodeModule(buf)
require.NoError(t, err)

View File

@@ -14,7 +14,7 @@ import (
)
func Test_stdio(t *testing.T) {
buf, err := os.ReadFile("wasm/stdio.wasm")
buf, err := os.ReadFile("testdata/stdio.wasm")
require.NoError(t, err)
mod, err := wasm.DecodeModule(buf)
require.NoError(t, err)

View File

@@ -12,7 +12,7 @@ import (
)
func Test_trap(t *testing.T) {
buf, err := os.ReadFile("wasm/trap.wasm")
buf, err := os.ReadFile("testdata/trap.wasm")
require.NoError(t, err)
mod, err := wasm.DecodeModule((buf))