blob: b3e6a2c78f2c97e4a8ff28a3ef25d58a742a1689 [file] [log] [blame]
Daniel Dunbar38d37982013-01-31 22:15:20 +00001# Check the internal shell handling component of the ShTest format.
2#
3# RUN: not %{lit} -j 1 -v %{inputs}/shtest-shell > %t.out
Reid Kleckner125c74b2017-07-28 16:24:18 +00004# FIXME: Temporarily dump test output so we can debug failing tests on
5# buildbots.
6# RUN: cat %t.out
Daniel Dunbar19341082016-06-07 16:13:40 +00007# RUN: FileCheck --input-file %t.out %s
Daniel Dunbar38d37982013-01-31 22:15:20 +00008#
9# END.
10
11# CHECK: -- Testing:
12
Ying Yicfb08e92017-12-01 09:54:27 +000013
14# CHECK: FAIL: shtest-shell :: diff-error-0.txt
15# CHECK: *** TEST 'shtest-shell :: diff-error-0.txt' FAILED ***
16# CHECK: $ "diff" "diff-error-0.txt" "diff-error-0.txt"
17# CHECK: # command stderr:
18# CHECK: Unsupported: 'diff' cannot be part of a pipeline
19# CHECK: error: command failed with exit status: 127
20# CHECK: ***
21
22# CHECK: FAIL: shtest-shell :: diff-error-1.txt
23# CHECK: *** TEST 'shtest-shell :: diff-error-1.txt' FAILED ***
24# CHECK: $ "diff" "-B" "temp1.txt" "temp2.txt"
25# CHECK: # command stderr:
26# CHECK: Unsupported: 'diff': option -B not recognized
27# CHECK: error: command failed with exit status: 127
28# CHECK: ***
29
30# CHECK: FAIL: shtest-shell :: diff-error-2.txt
31# CHECK: *** TEST 'shtest-shell :: diff-error-2.txt' FAILED ***
32# CHECK: $ "diff" "temp.txt"
33# CHECK: # command stderr:
34# CHECK: Error: missing or extra operand
35# CHECK: error: command failed with exit status: 127
36# CHECK: ***
37
38# CHECK: FAIL: shtest-shell :: diff-error-3.txt
39# CHECK: *** TEST 'shtest-shell :: diff-error-3.txt' FAILED ***
40# CHECK: $ "diff" "temp.txt" "temp1.txt"
41# CHECK: # command stderr:
42# CHECK: Error: 'diff' command failed
43# CHECK: error: command failed with exit status: 1
44# CHECK: ***
45
46# CHECK: FAIL: shtest-shell :: diff-error-4.txt
47# CHECK: *** TEST 'shtest-shell :: diff-error-4.txt' FAILED ***
48# CHECK: Exit Code: 1
49# CHECK: # command output:
50# CHECK: diff-error-4.txt.tmp
51# CHECK: diff-error-4.txt.tmp1
52# CHECK: *** 1 ****
53# CHECK: ! hello-first
54# CHECK: --- 1 ----
55# CHECK: ! hello-second
56# CHECK: ***
57
58# CHECK: FAIL: shtest-shell :: diff-error-5.txt
59# CHECK: *** TEST 'shtest-shell :: diff-error-5.txt' FAILED ***
60# CHECK: $ "diff"
61# CHECK: # command stderr:
62# CHECK: Error: missing or extra operand
63# CHECK: error: command failed with exit status: 127
64# CHECK: ***
65
66# CHECK: FAIL: shtest-shell :: diff-error-6.txt
67# CHECK: *** TEST 'shtest-shell :: diff-error-6.txt' FAILED ***
68# CHECK: $ "diff"
69# CHECK: # command stderr:
70# CHECK: Error: missing or extra operand
71# CHECK: error: command failed with exit status: 127
72# CHECK: ***
73
Max Moroz975eaca2018-01-09 18:23:34 +000074# CHECK: FAIL: shtest-shell :: diff-r-error-0.txt
75# CHECK: *** TEST 'shtest-shell :: diff-r-error-0.txt' FAILED ***
76# CEHCK: $ "diff" "-r"
77# CHECK: # command output:
78# CHECK: Only in {{.*}}dir1: dir1unique
79# CHECK: Only in {{.*}}dir2: dir2unique
80# CHECK: error: command failed with exit status: 1
81
82# CHECK: FAIL: shtest-shell :: diff-r-error-1.txt
83# CHECK: *** TEST 'shtest-shell :: diff-r-error-1.txt' FAILED ***
84# CEHCK: $ "diff" "-r"
85# CHECK: # command output:
86# CHECK: *** {{.*}}dir1{{.*}}subdir{{.*}}f01
87# CHECK: --- {{.*}}dir2{{.*}}subdir{{.*}}f01
88# CHECK: 12345
89# CHECK: 00000
90# CHECK: error: command failed with exit status: 1
91
92# CHECK: FAIL: shtest-shell :: diff-r-error-2.txt
93# CHECK: *** TEST 'shtest-shell :: diff-r-error-2.txt' FAILED ***
94# CEHCK: $ "diff" "-r"
95# CHECK: # command output:
96# CHECK: Only in {{.*}}dir2: extrafile
97# CHECK: error: command failed with exit status: 1
98
99# CHECK: FAIL: shtest-shell :: diff-r-error-3.txt
100# CHECK: *** TEST 'shtest-shell :: diff-r-error-3.txt' FAILED ***
101# CEHCK: $ "diff" "-r"
102# CHECK: # command output:
103# CHECK: Only in {{.*}}dir1: extra_subdir
104# CHECK: error: command failed with exit status: 1
105
106# CHECK: FAIL: shtest-shell :: diff-r-error-4.txt
107# CHECK: *** TEST 'shtest-shell :: diff-r-error-4.txt' FAILED ***
108# CEHCK: $ "diff" "-r"
109# CHECK: # command output:
110# CHECK: File {{.*}}dir1{{.*}}extra_subdir is a directory while file {{.*}}dir2{{.*}}extra_subdir is a regular file
111# CHECK: error: command failed with exit status: 1
112
113# CHECK: FAIL: shtest-shell :: diff-r-error-5.txt
114# CHECK: *** TEST 'shtest-shell :: diff-r-error-5.txt' FAILED ***
115# CEHCK: $ "diff" "-r"
116# CHECK: # command output:
117# CHECK: Only in {{.*}}dir1: extra_subdir
118# CHECK: error: command failed with exit status: 1
119
120# CHECK: FAIL: shtest-shell :: diff-r-error-6.txt
121# CHECK: *** TEST 'shtest-shell :: diff-r-error-6.txt' FAILED ***
122# CEHCK: $ "diff" "-r"
123# CHECK: # command output:
124# CHECK: File {{.*}}dir1{{.*}}extra_file is a regular empty file while file {{.*}}dir2{{.*}}extra_file is a directory
125# CHECK: error: command failed with exit status: 1
126
127# CHECK: PASS: shtest-shell :: diff-r.txt
128
Daniel Dunbar38d37982013-01-31 22:15:20 +0000129# CHECK: FAIL: shtest-shell :: error-0.txt
130# CHECK: *** TEST 'shtest-shell :: error-0.txt' FAILED ***
Daniel Dunbar591838d2016-06-02 23:49:42 +0000131# CHECK: $ "not-a-real-command"
132# CHECK: # command stderr:
Daniel Dunbar38d37982013-01-31 22:15:20 +0000133# CHECK: 'not-a-real-command': command not found
Daniel Dunbar591838d2016-06-02 23:49:42 +0000134# CHECK: error: command failed with exit status: 127
Daniel Dunbar38d37982013-01-31 22:15:20 +0000135# CHECK: ***
136
137# FIXME: The output here sucks.
138#
139# CHECK: FAIL: shtest-shell :: error-1.txt
140# CHECK: *** TEST 'shtest-shell :: error-1.txt' FAILED ***
141# CHECK: shell parser error on: 'echo "missing quote'
142# CHECK: ***
143
144# CHECK: FAIL: shtest-shell :: error-2.txt
145# CHECK: *** TEST 'shtest-shell :: error-2.txt' FAILED ***
146# CHECK: Unsupported redirect:
147# CHECK: ***
148
Ying Yicfb08e92017-12-01 09:54:27 +0000149# CHECK: FAIL: shtest-shell :: mkdir-error-0.txt
150# CHECK: *** TEST 'shtest-shell :: mkdir-error-0.txt' FAILED ***
151# CHECK: $ "mkdir" "-p" "temp"
152# CHECK: # command stderr:
153# CHECK: Unsupported: 'mkdir' cannot be part of a pipeline
154# CHECK: error: command failed with exit status: 127
155# CHECK: ***
156
157# CHECK: FAIL: shtest-shell :: mkdir-error-1.txt
158# CHECK: *** TEST 'shtest-shell :: mkdir-error-1.txt' FAILED ***
159# CHECK: $ "mkdir" "-p" "-m" "777" "temp"
160# CHECK: # command stderr:
161# CHECK: Unsupported: 'mkdir': option -m not recognized
162# CHECK: error: command failed with exit status: 127
163# CHECK: ***
164
165# CHECK: FAIL: shtest-shell :: mkdir-error-2.txt
166# CHECK: *** TEST 'shtest-shell :: mkdir-error-2.txt' FAILED ***
167# CHECK: $ "mkdir" "-p"
168# CHECK: # command stderr:
169# CHECK: Error: 'mkdir' is missing an operand
170# CHECK: error: command failed with exit status: 127
171# CHECK: ***
172
Daniel Dunbar38d37982013-01-31 22:15:20 +0000173# CHECK: PASS: shtest-shell :: redirects.txt
Ying Yicfb08e92017-12-01 09:54:27 +0000174
175# CHECK: FAIL: shtest-shell :: rm-error-0.txt
176# CHECK: *** TEST 'shtest-shell :: rm-error-0.txt' FAILED ***
177# CHECK: $ "rm" "-rf" "temp"
178# CHECK: # command stderr:
179# CHECK: Unsupported: 'rm' cannot be part of a pipeline
180# CHECK: error: command failed with exit status: 127
181# CHECK: ***
182
183# CHECK: FAIL: shtest-shell :: rm-error-1.txt
184# CHECK: *** TEST 'shtest-shell :: rm-error-1.txt' FAILED ***
185# CHECK: $ "rm" "-f" "-v" "temp"
186# CHECK: # command stderr:
187# CHECK: Unsupported: 'rm': option -v not recognized
188# CHECK: error: command failed with exit status: 127
189# CHECK: ***
190
191# CHECK: FAIL: shtest-shell :: rm-error-2.txt
192# CHECK: *** TEST 'shtest-shell :: rm-error-2.txt' FAILED ***
193# CHECK: $ "rm" "-r" "hello"
194# CHECK: # command stderr:
195# CHECK: Error: 'rm' command failed
196# CHECK: error: command failed with exit status: 1
197# CHECK: ***
198
199# CHECK: FAIL: shtest-shell :: rm-error-3.txt
200# CHECK: *** TEST 'shtest-shell :: rm-error-3.txt' FAILED ***
201# CHECK: Exit Code: 1
202# CHECK: ***
203
Daniel Dunbar38d37982013-01-31 22:15:20 +0000204# CHECK: PASS: shtest-shell :: sequencing-0.txt
205# CHECK: XFAIL: shtest-shell :: sequencing-1.txt
Ying Yicfb08e92017-12-01 09:54:27 +0000206# CHECK: PASS: shtest-shell :: valid-shell.txt
Max Moroz975eaca2018-01-09 18:23:34 +0000207# CHECK: Failing Tests (24)