diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-04-23 12:04:19 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-23 12:04:19 -0600 |
commit | ad45ed1d67833ccea7f20c60c0cd503e52998a56 (patch) | |
tree | ecc017ed4af994b4c86c36ed58ad71a55ab98ff7 /test | |
parent | 87e2c401aa6716b1c26139a34d3402e63e45e94a (diff) |
Actually add test/runtests.sh
This adds the missing shell script that runs the tests.
Fixes: 4916320ec374 ("Separate test cases from examples")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test')
-rwxr-xr-x | test/runtests.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/runtests.sh b/test/runtests.sh new file mode 100755 index 0000000..50cc0d0 --- /dev/null +++ b/test/runtests.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +TESTS="$@" +RET=0 + +TIMEOUT=10 + +for t in $TESTS; do + echo Running test $t + timeout -s INT $TIMEOUT ./$t + r=$? + if [ "${r}" -eq 124 ]; then + echo "Test $t timed out (may not be a failure)" + elif [ "${r}" -ne 0 ]; then + echo Test $t failed + RET=1 + fi +done + +exit $RET |