Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
b58e4033
Commit
b58e4033
authored
Apr 18, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If ssh access is not enabled, use a shell function to test that
we can copy using a spawned rsync process.
parent
a217c453
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
22 deletions
+26
-22
ssh-basic.test
testsuite/ssh-basic.test
+26
-22
No files found.
testsuite/ssh-basic.test
View file @
b58e4033
...
...
@@ -10,34 +10,38 @@
.
"
$suitedir
/rsync.fns"
if
[
"x
$rsync_enable_ssh_tests
"
!=
xyes
]
then
test_skipped
"Skipping SSH tests because
\$
rsync_enable_ssh_tests is not set"
SSH
=
"
$scratchdir
/pretend-ssh"
cat
>
"
$SSH
"
<<
'EOT'
while
:
;
do
case
"$1"
in
-*
)
shift
;;
localhost
)
shift
;
break
;;
*
)
exit
1
;;
esac
done
$
*
EOT
chmod
+
x
"
$SSH
"
if
test
x
"
$rsync_enable_ssh_tests
"
=
xyes
;
then
if
type
ssh
>/
dev
/
null
;
then
SSH
=
ssh
fi
fi
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
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"'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment