X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/55bdb416328baa61f7d5b05e70f38c657f085e2f..7462c6ac39d86cb8252ec47246569e3ddda35b6a:/testsuite/ssh-basic.test diff --git a/testsuite/ssh-basic.test b/testsuite/ssh-basic.test index 2bf93a58..59144119 100644 --- a/testsuite/ssh-basic.test +++ b/testsuite/ssh-basic.test @@ -10,24 +10,25 @@ . "$suitedir/rsync.fns" -if [ "x$rsync_enable_ssh_tests" != xyes ] -then - echo "Skipping SSH tests because $rsync_enable_ssh_tests is not set" - exit 77 -fi +SSH="$scratchdir/src/support/lsh" -if ! type ssh >/dev/null ; then - echo "Skipping SSH tests because ssh is not in the path" - exit 77 +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 - echo "Skipping SSH tests because ssh conection to localhost not authorised" - exit 77 +if ! [ "`$SSH -o'BatchMode yes' localhost echo yes`" = "yes" ]; then + test_skipped "Skipping SSH tests because ssh conection to localhost not authorised" fi -runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}' +echo "Using remote shell: $SSH" + +# Create some files for rsync to copy +hands_setup + +runtest "ssh: basic test" 'checkit "$RSYNC -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"' -mv ${TO}/${F1} ${TO}/ThisShouldGo +mv "$todir/text" "$todir/ThisShouldGo" -runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}' +runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'