testsuite: Use makefile_test
[ghc.git] / testsuite / tests / driver / all.T
index 5d936d7..64b9aeb 100644 (file)
-setTestOpts(only_compiler_types(['ghc']))
-
-test('driver011',
-     extra_clean(['A011.hi', 'A011.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test011'])
-
-test('driver012',
-     extra_clean(['A012.hi', 'A012.ooo']),
-     run_command,
-     ['$MAKE -s --no-print-directory test012'])
-
-test('driver013',
-     extra_clean(['A013.xhi', 'A013.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test013'])
-
-test('driver014',
-     extra_clean(['A014.hi', 'obj014/A014.o', 'obj014']),
-     run_command,
-     ['$MAKE -s --no-print-directory test014'])
-
-test('driver015',
-     extra_clean(['A015.o', 'hi015/A015.hi', 'hi015']),
-     run_command,
-     ['$MAKE -s --no-print-directory test015'])
-
-test('driver016',
-     extra_clean(['F016.hi', 'F016.o', 'F016_stub.h']),
-     run_command,
-     ['$MAKE -s --no-print-directory test016'])
-
-test('driver017',
-     extra_clean(['F017.hi', 'F017.o',
-                  'stub017/TestStub017_stub.h', 'stub017/']),
-     run_command,
-     ['$MAKE -s --no-print-directory test017'])
-
-test('driver018',
-     extra_clean(['F018.hi', 'F018_stub.h',
-                  'obj018/TestStub018.o', 'obj018/TestStub018_stub.o',
-                  'obj018']),
-     run_command,
-     ['$MAKE -s --no-print-directory test018'])
-
-test('driver018a',
-     extra_clean(['F018a.hi', 'F018a_stub.h',
-                  'F018a.obj.018']),
-     run_command,
-     ['$MAKE -s --no-print-directory test018a'])
-
-test('driver019',
-     extra_clean(['out019/TestStub019.hi',
-                  'out019/TestStub019.o',
-                  'out019/TestStub019_stub.h',
-                  'out019/TestStub019_stub.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test019'])
-
-test('driver021',
-     extra_clean(['B021/C.hi', 'B021/C.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test021'])
-
-test('driver022',
-     extra_clean(['B022/C.hi', 'B022/C.ooo']),
-     run_command,
-     ['$MAKE -s --no-print-directory test022'])
-
-test('driver023',
-     extra_clean(['B023/C.xhi', 'B023/C.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test023'])
-
-test('driver024',
-     extra_clean(['B024/C.hi', 'obj024/B024/C.o', 'obj024/B024', 'obj024']),
-     run_command,
-     ['$MAKE -s --no-print-directory test024'])
-
-test('driver024a',
-     extra_clean(['obj024a/B024a/stub.o', 'obj024a/B024a', 'obj024a',
-                  'B024a/stub.c', 'B024a/']),
-     run_command,
-     ['$MAKE -s --no-print-directory test024a'])
-
-test('driver025',
-     extra_clean(['B025/C.hi', 'B025/C.o',
-                  'hi025/B025/C.hi', 'hi025/B025', 'hi025']),
-     run_command,
-     ['$MAKE -s --no-print-directory test025'])
-
-test('driver026',
-     extra_clean(['d026/P/Q.hi', 'd026/P/Q.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test026'])
-
-test('driver027',
-     extra_clean(['B027/F.hi', 'B027/F.o',
-                  'B027/F_stub.h', 'B027/F_stub.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test027'])
-
-test('driver028',
-     extra_clean(['B028/F.hi', 'B028/F.o',
-                  'stub028/B028/F_stub.h', 'stub028/B028/', 'stub028/']),
-     run_command,
-     ['$MAKE -s --no-print-directory test028'])
-
-test('driver031',
-     extra_clean(['A031.hi', 'A031.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test031'])
-
-test('driver032',
-     extra_clean(['A032.hi', 'obj032/A032.o', 'obj032/']),
-     run_command,
-     ['$MAKE -s --no-print-directory test032'])
-
-test('driver033',
-     extra_clean(['A033.hi', 'A033.o', 'hi033/A033.hi', 'hi033']),
-     run_command,
-     ['$MAKE -s --no-print-directory test033'])
-
-test('driver034',
-     extra_clean(['F034.hi', 'F034.o', 'F034_stub.h']),
-     run_command,
-     ['$MAKE -s --no-print-directory test034'])
-
-test('driver035',
-     extra_clean(['F035.hi', 'F035.o',
-                  'stub035/TestStub035_stub.h', 'stub035/']),
-     run_command,
-     ['$MAKE -s --no-print-directory test035'])
-
-test('driver041',
-     extra_clean(['B041/C.hi', 'B041/C.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test041'])
-
-test('driver042',
-     extra_clean(['B042/C.hi', 'obj042/B042/C.o', 'obj042/B042/', 'obj042/']),
-     run_command,
-     ['$MAKE -s --no-print-directory test042'])
-
-test('driver042stub',
-     extra_clean(['B042stub/C.hi', 'obj042stub/B042stub/C.o', 'obj042stub/B042stub/', 'obj042stub/']),
-     run_command,
-     ['$MAKE -s --no-print-directory test042stub'])
-
-test('driver043',
-     extra_clean(['B043/C.hi', 'B043/C.o',
-                  'hi043/B043/C.hi', 'hi043/B043', 'hi043']),
-     run_command,
-     ['$MAKE -s --no-print-directory test043'])
-
-test('driver044',
-     extra_clean(['B044/F.hi', 'B044/F.o',
-                  'B044/F_stub.h', 'B044/F_stub.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test044'])
-
-test('driver045',
-     extra_clean(['B045/F.hi', 'B045/F.o',
-                  'stub045/B045/F_stub.h', 'stub045/B045/', 'stub045/']),
-     run_command,
-     ['$MAKE -s --no-print-directory test045'])
-
-test('driver051',
-     extra_clean(['d051_1/P/Q.hi', 'd051_1/P/Q.o',
-                  'd051_2/R/S.hi', 'd051_2/R/S.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test051'])
-
-test('driver052',
-     extra_clean(['d052_1/P/Q.hi', 'd052_1/P/Q.o',
-                  'd052_2/R/S.hi', 'd052_2/R/S.o',
-                  'obj052/P/Q.o', 'obj052/P',
-                  'obj052/R/S.o', 'obj052/R',
-                  'obj052']),
-     run_command,
-     ['$MAKE -s --no-print-directory test052'])
-
-test('driver053',
-     extra_clean(['d053_1/P/Q.hi', 'd053_1/P/Q.o',
-                  'd053_2/R/S.hi', 'd053_2/R/S.o',
-                  'hi053/P/Q.hi', 'hi053/P',
-                  'hi053/R/S.hi', 'hi053/R',
-                  'hi053']),
-     run_command,
-     ['$MAKE -s --no-print-directory test053'])
-
-test('driver061a',
-     extra_clean(['A061a.hi', 'A061a.o', 'A061a.s']),
-     run_command,
-     ['$MAKE -s --no-print-directory test061a'])
-
-test('driver061b',
-     extra_clean(['A061b.hi', 'A061b.o', 'A061b.s']),
-     run_command,
-     ['$MAKE -s --no-print-directory test061b'])
-
-
-test('driver062a',
-     extra_clean(['Hello062a.hs', 'Hello062a.hi', 'Hello062a.o',
-                  'hello062a', 'hello062a.exe']),
-     run_command,
-     ['$MAKE -s --no-print-directory test062a'])
-test('driver062b',
-     extra_clean(['Hello062b.hs', 'Hello062b.hi', 'Hello062b.o',
-                  'hello062b', 'hello062b.exe']),
-     run_command,
-     ['$MAKE -s --no-print-directory test062b'])
-test('driver062c',
-     extra_clean(['Hello062c.hs', 'Hello062c.hi', 'Hello062c.o',
-                  'hello062c', 'hello062c.exe']),
-     run_command,
-     ['$MAKE -s --no-print-directory test062c'])
-test('driver062d',
-     extra_clean(['B062d/Hello062d.hi', 'B062d/Hello062d.o',
-                  'B062d/Hello062d.hs', 'B062d/',
-                  'hello062d', 'hello062d.exe']),
-     run_command,
-     ['$MAKE -s --no-print-directory test062d'])
-test('driver062e',
-     extra_clean(['B062e/Hello062e.hi', 'B062e/Hello062e.o',
-                  'B062e/Hello062e.hs', 'B062e/',
-                  'hello062e', 'hello062e.exe']),
-     run_command,
-     ['$MAKE -s --no-print-directory test062e'])
-
-test('driver063',
-     extra_clean(['A063.hi', 'A063.o', 'A063.hc',
-                  'D063.hi', 'D063.o', 'D063.hc']),
-     run_command,
-     ['$MAKE -s --no-print-directory test063'])
-
-test('driver064',
-     extra_clean(['A064.hi', 'A064.o', 'A064.hspp']),
-     run_command,
-     ['$MAKE -s --no-print-directory test064'])
-
-test('driver065',
-     extra_clean(['A065.hi', 'A065.o', 'A065.hspp']),
-     run_command,
-     ['$MAKE -s --no-print-directory test065'])
-
-test('driver066',
-     extra_clean(['A066.hi', 'A066.o', 'A066.tmp']),
-     run_command,
-     ['$MAKE -s --no-print-directory test066'])
-
-test('driver067',
-     extra_clean(['A067.hi', 'A067.o', 'A067.tmp']),
-     run_command,
-     ['$MAKE -s --no-print-directory test067'])
-
-test('driver070',
-     extra_clean(['A070.hi', 'A070.o', 'A070.s']),
-     run_command,
-     ['$MAKE -s --no-print-directory test070'])
-
-test('driver071',
-     extra_clean(['A071.hi', 'A071.o', 'A071.tmp']),
-     run_command,
-     ['$MAKE -s --no-print-directory test071'])
-
-test('driver081a',
-     extra_clean(['Test_081a.hs', 'Test_081a.hi', 'Test_081a.o',
-                  'Test_081a', 'Test_081a.exe']),
-     run_command,
-     ['$MAKE -s --no-print-directory test081a'])
-
-test('driver081b',
-     extra_clean(['Test.081b.hs', 'Test.081b.hi', 'Test.081b.o',
-                  'Test.081b', 'Test.081b.exe']),
-     run_command,
-     ['$MAKE -s --no-print-directory test081b'])
-
-test('driver100',
-     extra_clean(['overlap/List.hi', 'overlap/List.o',
-                  'overlap/Overlap.hi', 'overlap/Overlap.o']),
-     run_command,
-     ['$MAKE -s --no-print-directory test100'])
-
-test('driver200',
-     extra_clean(['depend200', 'depend200.bak']),
-     run_command,
-     ['$MAKE -s --no-print-directory test200'])
-
-test('T2566',
-     normalise_fun(normalise_errmsg),
-     run_command,
-     ['$MAKE -s --no-print-directory T2566'])
+test('driver011', [extra_files(['A011.hs'])], makefile_test, ['test011'])
+
+test('driver012', [extra_files(['A012.hs'])], makefile_test, ['test012'])
+
+test('driver013', [extra_files(['A013.hs'])], makefile_test, ['test013'])
+
+test('driver014', [extra_files(['A014.hs'])], makefile_test, ['test014'])
+
+test('driver015', [extra_files(['A015.hs'])], makefile_test, ['test015'])
+
+test('driver016', [extra_files(['F016.hs'])], makefile_test, ['test016'])
+
+test('driver017', [extra_files(['F017.hs'])], makefile_test, ['test017'])
+
+test('driver018', [extra_files(['F018.hs'])], makefile_test, ['test018'])
+
+test('driver018a', [extra_files(['F018a.hs'])], makefile_test, ['test018a'])
+
+test('driver019', [extra_files(['F019.hs'])], makefile_test, ['test019'])
+
+test('driver021', [extra_files(['B021/'])], makefile_test, ['test021'])
+
+test('driver022', [extra_files(['B022/'])], makefile_test, ['test022'])
+
+test('driver023', [extra_files(['B023/'])], makefile_test, ['test023'])
+
+test('driver024', [extra_files(['B024/'])], makefile_test, ['test024'])
+
+test('driver024a', [], makefile_test, ['test024a'])
+
+test('driver025', [extra_files(['B025/'])], makefile_test, ['test025'])
+
+test('driver026', [extra_files(['d026/'])], makefile_test, ['test026'])
+
+test('driver027', [extra_files(['B027/'])], makefile_test, ['test027'])
+
+test('driver028', [extra_files(['B028/'])], makefile_test, ['test028'])
+
+test('driver031', [extra_files(['A031.hs'])], makefile_test, ['test031'])
+
+test('driver032', [extra_files(['A032.hs'])], makefile_test, ['test032'])
+
+test('driver033', [extra_files(['A033.hs'])], makefile_test, ['test033'])
+
+test('driver034', [extra_files(['F034.hs'])], makefile_test, ['test034'])
+
+test('driver035', [extra_files(['F035.hs'])], makefile_test, ['test035'])
+
+test('driver041', [extra_files(['B041/'])], makefile_test, ['test041'])
+
+test('driver042', [extra_files(['B042/'])], makefile_test, ['test042'])
+
+test('driver042stub', [extra_files(['B042stub/'])], makefile_test, ['test042stub'])
+
+test('driver043', [extra_files(['B043/'])], makefile_test, ['test043'])
+
+test('driver044', [extra_files(['B044/'])], makefile_test, ['test044'])
+
+test('driver045', [extra_files(['B045/'])], makefile_test, ['test045'])
+
+test('driver051', [extra_files(['d051_1/', 'd051_2/'])], makefile_test, ['test051'])
+
+test('driver052', [extra_files(['d052_1/', 'd052_2/'])], makefile_test, ['test052'])
+
+test('driver053', [extra_files(['d053_1/', 'd053_2/'])], makefile_test, ['test053'])
+
+test('driver061a', [extra_files(['A061a.hs'])], makefile_test, ['test061a'])
+
+test('driver061b', [extra_files(['A061b.hs'])], makefile_test, ['test061b'])
+
+
+test('driver062a', [], makefile_test, ['test062a'])
+test('driver062b', [], makefile_test, ['test062b'])
+test('driver062c', [], makefile_test, ['test062c'])
+test('driver062d', [], makefile_test, ['test062d'])
+test('driver062e', [], makefile_test, ['test062e'])
+
+test('driver063', [extra_files(['D063.hs'])], makefile_test, ['test063'])
+
+test('driver064', [extra_files(['A064.hs'])], makefile_test, ['test064'])
+
+test('driver065', [extra_files(['A065.hs'])], makefile_test, ['test065'])
+
+test('driver066', [extra_files(['A066.hs'])], makefile_test, ['test066'])
+
+test('driver067', [extra_files(['A067.hs'])], makefile_test, ['test067'])
+
+test('driver070', [extra_files(['A070.hs'])], makefile_test, ['test070'])
+
+test('driver071', [extra_files(['A071.hs'])], makefile_test, ['test071'])
+
+test('driver081a', [], makefile_test, ['test081a'])
+
+test('driver081b', [], makefile_test, ['test081b'])
+
+test('driver100', [extra_files(['overlap/'])], makefile_test, ['test100'])
+
+test('driver200', [extra_files(['A200.hs', 'B200/', 'D200.hs'])], makefile_test, ['test200'])
+
+test('T2566', normalise_fun(normalise_errmsg), makefile_test, [])
 
 test('pragma001', normal, compile, [''])
 test('pragma002', normal, compile, [''])
 
 test('T2499', normal, compile_fail, [''])
 
-test('mode001', normal, run_command,
-     ['$MAKE -s --no-print-directory mode001'])
+test('mode001', normal, makefile_test, [])
 
 if config.os == 'mingw32':
      only_windows = normal
 else:
      only_windows = skip
 
-test('shared001',
-     [only_windows,
-      extra_clean(['Shared001.hi', 'Shared001.o', 'HSdll.dll.a', 'HSdll.dll', 'Shared001_stub.h', 'Shared001_stub.o'])],
-     run_command,
-     ['$MAKE -s --no-print-directory shared001'])
+test('shared001', [extra_files(['Shared001.hs']),
+                   only_windows],
+     makefile_test, ['shared001'])
 
 if config.os == 'darwin':
   only_darwin = normal
 else:
   only_darwin = skip
 
-test('static001',
-     [only_darwin, expect_fail,
-      extra_clean(['Static001.hi', 'Static001.o', 'liba.a', 'Static001_stub.h', 'Static001_stub.o'])],
-     run_command,
-     ['$MAKE -s --no-print-directory static001'])
+test('static001', [extra_files(['Static001.hs']),
+                   only_darwin, expect_broken(8127)],
+     makefile_test, ['static001'])
 
 test('dynHelloWorld',
      only_ways(['dyn']),
@@ -328,107 +130,84 @@ test('dynHelloWorld',
      [''])
 
 test('T5313',
-     extra_run_opts('"' + config.libdir + '"'),
+     [ when(arch('powerpc64') or arch('powerpc64le'), expect_broken(11259)),
+       extra_run_opts('"' + config.libdir + '"')],
      compile_and_run,
      ['-package ghc'])
 
 test('T2464', normal, compile, [''])
-test('T3674',
-     [ignore_output,
-      extra_clean(['T3674_pre.hi', 'T3674_pre.o', 'T3674_pre', 'T3674_pre.exe'])],
-     run_command, 
-     ['$MAKE -s --no-print-directory T3674'])
-
-test('rtsopts001',
-     extra_clean(['rtsOpts.hi', 'rtsOpts.o', 'rtsOpts', 'rtsOpts.exe']),
-     run_command,
-     ['$MAKE -s --no-print-directory rtsopts001'])
-test('rtsopts002', normal, run_command,
-                ['$MAKE -s --no-print-directory rtsopts002'])
-
-test('withRtsOpts', [ extra_clean(['withRtsOpts', 'withRtsOpts.exe',
-                                   'withRtsOpts.hi', 'withRtsOpts.o',
-                                   'withRtsOpts.out']) ],
-                    run_command,
-                    ['$MAKE -s --no-print-directory withRtsOpts'])
+test('T3674', [], makefile_test, [])
+
+test('rtsopts001', [extra_files(['rtsOpts.hs'])], makefile_test, [])
+test('rtsopts002', normal, makefile_test, [])
+
+test('withRtsOpts', [], makefile_test, [])
 test('T3389', normal, compile_and_run, [''])
-test('T3364', normalise_fun(normalise_errmsg), run_command,
-     ['$MAKE -s --no-print-directory T3364'])
+test('T3364', normalise_fun(normalise_errmsg), makefile_test, [])
+
+# T4437: A test to ensure that Cabal's language extension list remains
+# consistent with those known by GHC.
+#
+# See Note [Adding a language extension] in DynFlags.hs for details.
 test('T4437', only_ways(['normal']), compile_and_run, ['-package ghc'])
 
 test('werror', normal, compile_fail, [''])
 
-test('T706',
-     [req_interp,
-      extra_clean(['T706.hs'])],
-     run_command,
-     ['$MAKE -s --no-print-directory T706'])
+test('T706', [req_interp], makefile_test, [])
 test('spacesInArgs',
      extra_run_opts('"a   b"   "c   d"'),
      compile_and_run,
      [''])
 
-test('T5584',
-     extra_clean(['T5584_in/A.hi-boot', 'T5584_out/T5584/A.o-boot']),
-     run_command, ['$MAKE -s --no-print-directory T5584'])
-test('T5198', extra_clean(['T5198dump/T5198.dump-simpl', 'T5198dump']),
-     run_command,
-     ['$MAKE -s --no-print-directory T5198'])
-test('T7060',
-     extra_clean(['T7060dump/T7060.dump-rules',
-                  'T7060dump/T7060.dump-rule-firings',
-                  'T7060dump/T7060.dump-rule-rewrites',
-                  'T7060dump']),
-     run_command,
-     ['$MAKE -s --no-print-directory T7060'])
+fobject_code = when(doing_ghci(), extra_hc_opts('-fobject-code'))
+
+test( 'T4114a', fobject_code, compile_and_run, ['-cpp'])
+test( 'T4114b', fobject_code, compile_and_run, ['-no-keep-hi-files'])
+test( 'T4114c', [fobject_code, expect_broken_for(4114, ['ghci'])], compile_and_run, ['-no-keep-o-files'])
+test( 'T4114d', [fobject_code, expect_broken_for(4114, ['ghci'])], compile_and_run,
+     ['-hisuf .myhi -osuf .myo -no-keep-o-files'])
+
+test('T5584', [], makefile_test, [])
+test('T5198', [], makefile_test, [])
+test('T7060', [], makefile_test, [])
 test('T7130', normal, compile_fail, ['-fflul-laziness'])
-test('T7563', when(unregisterised(), skip), run_command,
-     ['$MAKE -s --no-print-directory T7563'])
-test('T6037', expect_broken(6037), run_command,
-     ['$MAKE -s --no-print-directory T6037'])
+test('T7563', when(unregisterised(), skip), makefile_test, [])
+test('T6037',
+     # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
+     [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail)],
+     makefile_test, [])
 test('T2507',
      # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
      [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail)],
-     run_command,
-     ['$MAKE -s --no-print-directory T2507'])
+     makefile_test, [])
 test('T8959a',
      # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
      [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail)],
-     run_command,
-     ['$MAKE -s --no-print-directory T8959a'])
+     makefile_test, [])
 
-test('T703', normal, run_command, ['$MAKE -s --no-print-directory T703'])
-test('T2182', normal, run_command, ['$MAKE -s --no-print-directory T2182'])
+# Requires readelf
+test('T703', unless(opsys('linux'), skip), makefile_test, [])
+test('T2182', normal, makefile_test, [])
 test('T8101', normal, compile, ['-Wall -fno-code'])
+test('T8101b', normal, multimod_compile,
+     ['T8101b', '-Wall -fno-code'])
+test('T10600', normal, compile_fail, ['-fno-code'])
 
-def build_T9050(name, way):
-     return simple_build(name + '.cmm', way, '-outputdir=. ', 0, '', 0, 0, 0)
-test('T9050', normal, build_T9050, [])
+# Should not panic when compiling cmm file together with -outputdir.
+test('T9050', cmm_src, compile, ['-outputdir=.'])
 
-test('write_interface_oneshot',
-     extra_clean(['write_interface_oneshot_hidir/*']),
-     run_command,
-     ['$MAKE -s --no-print-directory write_interface_oneshot'])
+test('write_interface_oneshot', [extra_files(['A011.hs'])], makefile_test, [])
 
-test('write_interface_make',
-     extra_clean(['write_interface_make_hidir/*']),
-     run_command,
-     ['$MAKE -s --no-print-directory write_interface_make'])
+test('write_interface_make', [extra_files(['A011.hs'])], makefile_test, [])
 
-test('T9776', normal, compile_fail, ['-frule-check'])
+test('T9776', normal, compile_fail, ['-drule-check'])
 
-test('T9938',
-     [ extra_clean(['T9938.hi', 'T9938.o', 'T9938']), normal ],
-     run_command,
-     ['$MAKE -s --no-print-directory T9938'])
+test('T9938', [], makefile_test, [])
 
-test('T9938B',
-     [ extra_clean(['T9938B.hi', 'T9938B.o', 'T9938B']) ],
-     run_command,
-     ['$MAKE -s --no-print-directory T9938B'])
+test('T9938B', [], makefile_test, [])
 
 test('T9963', exit_code(1), run_command,
-     ['{compiler} --interactive --print-libdir'])
+     ['{compiler} --interactive -ignore-dot-ghci --print-libdir'])
 
 test('T10219', normal, run_command,
      # `-x hspp` in make mode should work.
@@ -439,7 +218,55 @@ test('T10220', normal, run_command,
      # Preprocessed T10220.hspp imports T10220B. Should work in --make mode.
      ['{compiler} --make T10220.hspp -fno-code -v0'])
 
-test('T10182',
-     extra_clean(['T10182.o', 'T10182a.o', 'T10182.o-boot', 'T10182.hi', 'T10182a.hi', 'T10182.hi-boot']),
-     run_command,
-     ['$MAKE -s --no-print-directory T10182'])
+test('T10182', [], makefile_test, [])
+
+test('T10869', [], makefile_test, [])
+
+test('T365',
+     [pre_cmd('touch test_preprocessor.txt'), unless(opsys('mingw32'), skip)],
+     compile_fail, [''])
+
+test('T9360a', normal, run_command, ['{compiler} --interactive -e "" -ignore-dot-ghci'])
+test('T9360b', normal, run_command, ['{compiler} -e "" --interactive -ignore-dot-ghci'])
+
+test('T10970', normal, compile_and_run, [''])
+test('T4931', normal, compile_and_run, [''])
+test('T11182', normal, compile_and_run, [''])
+test('T11381', normal, compile_fail, [''])
+test('T11429a', normal, compile, ['-Wunrecognised-warning-flags -Wfoobar'])
+test('T11429b', normal, compile, ['-Wno-unrecognised-warning-flags -Wfoobar'])
+test('T11429c', normal, compile_fail, ['-Wunrecognised-warning-flags -Werror -Wfoobar'])
+test('T11763', normal, compile_and_run, ['-fno-version-macros'])
+
+test('T10320', [], makefile_test, [])
+
+test('T12056a', normal, compile, ['-w -Wfoo -Wbar'])
+test('T12056b', normal, compile, ['-w -XOverlappingInstances -Wfoo -Wunrecognised-warning-flags -Wbar'])
+test('T12056c', normal, compile,
+     ['-w -Wdeprecated-flags -XOverlappingInstances -Wfoo -Wunrecognised-warning-flags -Wbar'])
+
+test('T12135', [expect_broken(12135)], makefile_test, [])
+
+test('T12192', normal, run_command, ['mkdir foo && (cd foo && {compiler} -v0 ../T12192)'])
+
+test('T10923', [], makefile_test, [])
+
+test('T12625', normal, compile_fail, ['-I'])
+
+test('T12752pass', normal, compile, ['-DSHOULD_PASS=1 -Wcpp-undef'])
+
+test('T12955', normal, makefile_test, [])
+
+test('T12971', ignore_stdout, makefile_test, [])
+test('json', normal, compile_fail, ['-ddump-json'])
+test('json2', normal, compile, ['-ddump-types -ddump-json'])
+test('T13604', [], makefile_test, [])
+test('T13604a', [], makefile_test, [])
+# omitting hpc and profasm because they affect the
+# inlining and unfoldings
+test('inline-check', omit_ways(['hpc', 'profasm'])
+                   , compile
+                  , ['-dinline-check foo -O -ddebug-output'])
+
+test('T14452', [], makefile_test, [])
+test('T15396', normal, compile_and_run, ['-package ghc'])