2 # Default script for testing the relocation library routines
3 # (irel -- inode relocation and brel -- block relocation)
6 if [ -f $test_dir/setup ]; then
10 if [ "$class"x = x ]; then
11 class=`echo $test_name | sed -e 's/e_\([^_]*\)_\(.*\)/\1/'`
12 instance=`echo $test_name | sed -e 's/e_\([^_]*\)_\(.*\)/\2/'`
14 if [ "$OUT"x = x ]; then
17 if [ "$EXPECT"x = x ]; then
18 EXPECT=$SRCDIR/progs/test_data/expect.$class
21 if [ "$class" = irel ]; then
23 elif [ "$class" = brel ]; then
25 elif [ "$class" = icount ]; then
26 TEST_PROG=$TEST_ICOUNT
31 cat $SRCDIR/progs/test_data/$instance.setup $SRCDIR/progs/test_data/test.$class \
32 | $TEST_PROG -f - 2>&1 | tr -d \\015 > $OUT
37 rm -f $test_name.failed $test_name.ok
39 if [ "$status" = 0 ] ; then
44 diff $DIFF_OPTS $EXPECT $OUT > $test_name.failed
47 unset EXPECT OUT class instance