summaryrefslogtreecommitdiff
path: root/tests/test_script.in
blob: 41ad104b93c0d5ab8cad0b834e5564add330ab79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# Run all or specified test scripts
#

case "$1" in
    --valgrind)
    	export USE_VALGRIND="valgrind -q --sim-hints=lax-ioctls"
	shift;
	;;
    --valgrind-leakcheck)
    	export USE_VALGRIND="valgrind --sim-hints=lax-ioctls --leak-check=full --show-reachable=yes --log-file=/tmp/valgrind-%p.log"
	shift;
	;;
esac

if test "$1"x = x ; then
  TESTS=`ls -d $SRCDIR/[a-zA-Z]_*`
else
  TESTS=
  for i; do
    case $i in
	[a-zA-Z])	TESTS="$TESTS $SRCDIR/${i}_*" ;;
	*)		TESTS="$TESTS $SRCDIR/$i" ;;
    esac
  done
fi

for test_dir in $TESTS; do
	./test_one $test_dir
done

$SRCDIR/test_post