2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Merge branch 'fix-debug-output' into 'master'

echo debug output (D:text) the same as informational (I:text)

See merge request isc-projects/bind9!1081
This commit is contained in:
Evan Hunt 2018-11-16 14:40:25 -05:00
commit d4bad35bb0
4 changed files with 22 additions and 9 deletions

View File

@ -15,8 +15,8 @@ SYSTEMTESTTOP=../..
SYSTESTDIR=autosign
dumpit () {
echo "D:${debug}: dumping ${1}"
cat "${1}" | sed 's/^/D:/'
echo_d "${debug}: dumping ${1}"
cat "${1}" | cat_d
}
setup () {

View File

@ -33,7 +33,7 @@ testcase() {
check_stdout
check_stderr
if [ "$expect" -ne "$result" ]; then
echo "D:exit status does not match $expect"
echo_d "exit status does not match $expect"
fail
fi
unset name err out
@ -45,19 +45,19 @@ check_stderr() {
else
[ -s err.$n ] || return 0
fi
echo "D:stderr did not match '$err'"
sed 's/^/D:/' err.$n
echo_d "stderr did not match '$err'"
cat err.$n | cat_d
fail
}
check_stdout() {
cmp out.$n "${out:-empty}" >/dev/null && return
echo "D:stdout did not match '$out'"
echo_d "stdout did not match '$out'"
( echo "wanted"
cat "$out"
echo "got"
cat out.$n
) | sed 's/^/D:/'
) | cat_d
fail
}

View File

@ -240,6 +240,19 @@ cat_i() {
done
}
echo_d() {
echo "$@" | while read __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE"
done
}
cat_d() {
while read __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE"
done
}
digcomp() {
output=`$PERL $SYSTEMTESTTOP/digcomp.pl "$@"`
result=$?

View File

@ -13,8 +13,8 @@ SYSTEMTESTTOP=../..
SYSTESTDIR=verify
dumpit () {
echo "D:${debug}: dumping ${1}"
cat "${1}" | sed 's/^/D:/'
echo_d "${debug}: dumping ${1}"
cat "${1}" | cat_d
}
setup () {
echo_i "setting up $2 zone: $1"