Merge branch 'master' of http://darcs.haskell.org/testsuite
[ghc.git] / testsuite / tests / driver / all.T
1 setTestOpts(only_compiler_types(['ghc']))
2
3 test('driver011',
4      extra_clean(['A011.hi', 'A011.o']),
5      run_command,
6      ['$MAKE -s --no-print-directory test011'])
7
8 test('driver012',
9      extra_clean(['A012.hi', 'A012.o']),
10      run_command,
11      ['$MAKE -s --no-print-directory test012'])
12
13 test('driver013',
14      extra_clean(['A013.hi', 'A013.o']),
15      run_command,
16      ['$MAKE -s --no-print-directory test013'])
17
18 test('driver014',
19      extra_clean(['A014.hi', 'obj014/A014.o', 'obj014']),
20      run_command,
21      ['$MAKE -s --no-print-directory test014'])
22
23 test('driver015',
24      extra_clean(['A015.o', 'hi015/A015.hi', 'hi015']),
25      run_command,
26      ['$MAKE -s --no-print-directory test015'])
27
28 test('driver016',
29      extra_clean(['F016.hi', 'F016.o', 'F016_stub.h']),
30      run_command,
31      ['$MAKE -s --no-print-directory test016'])
32
33 test('driver017',
34      extra_clean(['F017.hi', 'F017.o', 'F017_stub.h']),
35      run_command,
36      ['$MAKE -s --no-print-directory test017'])
37
38 test('driver018',
39      extra_clean(['F018.hi', 'F018_stub.h',
40                   'obj018/TestStub018.o', 'obj018/TestStub018_stub.o',
41                   'obj018']),
42      run_command,
43      ['$MAKE -s --no-print-directory test018'])
44
45 test('driver018a',
46      extra_clean(['F018a.hi', 'F018a_stub.h',
47                   'TestStub018a.obj.018',
48                   'obj018a/TestStub018a_stub.obj.018']),
49      run_command,
50      ['$MAKE -s --no-print-directory test018a'])
51
52 test('driver019',
53      extra_clean(['out019/TestStub.hi',
54                   'out019/TestStub.o',
55                   'out019/TestStub_stub.h',
56                   'out019/TestStub_stub.o']),
57      run_command,
58      ['$MAKE -s --no-print-directory test019'])
59
60 test('driver021',
61      extra_clean(['B021/C.hi', 'B021/C.o']),
62      run_command,
63      ['$MAKE -s --no-print-directory test021'])
64
65 test('driver022',
66      extra_clean(['B022/C.hi', 'B022/C.o']),
67      run_command,
68      ['$MAKE -s --no-print-directory test022'])
69
70 test('driver023',
71      extra_clean(['B023/C.hi', 'B023/C.o']),
72      run_command,
73      ['$MAKE -s --no-print-directory test023'])
74
75 test('driver024',
76      extra_clean(['B024/C.hi', 'obj024/B024/C.o', 'obj024/B024', 'obj024']),
77      run_command,
78      ['$MAKE -s --no-print-directory test024'])
79
80 test('driver024a',
81      extra_clean(['obj024a/B024a/stub.o', 'obj024a/B024a', 'obj024a']),
82      run_command,
83      ['$MAKE -s --no-print-directory test024a'])
84
85 test('driver025',
86      extra_clean(['B025/C.hi', 'B025/C.o',
87                   'hi025/B025/C.hi', 'hi025/B025', 'hi025']),
88      run_command,
89      ['$MAKE -s --no-print-directory test025'])
90
91 test('driver026',
92      extra_clean(['d026/P/Q.hi', 'd026/P/Q.o']),
93      run_command,
94      ['$MAKE -s --no-print-directory test026'])
95
96 test('driver027',
97      extra_clean(['B027/F.hi', 'B027/F.o',
98                   'B027/F_stub.h', 'B027/F_stub.o']),
99      run_command,
100      ['$MAKE -s --no-print-directory test027'])
101
102 test('driver028',
103      extra_clean(['B028/F.hi', 'B028/F.o',
104                   'B028/F_stub.h', 'B028/F_stub.o']),
105      run_command,
106      ['$MAKE -s --no-print-directory test028'])
107
108 test('driver031',
109      extra_clean(['A031.hi', 'A031.o']),
110      run_command,
111      ['$MAKE -s --no-print-directory test031'])
112
113 test('driver032',
114      extra_clean(['A032.hi', 'A032.o']),
115      run_command,
116      ['$MAKE -s --no-print-directory test032'])
117
118 test('driver033',
119      extra_clean(['A033.hi', 'A033.o', 'hi033/A033.hi', 'hi033']),
120      run_command,
121      ['$MAKE -s --no-print-directory test033'])
122
123 test('driver034',
124      extra_clean(['F034.hi', 'F034.o', 'F034_stub.h']),
125      run_command,
126      ['$MAKE -s --no-print-directory test034'])
127
128 test('driver035',
129      extra_clean(['F035.hi', 'F035.o',
130                   'stub035/F035_stub.h']),
131      run_command,
132      ['$MAKE -s --no-print-directory test035'])
133
134 test('driver041',
135      extra_clean(['B041/C.hi', 'B041/C.o']),
136      run_command,
137      ['$MAKE -s --no-print-directory test041'])
138
139 test('driver042',
140      extra_clean(['B042/C.hi', 'B042/C.o']),
141      run_command,
142      ['$MAKE -s --no-print-directory test042'])
143
144 test('driver043',
145      extra_clean(['B043/C.hi', 'B043/C.o',
146                   'hi043/B043/C.hi', 'hi043/B043', 'hi043']),
147      run_command,
148      ['$MAKE -s --no-print-directory test043'])
149
150 test('driver044',
151      extra_clean(['B044/F.hi', 'B044/F.o',
152                   'B044/F_stub.h', 'B044/F_stub.o']),
153      run_command,
154      ['$MAKE -s --no-print-directory test044'])
155
156 test('driver045',
157      extra_clean(['B045/F.hi', 'B045/F.o',
158                   'B045/F_stub.h', 'B045/F_stub.o']),
159      run_command,
160      ['$MAKE -s --no-print-directory test045'])
161
162 test('driver051',
163      extra_clean(['d051_1/P/Q.hi', 'd051_1/P/Q.o',
164                   'd051_2/R/S.hi', 'd051_2/R/S.o']),
165      run_command,
166      ['$MAKE -s --no-print-directory test051'])
167
168 test('driver052',
169      extra_clean(['d052_1/P/Q.hi', 'd052_1/P/Q.o',
170                   'd052_2/R/S.hi', 'd052_2/R/S.o',
171                   'obj052/P/Q.o', 'obj052/P',
172                   'obj052/R/S.o', 'obj052/R',
173                   'obj052']),
174      run_command,
175      ['$MAKE -s --no-print-directory test052'])
176
177 test('driver053',
178      extra_clean(['d053_1/P/Q.hi', 'd053_1/P/Q.o',
179                   'd053_2/R/S.hi', 'd053_2/R/S.o',
180                   'hi053/P/Q.hi', 'hi053/P',
181                   'hi053/R/S.hi', 'hi053/R',
182                   'hi053']),
183      run_command,
184      ['$MAKE -s --no-print-directory test053'])
185
186 test('driver061a',
187      extra_clean(['A061a.hi', 'A061a.o', 'A061a.s']),
188      run_command,
189      ['$MAKE -s --no-print-directory test061a'])
190
191 test('driver061b',
192      extra_clean(['A061b.hi', 'A061b.o', 'A061b.s']),
193      run_command,
194      ['$MAKE -s --no-print-directory test061b'])
195
196
197 test('driver062a',
198      extra_clean(['Hello062a.hs']),
199      run_command,
200      ['$MAKE -s --no-print-directory test062a'])
201 test('driver062b',
202      extra_clean(['Hello062b.hs']),
203      run_command,
204      ['$MAKE -s --no-print-directory test062b'])
205 test('driver062c',
206      extra_clean(['Hello062c.hs']),
207      run_command,
208      ['$MAKE -s --no-print-directory test062c'])
209 test('driver062d',
210      extra_clean(['B062d/Hello062d.hs']),
211      run_command,
212      ['$MAKE -s --no-print-directory test062d'])
213 test('driver062e',
214      extra_clean(['B062e/Hello062e.hs']),
215      run_command,
216      ['$MAKE -s --no-print-directory test062e'])
217
218 test('driver063',
219      extra_clean(['A063.hi', 'A063.o', 'A063.hc',
220                   'D063.hi', 'D063.o', 'D063.hc']),
221      run_command,
222      ['$MAKE -s --no-print-directory test063'])
223
224 test('driver064',
225      extra_clean(['A064.hi', 'A064.o', 'A064.hspp']),
226      run_command,
227      ['$MAKE -s --no-print-directory test064'])
228
229 test('driver065',
230      extra_clean(['A065.hi', 'A065.o', 'A065.hspp']),
231      run_command,
232      ['$MAKE -s --no-print-directory test065'])
233
234 test('driver066',
235      extra_clean(['A066.hi', 'A066.o', 'A066.tmp']),
236      run_command,
237      ['$MAKE -s --no-print-directory test066'])
238
239 test('driver067',
240      extra_clean(['A067.hi', 'A067.o', 'A067.tmp']),
241      run_command,
242      ['$MAKE -s --no-print-directory test067'])
243
244 test('driver070',
245      extra_clean(['A070.hi', 'A070.o', 'A070.s']),
246      run_command,
247      ['$MAKE -s --no-print-directory test070'])
248
249 test('driver071',
250      extra_clean(['A071.hi', 'A071.o', 'A071.tmp']),
251      run_command,
252      ['$MAKE -s --no-print-directory test071'])
253
254 test('driver081a',
255      normal,
256      run_command,
257      ['$MAKE -s --no-print-directory test081a'])
258
259 test('driver081b',
260      normal,
261      run_command,
262      ['$MAKE -s --no-print-directory test081b'])
263
264 test('driver100',
265      extra_clean(['overlap/List.hi', 'overlap/List.o',
266                   'overlap/Overlap.hi', 'overlap/Overlap.o']),
267      run_command,
268      ['$MAKE -s --no-print-directory test100'])
269
270 test('driver200',
271      extra_clean(['depend200']),
272      run_command,
273      ['$MAKE -s --no-print-directory test200'])
274
275 test('2566',
276      normalise_fun(normalise_errmsg),
277      run_command,
278      ['$MAKE -s --no-print-directory 2566'])
279
280 test('pragma001', normal, compile, [''])
281 test('pragma002', normal, compile, [''])
282
283 test('2499', normal, compile_fail, [''])
284
285 test('mode001', normal, run_command,
286      ['$MAKE -s --no-print-directory mode001'])
287
288 if config.platform == 'i386-unknown-mingw32':
289      only_windows = normal
290 else:
291      only_windows = skip
292
293 test('shared001',
294      [only_windows,
295       extra_clean(['Shared001.hi', 'Shared001.o', 'HSdll.dll.a', 'HSdll.dll', 'Shared001_stub.h', 'Shared001_stub.o'])],
296      run_command,
297      ['$MAKE -s --no-print-directory shared001'])
298
299 test('dynHelloWorld',
300      only_ways(['dyn']),
301      compile_and_run,
302      [''])
303
304 # simple test that we can load and use the GHC package in all ways
305 # (in #5313 it was failing the dyn way)
306 p = subprocess.Popen([config.compiler, "--print-libdir"], stdout=subprocess.PIPE)
307 libdir = chop(p.stdout.read())
308 libdir = libdir.rstrip('\r')
309 p.stdout.close
310
311 test('5313', extra_run_opts('"' + libdir + '"'), compile_and_run, ['-package ghc'])
312
313 test('2464', normal, compile, [''])
314 test('3674', ignore_output, run_command, 
315              ['$MAKE -s --no-print-directory 3674'])
316
317 test('rtsopts001', normal, run_command,
318                 ['$MAKE -s --no-print-directory rtsopts001'])
319 test('rtsopts002', normal, run_command,
320                 ['$MAKE -s --no-print-directory rtsopts002'])
321
322 test('withRtsOpts', [ extra_clean(['withRtsOpts', 'withRtsOpts.exe',
323                                    'withRtsOpts.hi', 'withRtsOpts.o',
324                                    'withRtsOpts.out']) ],
325                     run_command,
326                     ['$MAKE -s --no-print-directory withRtsOpts'])
327 test('T3389', normal, compile_and_run, [''])
328 test('T3364', normalise_fun(normalise_errmsg), run_command,
329      ['$MAKE -s --no-print-directory T3364'])
330 test('T4437', only_ways(['normal']), compile_and_run, ['-package ghc'])
331
332 test('werror', normal, compile_fail, [''])
333
334 test('T706', req_interp, run_command, ['$MAKE -s --no-print-directory T706'])