summaryrefslogtreecommitdiff
path: root/test/runtests.sh
blob: 50cc0d084db6d5037d4b967256f294c3782c55df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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