384: Added WASI integration tests r=syrusakbary a=syrusakbary

Added WASI integration tests

Co-authored-by: Syrus <me@syrusakbary.com>
This commit is contained in:
bors[bot]
2019-04-23 03:02:08 +00:00
4 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

BIN
examples/cowsay.wasm Executable file

Binary file not shown.

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