aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-05-31 20:13:51 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-05-31 20:13:51 -0400
commiteb92f5741fdbb968045d49a2cad153fe7e21c32e (patch)
treeed257fad8c8b22f89f5f37f8e350782ceff6bebc /tests
parentbe1b8c6fe8bbb9c78cc3f9d1f963618e7c5823a7 (diff)
downloade2fsprogs-eb92f5741fdbb968045d49a2cad153fe7e21c32e.tar.gz
e2fsprogs-eb92f5741fdbb968045d49a2cad153fe7e21c32e.tar.xz
e2fsprogs-eb92f5741fdbb968045d49a2cad153fe7e21c32e.zip
tests: fix the e2fsck test script to handle a missing test name
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/run_e2fsck17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/run_e2fsck b/tests/run_e2fsck
index 937a171b..ab623e87 100644
--- a/tests/run_e2fsck
+++ b/tests/run_e2fsck
@@ -82,12 +82,23 @@ if [ "$SKIP_VERIFY" != "true" ] ; then
status3=0
fi
+ if [ -z "$test_description" ] ; then
+ description="$test_name"
+ else
+ description="$test_name: $test_description"
+ fi
+
if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then
- echo "$test_name: $test_description: ok"
+ echo "$description: ok"
touch $test_name.ok
else
- echo "$test_name: $test_description: failed"
- diff $DIFF_OPTS $EXP1 $OUT1 > $test_name.failed
+ echo "$description: failed"
+ rm -f $test_name.failed
+ if [ "$PASS_ZERO" = "true" ]; then
+ diff $DIFF_OPTS $test_dir/expect.0 \
+ $test_name.0.log >> $test_name.failed
+ fi
+ diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed
if [ "$ONE_PASS_ONLY" != "true" ]; then
diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed
fi