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

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