public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: Change the diff output of failed tests
@ 2012-04-10  8:38 Lukas Czerner
  2012-04-19  8:39 ` Lukas Czerner
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Czerner @ 2012-04-10  8:38 UTC (permalink / raw)
  To: xfs; +Cc: Lukas Czerner

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfstests: Change the diff output of failed tests
  2012-04-10  8:38 [PATCH] xfstests: Change the diff output of failed tests Lukas Czerner
@ 2012-04-19  8:39 ` Lukas Czerner
  0 siblings, 0 replies; 2+ messages in thread
From: Lukas Czerner @ 2012-04-19  8:39 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: xfs

On Tue, 10 Apr 2012, Lukas Czerner wrote:

> 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.

ping

> 
> 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
> 

-- 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-19  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-10  8:38 [PATCH] xfstests: Change the diff output of failed tests Lukas Czerner
2012-04-19  8:39 ` Lukas Czerner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox