mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-03-15 21:09:01 -04:00
Fix suggested by Jos for hands.test. Some of the functionality
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'.
This commit is contained in:
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user