diff --git a/Makefile b/Makefile index 3268e4731..1bca6b951 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ integration-tests: release echo "Running Integration Tests" ./integration_tests/lua/test.sh ./integration_tests/nginx/test.sh + ./integration_tests/cowsay/test.sh lint: cargo fmt --all -- --check diff --git a/examples/cowsay.wasm b/examples/cowsay.wasm new file mode 100755 index 000000000..4ff43df2c Binary files /dev/null and b/examples/cowsay.wasm differ diff --git a/integration_tests/cowsay/README.md b/integration_tests/cowsay/README.md new file mode 100644 index 000000000..f44e6e680 --- /dev/null +++ b/integration_tests/cowsay/README.md @@ -0,0 +1,9 @@ +# `cowsay` integration test + + +This starts Wasmer with the Cowsay WASI Wasm file. The test makes assertions on +the output of Wasmer. Run test with: + +```bash +./integration_tests/cowsay/test.sh +``` diff --git a/integration_tests/cowsay/test.sh b/integration_tests/cowsay/test.sh new file mode 100755 index 000000000..20c46a259 --- /dev/null +++ b/integration_tests/cowsay/test.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +nohup ./target/release/wasmer run examples/cowsay.wasm --disable-cache -- "hello integration" + +if grep "hello integration" ./nohup.out +then + echo "cowsay wasi integration test succeeded" + rm ./nohup.out + exit 0 +else + echo "cowsay wasi integration test failed" + rm ./nohup.out + exit -1 +fi