testsuite: mark test T9938 (#9938) as passing again
[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.ooo']),
10      run_command,
11      ['$MAKE -s --no-print-directory test012'])
12
13 test('driver013',
14      extra_clean(['A013.xhi', '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',
35                   'stub017/TestStub017_stub.h', 'stub017/']),
36      run_command,
37      ['$MAKE -s --no-print-directory test017'])
38
39 test('driver018',
40      extra_clean(['F018.hi', 'F018_stub.h',
41                   'obj018/TestStub018.o', 'obj018/TestStub018_stub.o',
42                   'obj018']),
43      run_command,
44      ['$MAKE -s --no-print-directory test018'])
45
46 test('driver018a',
47      extra_clean(['F018a.hi', 'F018a_stub.h',
48                   'F018a.obj.018']),
49      run_command,
50      ['$MAKE -s --no-print-directory test018a'])
51
52 test('driver019',
53      extra_clean(['out019/TestStub019.hi',
54                   'out019/TestStub019.o',
55                   'out019/TestStub019_stub.h',
56                   'out019/TestStub019_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.ooo']),
67      run_command,
68      ['$MAKE -s --no-print-directory test022'])
69
70 test('driver023',
71      extra_clean(['B023/C.xhi', '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                   'B024a/stub.c', 'B024a/']),
83      run_command,
84      ['$MAKE -s --no-print-directory test024a'])
85
86 test('driver025',
87      extra_clean(['B025/C.hi', 'B025/C.o',
88                   'hi025/B025/C.hi', 'hi025/B025', 'hi025']),
89      run_command,
90      ['$MAKE -s --no-print-directory test025'])
91
92 test('driver026',
93      extra_clean(['d026/P/Q.hi', 'd026/P/Q.o']),
94      run_command,
95      ['$MAKE -s --no-print-directory test026'])
96
97 test('driver027',
98      extra_clean(['B027/F.hi', 'B027/F.o',
99                   'B027/F_stub.h', 'B027/F_stub.o']),
100      run_command,
101      ['$MAKE -s --no-print-directory test027'])
102
103 test('driver028',
104      extra_clean(['B028/F.hi', 'B028/F.o',
105                   'stub028/B028/F_stub.h', 'stub028/B028/', 'stub028/']),
106      run_command,
107      ['$MAKE -s --no-print-directory test028'])
108
109 test('driver031',
110      extra_clean(['A031.hi', 'A031.o']),
111      run_command,
112      ['$MAKE -s --no-print-directory test031'])
113
114 test('driver032',
115      extra_clean(['A032.hi', 'obj032/A032.o', 'obj032/']),
116      run_command,
117      ['$MAKE -s --no-print-directory test032'])
118
119 test('driver033',
120      extra_clean(['A033.hi', 'A033.o', 'hi033/A033.hi', 'hi033']),
121      run_command,
122      ['$MAKE -s --no-print-directory test033'])
123
124 test('driver034',
125      extra_clean(['F034.hi', 'F034.o', 'F034_stub.h']),
126      run_command,
127      ['$MAKE -s --no-print-directory test034'])
128
129 test('driver035',
130      extra_clean(['F035.hi', 'F035.o',
131                   'stub035/TestStub035_stub.h', 'stub035/']),
132      run_command,
133      ['$MAKE -s --no-print-directory test035'])
134
135 test('driver041',
136      extra_clean(['B041/C.hi', 'B041/C.o']),
137      run_command,
138      ['$MAKE -s --no-print-directory test041'])
139
140 test('driver042',
141      extra_clean(['B042/C.hi', 'obj042/B042/C.o', 'obj042/B042/', 'obj042/']),
142      run_command,
143      ['$MAKE -s --no-print-directory test042'])
144
145 test('driver042stub',
146      extra_clean(['B042stub/C.hi', 'obj042stub/B042stub/C.o', 'obj042stub/B042stub/', 'obj042stub/']),
147      run_command,
148      ['$MAKE -s --no-print-directory test042stub'])
149
150 test('driver043',
151      extra_clean(['B043/C.hi', 'B043/C.o',
152                   'hi043/B043/C.hi', 'hi043/B043', 'hi043']),
153      run_command,
154      ['$MAKE -s --no-print-directory test043'])
155
156 test('driver044',
157      extra_clean(['B044/F.hi', 'B044/F.o',
158                   'B044/F_stub.h', 'B044/F_stub.o']),
159      run_command,
160      ['$MAKE -s --no-print-directory test044'])
161
162 test('driver045',
163      extra_clean(['B045/F.hi', 'B045/F.o',
164                   'stub045/B045/F_stub.h', 'stub045/B045/', 'stub045/']),
165      run_command,
166      ['$MAKE -s --no-print-directory test045'])
167
168 test('driver051',
169      extra_clean(['d051_1/P/Q.hi', 'd051_1/P/Q.o',
170                   'd051_2/R/S.hi', 'd051_2/R/S.o']),
171      run_command,
172      ['$MAKE -s --no-print-directory test051'])
173
174 test('driver052',
175      extra_clean(['d052_1/P/Q.hi', 'd052_1/P/Q.o',
176                   'd052_2/R/S.hi', 'd052_2/R/S.o',
177                   'obj052/P/Q.o', 'obj052/P',
178                   'obj052/R/S.o', 'obj052/R',
179                   'obj052']),
180      run_command,
181      ['$MAKE -s --no-print-directory test052'])
182
183 test('driver053',
184      extra_clean(['d053_1/P/Q.hi', 'd053_1/P/Q.o',
185                   'd053_2/R/S.hi', 'd053_2/R/S.o',
186                   'hi053/P/Q.hi', 'hi053/P',
187                   'hi053/R/S.hi', 'hi053/R',
188                   'hi053']),
189      run_command,
190      ['$MAKE -s --no-print-directory test053'])
191
192 test('driver061a',
193      extra_clean(['A061a.hi', 'A061a.o', 'A061a.s']),
194      run_command,
195      ['$MAKE -s --no-print-directory test061a'])
196
197 test('driver061b',
198      extra_clean(['A061b.hi', 'A061b.o', 'A061b.s']),
199      run_command,
200      ['$MAKE -s --no-print-directory test061b'])
201
202
203 test('driver062a',
204      extra_clean(['Hello062a.hs', 'Hello062a.hi', 'Hello062a.o',
205                   'hello062a', 'hello062a.exe']),
206      run_command,
207      ['$MAKE -s --no-print-directory test062a'])
208 test('driver062b',
209      extra_clean(['Hello062b.hs', 'Hello062b.hi', 'Hello062b.o',
210                   'hello062b', 'hello062b.exe']),
211      run_command,
212      ['$MAKE -s --no-print-directory test062b'])
213 test('driver062c',
214      extra_clean(['Hello062c.hs', 'Hello062c.hi', 'Hello062c.o',
215                   'hello062c', 'hello062c.exe']),
216      run_command,
217      ['$MAKE -s --no-print-directory test062c'])
218 test('driver062d',
219      extra_clean(['B062d/Hello062d.hi', 'B062d/Hello062d.o',
220                   'B062d/Hello062d.hs', 'B062d/',
221                   'hello062d', 'hello062d.exe']),
222      run_command,
223      ['$MAKE -s --no-print-directory test062d'])
224 test('driver062e',
225      extra_clean(['B062e/Hello062e.hi', 'B062e/Hello062e.o',
226                   'B062e/Hello062e.hs', 'B062e/',
227                   'hello062e', 'hello062e.exe']),
228      run_command,
229      ['$MAKE -s --no-print-directory test062e'])
230
231 test('driver063',
232      extra_clean(['A063.hi', 'A063.o', 'A063.hc',
233                   'D063.hi', 'D063.o', 'D063.hc']),
234      run_command,
235      ['$MAKE -s --no-print-directory test063'])
236
237 test('driver064',
238      extra_clean(['A064.hi', 'A064.o', 'A064.hspp']),
239      run_command,
240      ['$MAKE -s --no-print-directory test064'])
241
242 test('driver065',
243      extra_clean(['A065.hi', 'A065.o', 'A065.hspp']),
244      run_command,
245      ['$MAKE -s --no-print-directory test065'])
246
247 test('driver066',
248      extra_clean(['A066.hi', 'A066.o', 'A066.tmp']),
249      run_command,
250      ['$MAKE -s --no-print-directory test066'])
251
252 test('driver067',
253      extra_clean(['A067.hi', 'A067.o', 'A067.tmp']),
254      run_command,
255      ['$MAKE -s --no-print-directory test067'])
256
257 test('driver070',
258      extra_clean(['A070.hi', 'A070.o', 'A070.s']),
259      run_command,
260      ['$MAKE -s --no-print-directory test070'])
261
262 test('driver071',
263      extra_clean(['A071.hi', 'A071.o', 'A071.tmp']),
264      run_command,
265      ['$MAKE -s --no-print-directory test071'])
266
267 test('driver081a',
268      extra_clean(['Test_081a.hs', 'Test_081a.hi', 'Test_081a.o',
269                   'Test_081a', 'Test_081a.exe']),
270      run_command,
271      ['$MAKE -s --no-print-directory test081a'])
272
273 test('driver081b',
274      extra_clean(['Test.081b.hs', 'Test.081b.hi', 'Test.081b.o',
275                   'Test.081b', 'Test.081b.exe']),
276      run_command,
277      ['$MAKE -s --no-print-directory test081b'])
278
279 test('driver100',
280      extra_clean(['overlap/List.hi', 'overlap/List.o',
281                   'overlap/Overlap.hi', 'overlap/Overlap.o']),
282      run_command,
283      ['$MAKE -s --no-print-directory test100'])
284
285 test('driver200',
286      extra_clean(['depend200', 'depend200.bak']),
287      run_command,
288      ['$MAKE -s --no-print-directory test200'])
289
290 test('T2566',
291      normalise_fun(normalise_errmsg),
292      run_command,
293      ['$MAKE -s --no-print-directory T2566'])
294
295 test('pragma001', normal, compile, [''])
296 test('pragma002', normal, compile, [''])
297
298 test('T2499', normal, compile_fail, [''])
299
300 test('mode001', normal, run_command,
301      ['$MAKE -s --no-print-directory mode001'])
302
303 if config.os == 'mingw32':
304      only_windows = normal
305 else:
306      only_windows = skip
307
308 test('shared001',
309      [only_windows,
310       extra_clean(['Shared001.hi', 'Shared001.o', 'HSdll.dll.a', 'HSdll.dll', 'Shared001_stub.h', 'Shared001_stub.o'])],
311      run_command,
312      ['$MAKE -s --no-print-directory shared001'])
313
314 if config.os == 'darwin':
315   only_darwin = normal
316 else:
317   only_darwin = skip
318
319 test('static001',
320      [only_darwin, expect_fail,
321       extra_clean(['Static001.hi', 'Static001.o', 'liba.a', 'Static001_stub.h', 'Static001_stub.o'])],
322      run_command,
323      ['$MAKE -s --no-print-directory static001'])
324
325 test('dynHelloWorld',
326      only_ways(['dyn']),
327      compile_and_run,
328      [''])
329
330 test('T5313',
331      extra_run_opts('"' + config.libdir + '"'),
332      compile_and_run,
333      ['-package ghc'])
334
335 test('T2464', normal, compile, [''])
336 test('T3674',
337      [ignore_output,
338       extra_clean(['T3674_pre.hi', 'T3674_pre.o', 'T3674_pre', 'T3674_pre.exe'])],
339      run_command, 
340      ['$MAKE -s --no-print-directory T3674'])
341
342 test('rtsopts001',
343      extra_clean(['rtsOpts.hi', 'rtsOpts.o', 'rtsOpts', 'rtsOpts.exe']),
344      run_command,
345      ['$MAKE -s --no-print-directory rtsopts001'])
346 test('rtsopts002', normal, run_command,
347                 ['$MAKE -s --no-print-directory rtsopts002'])
348
349 test('withRtsOpts', [ extra_clean(['withRtsOpts', 'withRtsOpts.exe',
350                                    'withRtsOpts.hi', 'withRtsOpts.o',
351                                    'withRtsOpts.out']) ],
352                     run_command,
353                     ['$MAKE -s --no-print-directory withRtsOpts'])
354 test('T3389', normal, compile_and_run, [''])
355 test('T3364', normalise_fun(normalise_errmsg), run_command,
356      ['$MAKE -s --no-print-directory T3364'])
357 test('T4437', only_ways(['normal']), compile_and_run, ['-package ghc'])
358
359 test('werror', normal, compile_fail, [''])
360
361 test('T706',
362      [req_interp,
363       extra_clean(['T706.hs'])],
364      run_command,
365      ['$MAKE -s --no-print-directory T706'])
366 test('spacesInArgs',
367      extra_run_opts('"a   b"   "c   d"'),
368      compile_and_run,
369      [''])
370
371 test('T5584',
372      extra_clean(['T5584_in/A.hi-boot', 'T5584_out/T5584/A.o-boot']),
373      run_command, ['$MAKE -s --no-print-directory T5584'])
374 test('T5198', extra_clean(['T5198dump/T5198.dump-simpl', 'T5198dump']),
375      run_command,
376      ['$MAKE -s --no-print-directory T5198'])
377 test('T7060',
378      extra_clean(['T7060dump/T7060.dump-rules',
379                   'T7060dump/T7060.dump-rule-firings',
380                   'T7060dump/T7060.dump-rule-rewrites',
381                   'T7060dump']),
382      run_command,
383      ['$MAKE -s --no-print-directory T7060'])
384 test('T7130', normal, compile_fail, ['-fflul-laziness'])
385 test('T7563', when(unregisterised(), skip), run_command,
386      ['$MAKE -s --no-print-directory T7563'])
387 test('T6037', expect_broken(6037), run_command,
388      ['$MAKE -s --no-print-directory T6037'])
389 test('T2507',
390      # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
391      [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail)],
392      run_command,
393      ['$MAKE -s --no-print-directory T2507'])
394 test('T8959a',
395      # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
396      [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail)],
397      run_command,
398      ['$MAKE -s --no-print-directory T8959a'])
399
400 test('T703', normal, run_command, ['$MAKE -s --no-print-directory T703'])
401 test('T2182', normal, run_command, ['$MAKE -s --no-print-directory T2182'])
402 test('T8101', normal, compile, ['-Wall -fno-code'])
403
404 def build_T9050(name, way):
405      return simple_build(name + '.cmm', way, '-outputdir=. ', 0, '', 0, 0, 0)
406 test('T9050', normal, build_T9050, [])
407
408 test('write_interface_oneshot', normal, run_command, ['$MAKE -s --no-print-directory write_interface_oneshot'])
409 test('write_interface_make', normal, run_command, ['$MAKE -s --no-print-directory write_interface_make'])
410
411 test('T9776', normal, compile_fail, ['-frule-check'])
412
413 test('T9938',
414      [ extra_clean(['T9938.hi', 'T9938.o', 'T9938']), normal ],
415      run_command,
416      ['$MAKE -s --no-print-directory T9938'])
417
418 test('T9938B',
419      [ extra_clean(['T9938B.hi', 'T9938B.o', 'T9938B']) ],
420      run_command,
421      ['$MAKE -s --no-print-directory T9938B'])
422
423 test('T9963', exit_code(1), run_command,
424      ['{compiler} --interactive --print-libdir'])
425
426 test('T10219', normal, run_command,
427      # `-x hspp` in make mode should work.
428      # Note: need to specify `-x hspp` before the filename.
429      ['{compiler} --make -x hspp T10219.hspp -fno-code -v0'])
430
431 test('T10220', normal, run_command,
432      # Preprocessed T10220.hspp imports T10220B. Should work in --make mode.
433      ['{compiler} --make T10220.hspp -fno-code -v0'])
434
435 test('T10182',
436      extra_clean(['T10182.o', 'T10182a.o', 'T10182.o-boot', 'T10182.hi', 'T10182a.hi', 'T10182.hi-boot']),
437      run_command,
438      ['$MAKE -s --no-print-directory T10182'])