Jos points out that test -L is still broken on Solaris. Now we try up
authorMartin Pool <mbp@samba.org>
Tue, 26 Mar 2002 01:25:47 +0000 (01:25 +0000)
committerMartin Pool <mbp@samba.org>
Tue, 26 Mar 2002 01:25:47 +0000 (01:25 +0000)
front to detect a command that will work properly, and use that
consistently.

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

Reset version.

NEWS
configure.in
runtests.sh
testsuite/rsync.fns

diff --git a/NEWS b/NEWS
index 1f2476d..6166bf7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-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)
       slots) would cause rsync to kill all processes owned by the
       current user.  Yes, really!  (Paul Haas, Martin Pool)
 
       slots) would cause rsync to kill all processes owned by the
       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
       Pool.)
 
     * Fix minor memory leak in socket code.  (Dave Dykstra, Martin
       Pool.)
index 45cb3da..cf9ab4b 100644 (file)
@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([byteorder.h])
 AC_CONFIG_HEADER(config.h)
 AC_PREREQ(2.52)
 
 AC_CONFIG_HEADER(config.h)
 AC_PREREQ(2.52)
 
-RSYNC_VERSION=2.5.5rc1
+RSYNC_VERSION=2.5.5cvs
 AC_SUBST(RSYNC_VERSION)
 AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
 
 AC_SUBST(RSYNC_VERSION)
 AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
 
index 31c4936..d2865ae 100755 (executable)
@@ -147,6 +147,15 @@ testuser=`whoami || echo UNKNOWN`
 echo "    testuser=$testuser"
 echo "    os=`uname -a`"
 
 echo "    testuser=$testuser"
 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
 then
     echo "rsync_bin $rsync_bin is not a file" >&2
 if test ! -f $rsync_bin
 then
     echo "rsync_bin $rsync_bin is not a file" >&2
index e7f753a..1bb23f9 100644 (file)
@@ -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
 is_a_link() {
 # Test whether something is a link, allowing for shell peculiarities
 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"
 }
 
 
 }