Home | History | Annotate | Download | only in tests
      1 #!/bin/sh
      2 # Run all or specified test scripts
      3 #
      4 
      5 case "$1" in
      6     --valgrind)
      7     	export USE_VALGRIND="valgrind -q --sim-hints=lax-ioctls"
      8 	shift;
      9 	;;
     10     --valgrind-leakcheck)
     11     	export USE_VALGRIND="valgrind --sim-hints=lax-ioctls --leak-check=full --show-reachable=yes --log-file=/tmp/valgrind-%p.log"
     12 	shift;
     13 	;;
     14 esac
     15 
     16 if test "$1"x = x ; then
     17   TESTS=`ls -d $SRCDIR/[a-zA-Z]_*`
     18 else
     19   TESTS=
     20   for i; do
     21     case $i in
     22 	[a-zA-Z])	TESTS="$TESTS $SRCDIR/${i}_*" ;;
     23 	*)		TESTS="$TESTS $SRCDIR/$i" ;;
     24     esac
     25   done
     26 fi
     27 
     28 for test_dir in $TESTS; do
     29 	./test_one $test_dir
     30 done
     31 
     32 $SRCDIR/test_post
     33