Don't leave temp files around after test has completed successfully.
Some test scripts were creating their own temporary files, and in
some cases test_one was skipping a test completely (e.g. slow) after
the temp file had been created.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
else
echo "$test_name: $test_description: failed"
diff $DIFF_OPTS $EXP $OUT > $test_name.failed
- rm -f $test_name.tmp
fi
+rm -f $EXP
unset IMAGE FSCK_OPT OUT EXP
else
echo "$test_name: $test_description: failed"
diff $DIFF_OPTS $EXP $OUT > $test_name.failed
- rm -f $test_name.tmp
fi
+rm -f $EXP
unset IMAGE FSCK_OPT OUT EXP
# Do the verification
#
-rm -f $TMPFILE $OUT.new
+rm -f $TMPFILE $OUT.new $TEST_DATA $VERIFY_DATA
cmp -s $OUT $EXP
status=$?
test_name=`echo $test_dir | sed -e 's;.*/;;'`
-TMPFILE=$(mktemp ${TMPDIR:-/tmp}/e2fsprogs-tmp-$test_name.XXXXXX)
-trap 'rm -f $TMPFILE ; exit' 1 2 15
-
if [ -f $test_dir ] ; then
exit 0;
fi
rm -f $test_name.ok $test_name.failed
#echo -e -n "$test_name: $test_description:\r"
+TMPFILE=$(mktemp ${TMPDIR:-/tmp}/e2fsprogs-tmp-$test_name.XXXXXX)
+trap 'rm -f $TMPFILE ; exit' 1 2 15
+
if [ -f $test_dir/script ]; then
. $test_dir/script
else