Blame SOURCES/e2fsprogs-1.45.6-tests-Add-option-to-print-diff-output-of-failed-test.patch

e427d2
From 4b2fa25a97e53636dfe216198a1e97266cf0709a Mon Sep 17 00:00:00 2001
e427d2
From: Lukas Czerner <lczerner@redhat.com>
e427d2
Date: Thu, 2 Sep 2021 12:58:52 +0200
e427d2
Subject: [PATCH 46/46] tests: Add option to print diff output of failed tests
e427d2
Content-Type: text/plain
e427d2
e427d2
Add variable $PRINT_FAILED which when set will print the diff output of
e427d2
a failed test.
e427d2
e427d2
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
e427d2
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e427d2
---
e427d2
 tests/test_one.in | 4 ++++
e427d2
 1 file changed, 4 insertions(+)
e427d2
e427d2
diff --git a/tests/test_one.in b/tests/test_one.in
e427d2
index 5d7607ad..78499ad0 100644
e427d2
--- a/tests/test_one.in
e427d2
+++ b/tests/test_one.in
e427d2
@@ -82,6 +82,10 @@ if [ $elapsed -gt 60 -a ! -f $test_dir/is_slow_test ]; then
e427d2
 	echo "$test_name:  consider adding $test_dir/is_slow_test"
e427d2
 fi
e427d2
 
e427d2
+if [ -n "$PRINT_FAILED" -a -f $test_name.failed ] ; then
e427d2
+	cat $test_name.failed
e427d2
+fi
e427d2
+
e427d2
 if [ "$SKIP_UNLINK" != "true" ] ; then
e427d2
 	rm -f $TMPFILE
e427d2
 fi
e427d2
-- 
e427d2
2.35.1
e427d2