| REQUIRES: sftp_server |
| |
| RUN: %empty-directory(%t) |
| RUN: %empty-directory(%t-REMOTE) |
| RUN: touch %t/input %t/BAD |
| RUN: %debug-remote-run --output-prefix %t cp %t/input %t/output |
| RUN: ls %t/ | %FileCheck %s |
| RUN: ls %t-REMOTE/output/ | %FileCheck -check-prefix CHECK-REMOTE %s |
| |
| CHECK: BAD |
| CHECK-NEXT: {{^input$}} |
| CHECK-NEXT: {{^output$}} |
| |
| CHECK-REMOTE-NOT: BAD |
| CHECK-REMOTE: {{^input$}} |
| CHECK-REMOTE-NEXT: {{^output$}} |
| CHECK-REMOTE-NOT: BAD |
| |
| RUN: %empty-directory(%t) |
| RUN: %empty-directory(%t/nested) |
| RUN: %empty-directory(%t-REMOTE) |
| RUN: touch %t/nested/input %t/nested/BAD |
| RUN: %debug-remote-run --output-prefix %t cp %t/nested/input %t/nested/output |
| RUN: ls %t/nested/ | %FileCheck %s |
| RUN: ls %t-REMOTE/output/nested/ | %FileCheck -check-prefix CHECK-REMOTE %s |
| |
| RUN: %debug-remote-run -v --output-prefix %t cp %t/nested/input %t/nested/output 2>&1 >/dev/null | %FileCheck -check-prefix VERBOSE %s |
| |
| VERBOSE: /usr/bin/env /bin/mkdir -p {{.+}}-REMOTE/output/nested |
| VERBOSE-NEXT: /usr/bin/sftp |
| VERBOSE-DAG: -put '{{.+}}/nested/output' '{{.+}}-REMOTE/output/nested/output' |
| VERBOSE-DAG: -put '{{.+}}/nested/input' '{{.+}}-REMOTE/output/nested/input' |
| VERBOSE: /usr/bin/env cp |
| VERBOSE-NEXT: {{^}}/bin/mkdir -p {{.+}}/nested |
| VERBOSE-NEXT: /usr/bin/sftp |
| VERBOSE-DAG: -get '{{.+}}-REMOTE/output/nested/output' '{{.+}}/nested/output' |
| VERBOSE-DAG: -get '{{.+}}-REMOTE/output/nested/input' '{{.+}}/nested/input' |
| |
| RUN: %empty-directory(%t) |
| RUN: touch %t/xyz-1before |
| RUN: %debug-remote-run --output-prefix %t/xyz cp %t/xyz-1before %t/xyz-2after |
| RUN: ls %t | %FileCheck -check-prefix CHECK-PREFIXED %s |
| RUN: ls %t-REMOTE/ | %FileCheck -check-prefix CHECK-PREFIXED-REMOTE %s |
| |
| CHECK-PREFIXED: {{^xyz-1before$}} |
| CHECK-PREFIXED: {{^xyz-2after$}} |
| |
| CHECK-PREFIXED-REMOTE: {{^output-1before$}} |
| CHECK-PREFIXED-REMOTE: {{^output-2after$}} |
| |
| RUN: %empty-directory(%t) |
| RUN: %empty-directory(%t-REMOTE) |
| RUN: touch %t/input %t/BAD |
| RUN: %debug-remote-run --output-prefix %t --remote-output-prefix custom-output cp %t/input %t/output |
| RUN: ls %t/ | %FileCheck %s |
| RUN: ls %t-REMOTE/custom-output/ | %FileCheck -check-prefix CHECK-REMOTE %s |