xfs
[Top] [All Lists]

Re: [PATCH] xfstests: Change the diff output of failed tests

To: Lukas Czerner <lczerner@xxxxxxxxxx>
Subject: Re: [PATCH] xfstests: Change the diff output of failed tests
From: Lukas Czerner <lczerner@xxxxxxxxxx>
Date: Thu, 19 Apr 2012 10:39:57 +0200 (CEST)
Cc: xfs@xxxxxxxxxxx, Dave Chinner <david@xxxxxxxxxxxxx>
In-reply-to: <1334047113-32720-1-git-send-email-lczerner@xxxxxxxxxx>
References: <1334047113-32720-1-git-send-email-lczerner@xxxxxxxxxx>
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)
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@xxxxxxxxxx>
> ---
>  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
> 

-- 

<Prev in Thread] Current Thread [Next in Thread>