mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Not all the tests are possible to run on Windows since they expect a Unix-like shell environment. However, the rest of the tests can be accommodated. This actually found an issue in the implementation. Since the implementation assumes the target is POSIX/Unix-y, we should use posixpath rather than os.path which uses the host's path style.
44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
RUN: %remote-run -n --remote-dir /xyz-REMOTE -i spiderman --output-prefix %/t some_user@some_host:12345 cp %/t/nested/input %/t/nested/output 2>&1 >/dev/null | %FileCheck %s
|
|
|
|
CHECK: /usr/bin/ssh -n
|
|
CHECK-DAG: -p 12345
|
|
CHECK-DAG: -i spiderman
|
|
CHECK-SAME: some_user@some_host -- '/usr/bin/env' '/bin/rm' '-rf' '{{.+}}-REMOTE/output'
|
|
|
|
CHECK-NEXT: /usr/bin/ssh -n
|
|
CHECK-DAG: -p 12345
|
|
CHECK-DAG: -i spiderman
|
|
CHECK-SAME: some_user@some_host -- '/usr/bin/env' '/bin/mkdir' '-p' '{{.+}}-REMOTE/output/nested'
|
|
|
|
CHECK-NEXT: /usr/bin/sftp
|
|
CHECK-DAG: -P 12345
|
|
CHECK-DAG: -i spiderman
|
|
CHECK-SAME: some_user@some_host
|
|
CHECK-DAG: -put '{{.+}}/nested/output' '/xyz-REMOTE/output/nested/output'
|
|
CHECK-DAG: -put '{{.+}}/nested/input' '/xyz-REMOTE/output/nested/input'
|
|
|
|
CHECK: /usr/bin/ssh -n
|
|
CHECK-DAG: -p 12345
|
|
CHECK-DAG: -i spiderman
|
|
CHECK-SAME: some_user@some_host -- '/usr/bin/env' 'cp'
|
|
|
|
CHECK-NEXT: {{^}}/bin/mkdir -p {{.+}}/nested
|
|
|
|
CHECK-NEXT: /usr/bin/sftp
|
|
CHECK-DAG: -P 12345
|
|
CHECK-DAG: -i spiderman
|
|
CHECK-SAME: some_user@some_host
|
|
CHECK-DAG: -get '/xyz-REMOTE/output/nested/output' '{{.+}}/nested/output'
|
|
CHECK-DAG: -get '/xyz-REMOTE/output/nested/input' '{{.+}}/nested/input'
|
|
|
|
# Make sure things work without a port.
|
|
RUN: %remote-run -n --remote-dir /xyz-REMOTE -i spiderman --output-prefix %/t some_user@some_host cp %/t/nested/input %/t/nested/output 2>&1 >/dev/null | %FileCheck -check-prefix CHECK-PORTLESS %s
|
|
|
|
CHECK-PORTLESS: /usr/bin/sftp
|
|
CHECK-PORTLESS-SAME: -i spiderman
|
|
CHECK-PORTLESS-SAME: some_user@some_host
|
|
|
|
CHECK-PORTLESS: /usr/bin/ssh -n
|
|
CHECK-PORTLESS-SAME: -i spiderman
|
|
CHECK-PORTLESS-SAME: some_user@some_host -- '/usr/bin/env' 'cp'
|