[PATCH] tests: Add option to print diff output of failed tests

From
Lukas Czerner <hidden>
Date
2021-09-02 10:59:01
Add variable $PRINT_FAILED which when set will print the diff output of
a failed test.

Signed-off-by: Lukas Czerner <redacted>
---
 tests/test_one.in | 4 ++++
 1 file changed, 4 insertions(+)
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
-- 
2.31.1
Thread (2 messages) 2 messages, 2 authors, last reply 2021-10-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help