Added WASI integration tests

This commit is contained in:
Syrus 2019-04-22 17:06:42 -07:00
parent baae2b3826
commit 2a1df0fdf1
3 changed files with 24 additions and 0 deletions

View File

@ -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

View File

@ -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
```

View File

@ -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