linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH] tests: Add option to print diff output of failed tests
Date: Thu,  2 Sep 2021 12:58:52 +0200	[thread overview]
Message-ID: <20210902105852.72745-1-lczerner@redhat.com> (raw)

Add variable $PRINT_FAILED which when set will print the diff output of
a failed test.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
 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


             reply	other threads:[~2021-09-02 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 10:58 Lukas Czerner [this message]
2021-10-01  1:57 ` [PATCH] tests: Add option to print diff output of failed tests Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210902105852.72745-1-lczerner@redhat.com \
    --to=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).