summaryrefslogtreecommitdiff
path: root/regress-driver
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2016-02-22 15:53:37 -0800
committerJon Schlueter <jschlueter@redhat.com>2016-02-23 06:46:35 -0500
commit0416414b4dcaa8f8def74b9449856e6911f65282 (patch)
tree9e7789f7491209a9af865ba488fea30ecdae6677 /regress-driver
parent17d126f75a8f6229d98a73d3a7932cd95d04b4cf (diff)
downloadgpsd-0416414b4dcaa8f8def74b9449856e6911f65282.tar.gz
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 <jschlueter@redhat.com>
Diffstat (limited to 'regress-driver')
-rwxr-xr-xregress-driver5
1 files changed, 4 insertions, 1 deletions
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-$$