From: Lukas Czerner <lczerner@redhat.com>
To: xfs@oss.sgi.com
Cc: Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH] xfstests: Change the diff output of failed tests
Date: Tue, 10 Apr 2012 10:38:33 +0200 [thread overview]
Message-ID: <1334047113-32720-1-git-send-email-lczerner@redhat.com> (raw)
Currently the entire diff is printed to the stdout in the case that the
test output template differs from the actual test run. However in some
cases the diff can be _very_ long. This commit changes it so that we
print only first 10 lines of the diff.
Also indent the diff output from the left by four spaces for better
output readability.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
check | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/check b/check
index f792009..c5d67a5 100755
--- a/check
+++ b/check
@@ -286,7 +286,11 @@ do
else
echo " - output mismatch (see $seq.out.bad)"
mv $tmp.out $seq.out.bad
- $diff $seq.out $seq.out.bad
+ $diff $seq.out $seq.out.bad | head -n 10 | \
+ sed -e 's/^\(.\)/ \1/'
+ echo " ..."
+ echo " (Run '$diff $seq.out $seq.out.bad' to see the" \
+ "entire diff)"
err=true
fi
fi
--
1.7.4.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2012-04-10 8:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 8:38 Lukas Czerner [this message]
2012-04-19 8:39 ` [PATCH] xfstests: Change the diff output of failed tests Lukas Czerner
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=1334047113-32720-1-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=xfs@oss.sgi.com \
/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