Rename Go source dirs for Wasms to testdata. (#106)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
4
Makefile
4
Makefile
@@ -7,11 +7,11 @@ bench:
|
|||||||
|
|
||||||
.PHONY: build.bench
|
.PHONY: build.bench
|
||||||
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
|
.PHONY: build.examples
|
||||||
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
|
spectests_cases_dir := wasm/spectests/cases
|
||||||
spec_version := wg-1.0
|
spec_version := wg-1.0
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ func BenchmarkEngines(b *testing.B) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setUpStore(store *wasm.Store) {
|
func setUpStore(store *wasm.Store) {
|
||||||
buf, err := os.ReadFile("case/case.wasm")
|
buf, err := os.ReadFile("testdata/case.wasm")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
bench/case/case.wasm → bench/testdata/case.wasm
vendored
BIN
bench/case/case.wasm → bench/testdata/case.wasm
vendored
Binary file not shown.
@@ -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
|
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/testdata/foo.wasm` binary which is generated by compiling
|
||||||
`examples/wasm/foo.go` with latest version of TinyGo.
|
`examples/testdata/foo.go` with latest version of TinyGo.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Test_fibonacci(t *testing.T) {
|
func Test_fibonacci(t *testing.T) {
|
||||||
buf, err := os.ReadFile("wasm/fibonacci.wasm")
|
buf, err := os.ReadFile("testdata/fibonacci.wasm")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
mod, err := wasm.DecodeModule(buf)
|
mod, err := wasm.DecodeModule(buf)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func readFile(fs wasi.FS, path string) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Test_file_system(t *testing.T) {
|
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)
|
require.NoError(t, err)
|
||||||
|
|
||||||
mod, err := wasm.DecodeModule(buf)
|
mod, err := wasm.DecodeModule(buf)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Test_hostFunc(t *testing.T) {
|
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)
|
require.NoError(t, err)
|
||||||
|
|
||||||
mod, err := wasm.DecodeModule((buf))
|
mod, err := wasm.DecodeModule((buf))
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import (
|
|||||||
// (start $hello)
|
// (start $hello)
|
||||||
// )
|
// )
|
||||||
func Test_Simple(t *testing.T) {
|
func Test_Simple(t *testing.T) {
|
||||||
buf, err := os.ReadFile("wasm/simple.wasm")
|
buf, err := os.ReadFile("testdata/simple.wasm")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
mod, err := wasm.DecodeModule(buf)
|
mod, err := wasm.DecodeModule(buf)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Test_stdio(t *testing.T) {
|
func Test_stdio(t *testing.T) {
|
||||||
buf, err := os.ReadFile("wasm/stdio.wasm")
|
buf, err := os.ReadFile("testdata/stdio.wasm")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
mod, err := wasm.DecodeModule(buf)
|
mod, err := wasm.DecodeModule(buf)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,7 +12,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Test_trap(t *testing.T) {
|
func Test_trap(t *testing.T) {
|
||||||
buf, err := os.ReadFile("wasm/trap.wasm")
|
buf, err := os.ReadFile("testdata/trap.wasm")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
mod, err := wasm.DecodeModule((buf))
|
mod, err := wasm.DecodeModule((buf))
|
||||||
|
|||||||
Reference in New Issue
Block a user