Commit d1239eae authored by Martin Pool's avatar Martin Pool

Jos points out that test -L is still broken on Solaris. Now we try up

front to detect a command that will work properly, and use that
consistently.

Also, in test report, show setting of $preserve_scratch.

Reset version.
parent 33105096
rsync release candidate 2.5.5rc1 (26 March 2002) rsync changes since last release
ENHANCEMENTS: ENHANCEMENTS:
...@@ -16,7 +16,7 @@ rsync release candidate 2.5.5rc1 (26 March 2002) ...@@ -16,7 +16,7 @@ rsync release candidate 2.5.5rc1 (26 March 2002)
slots) would cause rsync to kill all processes owned by the slots) would cause rsync to kill all processes owned by the
current user. Yes, really! (Paul Haas, Martin Pool) current user. Yes, really! (Paul Haas, Martin Pool)
* Fix test suite on Solaris. (Jos Backus) * Fix test suite on Solaris. (Jos Backus, Martin Pool)
* Fix minor memory leak in socket code. (Dave Dykstra, Martin * Fix minor memory leak in socket code. (Dave Dykstra, Martin
Pool.) Pool.)
......
...@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([byteorder.h]) ...@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([byteorder.h])
AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(config.h)
AC_PREREQ(2.52) AC_PREREQ(2.52)
RSYNC_VERSION=2.5.5rc1 RSYNC_VERSION=2.5.5cvs
AC_SUBST(RSYNC_VERSION) AC_SUBST(RSYNC_VERSION)
AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION]) AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
......
...@@ -147,6 +147,15 @@ testuser=`whoami || echo UNKNOWN` ...@@ -147,6 +147,15 @@ testuser=`whoami || echo UNKNOWN`
echo " testuser=$testuser" echo " testuser=$testuser"
echo " os=`uname -a`" echo " os=`uname -a`"
# It must be "yes", not just nonnull
if test "x$preserve_scratch" = xyes
then
echo " preserve_scratch=yes"
else
echo " preserve_scratch=no"
fi
if test ! -f $rsync_bin if test ! -f $rsync_bin
then then
echo "rsync_bin $rsync_bin is not a file" >&2 echo "rsync_bin $rsync_bin is not a file" >&2
......
...@@ -260,9 +260,35 @@ test_xfail() { ...@@ -260,9 +260,35 @@ test_xfail() {
exit 78 exit 78
} }
# Determine what shell command will appropriately test for links.
ln -s foo "$scratchdir/testlink"
for cmd in test /bin/test /usr/bin/test /usr/ucb/bin/test /usr/ucb/test
do
for switch in -h -L
do
if $cmd $switch "$scratchdir/testlink" 2>/dev/null
then
# how nice
TEST_SYMLINK_CMD="$cmd $switch"
# i wonder if break 2 is portable?
break 2
fi
done
done
if [ "x$TEST_SYMLINK_CMD" = 'x' ]
then
test_fail "Couldn't determine how to test for symlinks"
else
echo "Testing for symlinks using '$TEST_SYMLINK_CMD'"
fi
# Test whether something is a link, allowing for shell peculiarities # Test whether something is a link, allowing for shell peculiarities
is_a_link() { is_a_link() {
test -L "$1" || test -h "$1" || /usr/bin/test -L "$1" || /usr/bin/test -h "$1" # note the variable contains the first option and therefore is not quoted
$TEST_SYMLINK_CMD "$1"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment