1 # Check that -a/-v/-vv makes the line number of the failing RUN command clear.
4 # RUN: not %{lit} -a %{inputs}/shtest-run-at-line | %{filter-lit} | FileCheck %s
5 # RUN: not %{lit} -v %{inputs}/shtest-run-at-line | %{filter-lit} | FileCheck %s
6 # RUN: not %{lit} -vv %{inputs}/shtest-run-at-line | %{filter-lit} | FileCheck %s
10 # CHECK: Testing: 8 tests
13 # In the case of the external shell, we check for only RUN lines in stderr in
14 # case some shell implementations format "set -x" output differently.
16 # CHECK-LABEL: FAIL: shtest-run-at-line :: external-shell/basic.txt
18 # CHECK: Command Output (stderr)
20 # CHECK-NEXT: {{^}}RUN: at line 4: true{{$}}
22 # CHECK-NEXT: {{^}}RUN: at line 5: false{{$}}
27 # CHECK-LABEL: FAIL: shtest-run-at-line :: external-shell/empty-run-line.txt
29 # CHECK: Command Output (stderr)
31 # CHECK-NEXT: {{^}}RUN: at line 2 has no command after substitutions{{$}}
32 # CHECK-NEXT: {{^}}RUN: at line 3: false{{$}}
37 # CHECK-LABEL: FAIL: shtest-run-at-line :: external-shell/line-continuation.txt
39 # The execution trace from an external sh-like shell might print the commands
40 # from a pipeline in any order, so this time just check that lit suppresses the
41 # trace of the echo command for each 'RUN: at line N: cmd-line'.
43 # CHECK: Command Output (stderr)
45 # CHECK-NEXT: {{^}}RUN: at line 4: echo 'foo bar' | FileCheck
47 # CHECK: {{^}}RUN: at line 6: echo 'foo baz' | FileCheck
51 # CHECK-LABEL: FAIL: shtest-run-at-line :: external-shell/run-line-with-newline.txt
53 # CHECK: Command Output (stderr)
55 # CHECK-NEXT: {{^}}RUN: at line 1: echo abc |
56 # CHECK-NEXT: FileCheck {{.*}} &&
61 # CHECK-LABEL: FAIL: shtest-run-at-line :: internal-shell/basic.txt
63 # CHECK: Command Output (stdout)
65 # CHECK-NEXT: # RUN: at line 1
67 # CHECK-NEXT: # executed command: true
68 # CHECK-NEXT: # RUN: at line 2
70 # CHECK-NEXT: # executed command: false
73 # CHECK-LABEL: FAIL: shtest-run-at-line :: internal-shell/empty-run-line.txt
75 # CHECK: Command Output (stdout)
77 # CHECK-NEXT: # RUN: at line 2 has no command after substitutions
78 # CHECK-NEXT: # RUN: at line 3
80 # CHECK-NEXT: # executed command: false
83 # CHECK-LABEL: FAIL: shtest-run-at-line :: internal-shell/line-continuation.txt
85 # CHECK: Command Output (stdout)
87 # CHECK-NEXT: # RUN: at line 1
88 # CHECK-NEXT: : first line continued to second line
89 # CHECK-NEXT: # executed command: : first line continued to second line
90 # CHECK-NEXT: # RUN: at line 3
91 # CHECK-NEXT: echo 'foo bar' | FileCheck {{.*}}
92 # CHECK-NEXT: # executed command: echo 'foo bar'
93 # CHECK-NEXT: # executed command: FileCheck {{.*}}
94 # CHECK-NEXT: # RUN: at line 5
95 # CHECK-NEXT: echo 'foo baz' | FileCheck {{.*}}
96 # CHECK-NEXT: # executed command: echo 'foo baz'
97 # CHECK-NEXT: # executed command: FileCheck {{.*}}
100 # CHECK-LABEL: FAIL: shtest-run-at-line :: internal-shell/run-line-with-newline.txt
102 # CHECK: Command Output (stdout)
104 # CHECK-NEXT: # RUN: at line 1
105 # CHECK-NEXT: echo abc |
106 # CHECK-NEXT: FileCheck {{.*}} &&
108 # CHECK-NEXT: # executed command: echo abc
109 # CHECK-NEXT: # executed command: FileCheck {{.*}}
110 # CHECK-NEXT: # executed command: false