]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blob - tests/test_script.in
e2image: fix typo which causes a compile failure on i386
[thirdparty/e2fsprogs.git] / tests / test_script.in
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 --failed)
15 DO_FAILED=yes
16 shift
17 ;;
18 esac
19
20 TESTS=
21
22 if test -n "$DO_FAILED"; then
23 FAILED=$(find . -maxdepth 1 -name \*.failed)
24 if test -z "$FAILED" ; then
25 echo " "
26 echo "No (more) failed tests!"
27 echo " "
28 fi
29 for fname in $FAILED ; do
30 TESTS="$TESTS $SRCDIR/${fname%%.failed}"
31 done
32 fi
33
34 for i; do
35 case $i in
36 [a-zA-Z]) TESTS="$TESTS $SRCDIR/${i}_*" ;;
37 *) TESTS="$TESTS $SRCDIR/$i" ;;
38 esac
39 done
40
41 if test "$TESTS"x = x ; then
42 if test -n "DO_FAILED"; then
43 exit 0
44 fi
45 TESTS=`ls -d $SRCDIR/[a-zA-Z]_*`
46 fi
47
48 for test_dir in $TESTS; do
49 ./test_one $test_dir
50 done
51
52 $SRCDIR/test_post