From: Lukas Czerner Date: Tue, 10 Apr 2012 08:38:33 +0000 (+0200) Subject: xfstests: Change the diff output of failed tests X-Git-Tag: v2022.05.01~3553 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=11c1d79414e257131a00c273a93c5f4db010269b;p=users%2Fhch%2Fxfstests-dev.git xfstests: Change the diff output of failed tests 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 Reviewed-by: Ben Myers Signed-off-by: Ben Myers --- diff --git a/check b/check index a4af0f68d..75addb54c 100755 --- a/check +++ b/check @@ -287,7 +287,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