mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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 <lczerner@redhat.com> Reviewed-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user