From 863dff5179921b8214f7f6a874e620f3e9bb2d9a Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Wed, 29 Aug 2001 09:15:17 +0000 Subject: [PATCH] Cleanup check_logs feature. --- runtests.sh | 3 +-- testsuite/rsync.fns | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/runtests.sh b/runtests.sh index 8d5bde76..c27afdab 100755 --- a/runtests.sh +++ b/runtests.sh @@ -147,8 +147,7 @@ do continue fi - echo "------------------------------------------------------------" - echo "----- $testbase running" + echo "----- $testbase starting" if sh $RUNSHFLAGS "$testscript" then diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index 8729a4ab..3cbb7687 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -83,3 +83,18 @@ checkit() { fi } + +# In fact, we need a more general feature of capturing all stderr/log files, +# and dumping them if something goes wrong. + +checkforlogs() { + # skip it if we're under debian-test + if test -n "${Debian}" ; then return 0 ; fi + + if [ -f $1 -a -s $1 ] ; then + echo "Failures have occurred. $1 follows:" >&2 + cat $1 >&2 + exit 1 + fi +} + -- 2.11.4.GIT