Actually add test/runtests.sh

This adds the missing shell script that runs the tests.

Fixes: 4916320ec3 ("Separate test cases from examples")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Jens Axboe
2019-04-23 12:04:19 -06:00
parent 87e2c401aa
commit ad45ed1d67

20
test/runtests.sh Executable file
View File

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