-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathupload-and-download.test-sh
52 lines (42 loc) · 1.75 KB
/
upload-and-download.test-sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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