mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Not only does this give us a huge speed-up, it also works around a problem where sftp doesn't always update the modification time, which causes random test failures. rdar://88179140
53 lines
1.7 KiB
Plaintext
53 lines
1.7 KiB
Plaintext
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: /usr/bin/rsync
|
|
VERBOSE: /usr/bin/env {{.*}}cp
|
|
VERBOSE-NEXT: {{^}}/bin/mkdir -p {{.+}}
|
|
VERBOSE-NEXT: /usr/bin/rsync
|
|
|
|
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/output | %FileCheck -check-prefix CHECK-PREFIXED-REMOTE %s
|
|
|
|
CHECK-PREFIXED: {{^xyz-1before$}}
|
|
CHECK-PREFIXED: {{^xyz-2after$}}
|
|
|
|
CHECK-PREFIXED-REMOTE: {{^xyz-1before$}}
|
|
CHECK-PREFIXED-REMOTE: {{^xyz-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
|