X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/44ac015598b61bf4a5d9c65da18bfe516f12674e..7462c6ac39d86cb8252ec47246569e3ddda35b6a:/testsuite/ssh-basic.test diff --git a/testsuite/ssh-basic.test b/testsuite/ssh-basic.test index 6ca587b1..59144119 100644 --- a/testsuite/ssh-basic.test +++ b/testsuite/ssh-basic.test @@ -10,34 +10,25 @@ . "$suitedir/rsync.fns" -if [ "x$rsync_enable_ssh_tests" != xyes ] -then - test_skipped "Skipping SSH tests because \$rsync_enable_ssh_tests is not set" -fi +SSH="$scratchdir/src/support/lsh" -if ! type ssh >/dev/null ; then - test_skipped "Skipping SSH tests because ssh is not in the path" +if test x"$rsync_enable_ssh_tests" = xyes; then + if type ssh >/dev/null ; then + SSH=ssh + fi fi -if ! [ "`ssh -o'BatchMode yes' localhost echo yes`" = "yes" ]; then +if ! [ "`$SSH -o'BatchMode yes' localhost echo yes`" = "yes" ]; then test_skipped "Skipping SSH tests because ssh conection to localhost not authorised" fi -# Added by Steve Bonds Feb 2 2003 -# Without this, there are no files in the $fromdir directory, so rsync has -# nothing to do. -hands_setup +echo "Using remote shell: $SSH" -runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"' +# Create some files for rsync to copy +hands_setup -# Added by Steve Bonds Feb 2 2003 -# I assumed that "F1" was intended to hold a single file for testing if -# rsync could detect a renamed file over ssh. Without this line below -# it was unset so the "mv" tried to move a parent directory into a -# subdirectory of itself. There is probably a better way of pulling out -# a sample file to rename. -F1=`ls "$todir" | head -5 | tail -1` +runtest "ssh: basic test" 'checkit "$RSYNC -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"' -mv "$todir/$F1" "$todir/ThisShouldGo" +mv "$todir/text" "$todir/ThisShouldGo" -runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"' +runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'