3 # Test script for e2fsck
6 if test "$1"x = x ; then
7 TESTS=`ls -d $SRCDIR/[a-zA-Z]_* | $EGREP -v "\.failed|\.new"`
13 *.failed|*.new) continue ;;
14 [a-zA-Z]) TESTS="$TESTS $SRCDIR/${i}_*" ;;
15 *) TESTS="$TESTS $SRCDIR/$i" ;;
22 if test "$TEST_CONFIG"x = x; then
23 TEST_CONFIG=$SRCDIR/test_config
28 for test_dir in $TESTS
30 test_name=`echo $test_dir | sed -e 's;.*/;;'`
31 if [ -f $test_dir ] ; then
34 if [ ! -d $test_dir ] ; then
35 echo "The test '$test_name' does not exist."
38 if [ -f $test_dir/name ]; then
39 test_description=`cat $test_dir/name`
40 printf "%s: %s: " "$test_name" "$test_description"
42 printf "%s: " "$test_name"
44 if [ -f $test_dir/script ]; then
47 test_base=`echo $test_name | sed -e 's/_.*//'`
48 default_script=$SRCDIR/defaults/${test_base}_script
49 if [ -f $default_script ]; then
50 . $SRCDIR/defaults/${test_base}_script
52 echo "Missing test script!"
57 num_ok=`ls *.ok 2>/dev/null | wc -l`
58 num_failed=`ls *.failed 2>/dev/null | wc -l`
60 echo "$num_ok tests succeeded $num_failed tests failed"