aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2021-09-02 12:58:52 +0200
committerTheodore Ts'o <tytso@mit.edu>2021-09-30 21:56:40 -0400
commite99e05864464001864b5b17eee2e9a309a7878a9 (patch)
tree86bf46a54bc150c6beb85c4db7aa6b933f08d005
parentd8fe566ba5501d7de63b52fb590c0d628a74e027 (diff)
downloade2fsprogs-e99e05864464001864b5b17eee2e9a309a7878a9.tar.gz
tests: Add option to print diff output of failed tests
Add variable $PRINT_FAILED which when set will print the diff output of a failed test. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--tests/test_one.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_one.in b/tests/test_one.in
index 5d7607ad..78499ad0 100644
--- a/tests/test_one.in
+++ b/tests/test_one.in
@@ -82,6 +82,10 @@ if [ $elapsed -gt 60 -a ! -f $test_dir/is_slow_test ]; then
echo "$test_name: consider adding $test_dir/is_slow_test"
fi
+if [ -n "$PRINT_FAILED" -a -f $test_name.failed ] ; then
+ cat $test_name.failed
+fi
+
if [ "$SKIP_UNLINK" != "true" ] ; then
rm -f $TMPFILE
fi