From 0416414b4dcaa8f8def74b9449856e6911f65282 Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Mon, 22 Feb 2016 15:53:37 -0800 Subject: Suppresses bloated regression diff when test produces no output. At present, if a daemon regression test simply dies without producing any output, the console (or log) gets a huge useless diff between the expected output and the null output. This change checks for that case and replaces the diff with a single line indicating that no output was produced. It does not affect the success/failure decision. If a test produces some output before dying, the behavior is unchanged. Although it would be useful to have a more intelligent diff in that case, that would be a considerably more complicated change, and is also a much less common case. TESTED: Tested a success case, a normal failing case (by tweaking the .chk file), and a fatal error case (by making "python2" not work). Observed expected results (including return code) in all cases. Signed-off-by: Jon Schlueter --- regress-driver | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'regress-driver') diff --git a/regress-driver b/regress-driver index 4289af2d..34108479 100755 --- a/regress-driver +++ b/regress-driver @@ -140,7 +140,10 @@ case $mode in fi if test -s ${TMP}/diff-$$ ; then errors=`expr $errors + 1`; - error_list="$error_list \"${f}\"" + error_list="$error_list \"${f}\"" + if ! test -s ${TMP}/test-$$.chk ; then + echo " Output missing for ${f}" >${TMP}/diff-$$ + fi if [ -z "$logfile" ] then cat ${TMP}/diff-$$ -- cgit v1.2.1