tests: update expect file for u_direct_io
[e2fsprogs.git] / tests / test_script.in
blob442999db2ce83392ad5809ac318b4a02b5c4fd7c
1 #!/bin/sh
2 # Run all or specified test scripts
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
14 --failed)
15 DO_FAILED=yes
16 shift
18 esac
20 TESTS=
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 " "
29 for fname in $FAILED ; do
30 TESTS="$TESTS $SRCDIR/${fname%%.failed}"
31 done
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
41 if test "$TESTS"x = x ; then
42 if test -n "$DO_FAILED"; then
43 exit 0
45 TESTS=`ls -d $SRCDIR/[a-zA-Z]_*`
48 for test_dir in $TESTS; do
49 ./test_one $test_dir
50 done
52 $SRCDIR/test_post