blob: 723842fce04044e34953d5a78d80ea7f5e548158 [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
Daniel Dunbar38d37982013-01-31 22:15:20 +000074# CHECK: FAIL: shtest-shell :: error-0.txt
75# CHECK: *** TEST 'shtest-shell :: error-0.txt' FAILED ***
Daniel Dunbar591838d2016-06-02 23:49:42 +000076# CHECK: $ "not-a-real-command"
77# CHECK: # command stderr:
Daniel Dunbar38d37982013-01-31 22:15:20 +000078# CHECK: 'not-a-real-command': command not found
Daniel Dunbar591838d2016-06-02 23:49:42 +000079# CHECK: error: command failed with exit status: 127
Daniel Dunbar38d37982013-01-31 22:15:20 +000080# CHECK: ***
81
82# FIXME: The output here sucks.
83#
84# CHECK: FAIL: shtest-shell :: error-1.txt
85# CHECK: *** TEST 'shtest-shell :: error-1.txt' FAILED ***
86# CHECK: shell parser error on: 'echo "missing quote'
87# CHECK: ***
88
89# CHECK: FAIL: shtest-shell :: error-2.txt
90# CHECK: *** TEST 'shtest-shell :: error-2.txt' FAILED ***
91# CHECK: Unsupported redirect:
92# CHECK: ***
93
Ying Yicfb08e92017-12-01 09:54:27 +000094# CHECK: FAIL: shtest-shell :: mkdir-error-0.txt
95# CHECK: *** TEST 'shtest-shell :: mkdir-error-0.txt' FAILED ***
96# CHECK: $ "mkdir" "-p" "temp"
97# CHECK: # command stderr:
98# CHECK: Unsupported: 'mkdir' cannot be part of a pipeline
99# CHECK: error: command failed with exit status: 127
100# CHECK: ***
101
102# CHECK: FAIL: shtest-shell :: mkdir-error-1.txt
103# CHECK: *** TEST 'shtest-shell :: mkdir-error-1.txt' FAILED ***
104# CHECK: $ "mkdir" "-p" "-m" "777" "temp"
105# CHECK: # command stderr:
106# CHECK: Unsupported: 'mkdir': option -m not recognized
107# CHECK: error: command failed with exit status: 127
108# CHECK: ***
109
110# CHECK: FAIL: shtest-shell :: mkdir-error-2.txt
111# CHECK: *** TEST 'shtest-shell :: mkdir-error-2.txt' FAILED ***
112# CHECK: $ "mkdir" "-p"
113# CHECK: # command stderr:
114# CHECK: Error: 'mkdir' is missing an operand
115# CHECK: error: command failed with exit status: 127
116# CHECK: ***
117
Daniel Dunbar38d37982013-01-31 22:15:20 +0000118# CHECK: PASS: shtest-shell :: redirects.txt
Ying Yicfb08e92017-12-01 09:54:27 +0000119
120# CHECK: FAIL: shtest-shell :: rm-error-0.txt
121# CHECK: *** TEST 'shtest-shell :: rm-error-0.txt' FAILED ***
122# CHECK: $ "rm" "-rf" "temp"
123# CHECK: # command stderr:
124# CHECK: Unsupported: 'rm' cannot be part of a pipeline
125# CHECK: error: command failed with exit status: 127
126# CHECK: ***
127
128# CHECK: FAIL: shtest-shell :: rm-error-1.txt
129# CHECK: *** TEST 'shtest-shell :: rm-error-1.txt' FAILED ***
130# CHECK: $ "rm" "-f" "-v" "temp"
131# CHECK: # command stderr:
132# CHECK: Unsupported: 'rm': option -v not recognized
133# CHECK: error: command failed with exit status: 127
134# CHECK: ***
135
136# CHECK: FAIL: shtest-shell :: rm-error-2.txt
137# CHECK: *** TEST 'shtest-shell :: rm-error-2.txt' FAILED ***
138# CHECK: $ "rm" "-r" "hello"
139# CHECK: # command stderr:
140# CHECK: Error: 'rm' command failed
141# CHECK: error: command failed with exit status: 1
142# CHECK: ***
143
144# CHECK: FAIL: shtest-shell :: rm-error-3.txt
145# CHECK: *** TEST 'shtest-shell :: rm-error-3.txt' FAILED ***
146# CHECK: Exit Code: 1
147# CHECK: ***
148
Daniel Dunbar38d37982013-01-31 22:15:20 +0000149# CHECK: PASS: shtest-shell :: sequencing-0.txt
150# CHECK: XFAIL: shtest-shell :: sequencing-1.txt
Ying Yicfb08e92017-12-01 09:54:27 +0000151# CHECK: PASS: shtest-shell :: valid-shell.txt
152# CHECK: Failing Tests (17)