Split code out into separate files and remove some global variables to
[rsync/rsync.git] / testsuite / ssh-basic.test
index e1aeb41..caf880f 100644 (file)
 
 . "$suitedir/rsync.fns"
 
-if ! type ssh >/dev/null 2>&1; then
-    echo "Skipping SSH tests because ssh is not in the path"
-    exit 77
+if [ "x$rsync_enable_ssh_tests" != xyes ]
+then
+    test_skipped "Skipping SSH tests because \$rsync_enable_ssh_tests is not set"
 fi
 
-if ! [ "`ssh -o'BatchMode yes' localhost echo yes 2>/dev/null`" = "yes" ]; then
-    echo "Skipping SSH tests because ssh conection to localhost not authorised"
-    exit 77
+if ! type ssh >/dev/null ; then
+    test_skipped "Skipping SSH tests because ssh is not in the path"
+fi
+
+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}'