File: test_script.in

package info (click to toggle)
e2fsprogs 1.47.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates
  • size: 44,040 kB
  • sloc: ansic: 132,791; sh: 7,273; makefile: 5,315; awk: 524; perl: 376; cpp: 207; sed: 186; python: 23
file content (52 lines) | stat: -rw-r--r-- 933 bytes parent folder | download | duplicates (5)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/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
	;;
    --failed)
	DO_FAILED=yes
	shift
	;;
esac

TESTS=

if test -n "$DO_FAILED"; then
    FAILED=$(find . -maxdepth 1 -name \*.failed)
    if test -z "$FAILED" ; then
	echo " "
	echo "No (more) failed tests!"
	echo " "
    fi
    for fname in $FAILED ; do
	TESTS="$TESTS $SRCDIR/${fname%%.failed}"
    done
fi

for i; do
  case $i in
	[a-zA-Z])	TESTS="$TESTS $SRCDIR/${i}_*" ;;
	*)		TESTS="$TESTS $SRCDIR/$i" ;;
  esac
done

if test "$TESTS"x = x ; then
    if test -n "$DO_FAILED"; then
	exit 0
    fi
    TESTS=`ls -d $SRCDIR/[a-zA-Z]_*`
fi

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

$SRCDIR/test_post