blob: dc104f432d9e30280825762a82d6e837bbfb6b1d [file] [log] [blame]
Theodore Ts'oa418d3a1997-04-26 14:00:26 +00001#!/bin/sh
2#
3# Test script for e2fsck
4#
5
6if test "$1"x = x ; then
7SRCDIR=.
8else
9SRCDIR=$1
10fi
11
12cmd_dir=$SRCDIR
13TMPFILE=./test.img
14
15. $SRCDIR/test_config
16
17for test_dir in $SRCDIR/[a-zA-Z]_*
18do
19 test_name=`echo $test_dir | sed -e 's;.*/;;'`
20 if [ -f $test_dir/name ]; then
21 test_description=`cat $test_dir/name`
22 echo -n "$test_name: $test_description: "
23 else
24 echo -n "$test_name: "
25 fi
26 if [ -f $test_dir/script ]; then
27 . $test_dir/script
28 else
29 test_base=`echo $test_name | sed -e 's/_.*//'`
30 default_script=$SRCDIR/defaults/${test_base}_script
31 if [ -f $default_script ]; then
32 . $SRCDIR/defaults/${test_base}_script
33 else
34 echo "Missing test script!"
35 fi
36 fi
37done
38
39num_ok=`ls *.ok | wc -l`
40num_failed=`ls *.failed 2>/dev/null | wc -l`
41
42echo "$num_ok tests succeeded $num_failed tests failed"
43