diff options
author | Theodore Ts'o <tytso@mit.edu> | 1997-04-29 16:17:09 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 1997-04-29 16:17:09 +0000 |
commit | 19c78dc07fce2d6f39b5e541562afc3ca1ea38ff (patch) | |
tree | 028d1af38c00e2cb267cb966cb68028b0a007b44 /tests/defaults | |
parent | 21c84b71e205b5ab13f14343da5645dcc985856d (diff) | |
download | e2fsprogs-19c78dc07fce2d6f39b5e541562afc3ca1ea38ff.tar.gz |
Many files:
Checked in e2fsprogs-1.07
Diffstat (limited to 'tests/defaults')
-rw-r--r-- | tests/defaults/r_script | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/defaults/r_script b/tests/defaults/r_script new file mode 100644 index 00000000..43e1cc2f --- /dev/null +++ b/tests/defaults/r_script @@ -0,0 +1,37 @@ +# +# Default script for testing the relocation library routines +# (irel -- inode relocation and brel -- block relocation) +# + +if [ -f $test_dir/setup ]; then + . $test_dir/setup +fi + +if [ "$class"x = x ]; then + class=`echo $test_name | sed -e 's/r_\([^_]*\)_\(.*\)/\1/'` + instance=`echo $test_name | sed -e 's/r_\([^_]*\)_\(.*\)/\2/'` +fi +if [ "$OUT"x = x ]; then + OUT=$test_name.log +fi +if [ "$EXPECT"x = x ]; then + EXPECT=$SRCDIR/progs/rel_test/expect.$class +fi + +cat $SRCDIR/progs/rel_test/$instance.setup $SRCDIR/progs/rel_test/test.$class \ + | $TEST_REL -f - > $OUT 2>&1 + +cmp -s $EXPECT $OUT +status=$? + +rm -f $test_name.failed $test_name.ok + +if [ "$status" = 0 ] ; then + echo "ok" + touch $test_name.ok +else + echo "failed" + diff -c $EXPECT $OUT > $test_name.failed +fi + +unset EXPECT OUT class instance |