aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2020-04-26 18:31:00 +0200
committerMarc Hoersken <info@marc-hoersken.de>2020-05-02 16:56:55 +0200
commit1abb087a9c8f1e613b0b38b7afeffb61c18c2fed (patch)
treed0750b6e66c7e7963d5f7efd580e44de07197400 /tests/runtests.pl
parenta491183cb1728009a9dde2dff0b0b58d55805d0a (diff)
tests: add support for SSH server variant specific transfer paths
OpenSSH for Windows requires paths in the format of /C:/ instead of the pseudo-POSIX paths /cygdrive/c/ or just /c/ Reviewed-by: Daniel Stenberg Closes #5298
Diffstat (limited to 'tests/runtests.pl')
-rw-r--r--[-rwxr-xr-x]tests/runtests.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index f38e21e84..d074de9fa 100755..100644
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -2152,6 +2152,12 @@ sub runsshserver {
if ($doesntrun{$pidfile}) {
return (0,0);
}
+
+ my $sshd = find_sshd();
+ if($sshd) {
+ ($sshdid,$sshdvernum,$sshdverstr,$sshderror) = sshversioninfo($sshd);
+ }
+
my $pid = processexists($pidfile);
if($pid > 0) {
stopserver($server, "$pid");
@@ -3294,8 +3300,13 @@ sub subVariables {
if($file_pwd !~ /^\//) {
$file_pwd = "/$file_pwd";
}
+ my $ssh_pwd = $posix_pwd;
+ if ($sshdid && $sshdid =~ /OpenSSH-Windows/) {
+ $ssh_pwd = $file_pwd;
+ }
$$thing =~ s/${prefix}FILE_PWD/$file_pwd/g;
+ $$thing =~ s/${prefix}SSH_PWD/$ssh_pwd/g;
$$thing =~ s/${prefix}SRCDIR/$srcdir/g;
$$thing =~ s/${prefix}USER/$USER/g;