|
From: | Jon Schlueter |
Subject: | Re: [gpsd-dev] [PATCH 2/2] Suppresses bloated regression diff when test produces no output. |
Date: | Tue, 23 Feb 2016 06:47:26 -0500 |
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.
---
regress-driver | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/regress-driver b/regress-driver
index 4289af2..3410847 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-$$
--
2.7.1
[Prev in Thread] | Current Thread | [Next in Thread] |