diff --git a/README b/README index d81ede9f..b70f75d5 100644 --- a/README +++ b/README @@ -63,6 +63,8 @@ Preparing system for tests (IRIX and Linux): - if TEST_LOGDEV and/or TEST_RTDEV, these will always be used. - if SCRATCH_LOGDEV and/or SCRATCH_RTDEV, the USE_EXTERNAL environment variable set to "yes" will enable their use. + - setenv DIFF_LENGTH "number of diff lines to print from a failed test", + by default 10, set to 0 to print the full diff - or add a case to the switch in common.config assigning these variables based on the hostname of your test machine diff --git a/check b/check index 75addb54..c20179c4 100755 --- a/check +++ b/check @@ -30,6 +30,8 @@ notrun="" interrupt=true export QA_CHECK_FS=${QA_CHECK_FS:=true} +# number of diff lines from a failed test, 0 for whole output +export DIFF_LENGTH=${DIFF_LENGTH:=10} # by default don't output timestamps timestamp=${TIMESTAMP:=false} @@ -287,7 +289,12 @@ do else echo " - output mismatch (see $seq.out.bad)" mv $tmp.out $seq.out.bad - $diff $seq.out $seq.out.bad | head -n 10 | \ + $diff $seq.out $seq.out.bad | { + if test "$DIFF_LENGTH" -le 0; then + cat + else + head -n "$DIFF_LENGTH" + fi; } | \ sed -e 's/^\(.\)/ \1/' echo " ..." echo " (Run '$diff $seq.out $seq.out.bad' to see the" \