summaryrefslogblamecommitdiff
path: root/test/runtests.sh
blob: 8307eac7ae9fb1a0e08385aeaf3083e2bf0a800c (plain) (tree)
1
2
3
4
5
6
7





           
         








                                                               
                                   



                     



                                   
         
#!/bin/bash

TESTS="$@"
RET=0

TIMEOUT=10
FAILED=""

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
		FAILED="$FAILED $t"
		RET=1
	fi
done

if [ "${RET}" -ne 0 ]; then
	echo "Tests $FAILED failed"
fi

exit $RET