Fix suggested by Jos for hands.test. Some of the functionality
authorMartin Pool <mbp@samba.org>
Tue, 26 Mar 2002 10:28:57 +0000 (10:28 +0000)
committerMartin Pool <mbp@samba.org>
Tue, 26 Mar 2002 10:28:57 +0000 (10:28 +0000)
previously built into Phil's test was clashing with the runtests.sh
framework.  I think one of the core problems might be that scripts
which don't explicitly "exit 0" have return codes which vary depending
on the particular shell.  (c.f. the autoconf portability guide.)

This might break the Debian test suite but I'm afraid I don't know
enough about how it works yet.  Hopefully eventually it can become
just a wrapper around our 'make check'.

testsuite/hands.test
testsuite/rsync.fns

index fced34a..4705641 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
-# Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
-# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
+# Copyright (C) 1998, 1999 by Philip Hands <phil@hands.com>
+# Copyright (C) 2001, 2002 by Martin Pool <mbp@samba.org>
 #
 # This program is distributable under the terms of the GNU GPL (see COPYING)
 
@@ -24,7 +24,3 @@ runtest "extra data" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
 cp ${FROM}/text ${TO}/ThisShouldGo
 runtest " --delete" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
-
-checkforlogs ${LOG}.?
-
-hands_cleanup
\ No newline at end of file
index 1bb23f9..1d748ae 100644 (file)
@@ -102,13 +102,6 @@ hands_setup() {
 }
 
 
-hands_cleanup() {
-    rm -r "$TMP"
-}
-
-
-
-
 ####################
 # Many machines do not have "mkdir -p", so we have to build up long paths.
 # How boring.  
@@ -181,21 +174,6 @@ checkit() {
 }
 
 
-# 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
-}
-
-
 build_rsyncd_conf() {
     # Build an appropriate configuration file
     conf="$scratchdir/test-rsyncd.conf"