diff --git a/bin/tests/system/autosign/ns3/keygen.sh b/bin/tests/system/autosign/ns3/keygen.sh index 8f1ff3cf93..b33dead98f 100644 --- a/bin/tests/system/autosign/ns3/keygen.sh +++ b/bin/tests/system/autosign/ns3/keygen.sh @@ -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 () { diff --git a/bin/tests/system/cds/tests.sh b/bin/tests/system/cds/tests.sh index 7ef22895d0..43368a4c5d 100644 --- a/bin/tests/system/cds/tests.sh +++ b/bin/tests/system/cds/tests.sh @@ -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 } diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index 7519e9d9b9..414eb1ce3f 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -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=$? diff --git a/bin/tests/system/verify/zones/genzones.sh b/bin/tests/system/verify/zones/genzones.sh index 3cd623ca70..34d9ecbe3a 100644 --- a/bin/tests/system/verify/zones/genzones.sh +++ b/bin/tests/system/verify/zones/genzones.sh @@ -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"