summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2022-10-19 15:44:54 +0200
committerSylvain Henry <sylvain@haskus.fr>2022-10-26 09:32:20 +0200
commit9ab31f42da8796363187e387c4085e8c9197f4e5 (patch)
tree6e3ea5351a597680b5a01838a7e9d191a8fa576f
parent0270cc54481bef9630274e77c2750940c1a4eff5 (diff)
downloadhaskell-9ab31f42da8796363187e387c4085e8c9197f4e5.tar.gz
Testsuite: more precise test options
Necessary for newer cross-compiling backends (JS, Wasm) that don't support TH yet.
-rw-r--r--testsuite/driver/testlib.py6
-rw-r--r--testsuite/tests/annotations/should_fail/all.T14
-rw-r--r--testsuite/tests/annotations/should_run/all.T1
-rw-r--r--testsuite/tests/backpack/should_run/all.T24
-rw-r--r--testsuite/tests/codeGen/should_compile/T17904.hs2
-rw-r--r--testsuite/tests/codeGen/should_run/T20137/all.T2
-rw-r--r--testsuite/tests/codeGen/should_run/T20735/all.T2
-rw-r--r--testsuite/tests/codeGen/should_run/all.T4
-rw-r--r--testsuite/tests/corelint/all.T2
-rw-r--r--testsuite/tests/dependent/should_compile/all.T17
-rw-r--r--testsuite/tests/deriving/should_compile/all.T2
-rw-r--r--testsuite/tests/driver/T20604/all.T3
-rw-r--r--testsuite/tests/driver/T7835/all.T2
-rw-r--r--testsuite/tests/driver/all.T6
-rw-r--r--testsuite/tests/driver/fat-iface/all.T16
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/all.T2
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/o-dir/all.T3
-rw-r--r--testsuite/tests/driver/multipleHomeUnits/th-deps/all.T2
-rw-r--r--testsuite/tests/driver/recompTH/all.T2
-rw-r--r--testsuite/tests/driver/th-new-test/all.T2
-rw-r--r--testsuite/tests/ffi/should_compile/all.T3
-rw-r--r--testsuite/tests/ffi/should_fail/all.T4
-rw-r--r--testsuite/tests/ffi/should_run/all.T62
-rw-r--r--testsuite/tests/generics/all.T5
-rw-r--r--testsuite/tests/indexed-types/should_fail/all.T2
-rw-r--r--testsuite/tests/linear/should_compile/all.T2
-rw-r--r--testsuite/tests/overloadedrecflds/should_compile/all.T2
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/all.T2
-rw-r--r--testsuite/tests/overloadedrecflds/should_run/all.T4
-rw-r--r--testsuite/tests/package/T20010/all.T4
-rw-r--r--testsuite/tests/parser/should_compile/all.T3
-rw-r--r--testsuite/tests/parser/unicode/all.T2
-rw-r--r--testsuite/tests/patsyn/should_run/all.T11
-rw-r--r--testsuite/tests/polykinds/all.T2
-rw-r--r--testsuite/tests/qualifieddo/should_run/all.T2
-rw-r--r--testsuite/tests/quotes/TH_spliceViewPat/test.T5
-rw-r--r--testsuite/tests/quotes/all.T2
-rw-r--r--testsuite/tests/rename/should_compile/all.T2
-rw-r--r--testsuite/tests/rename/should_fail/all.T4
-rw-r--r--testsuite/tests/rep-poly/all.T2
-rw-r--r--testsuite/tests/rts/all.T27
-rw-r--r--testsuite/tests/saks/should_compile/all.T12
-rw-r--r--testsuite/tests/showIface/should_fail/all.T4
-rw-r--r--testsuite/tests/simplCore/should_compile/all.T6
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T9
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T4
-rw-r--r--testsuite/tests/unboxedsums/all.T4
47 files changed, 145 insertions, 160 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 29929892e9..df39a1a359 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -255,6 +255,11 @@ def req_rts_linker( name, opts ):
if not config.have_RTS_linker:
opts.expect = 'fail'
+def req_c( name, opts ):
+ """
+ Mark a test as requiring C source file support
+ """
+
def req_th( name, opts ):
"""
Mark a test as requiring TemplateHaskell. In addition to having interpreter
@@ -724,6 +729,7 @@ def literate( name, opts ):
def c_src( name, opts ):
opts.c_src = True
+ req_c (name, opts)
def objc_src( name, opts ):
opts.objc_src = True
diff --git a/testsuite/tests/annotations/should_fail/all.T b/testsuite/tests/annotations/should_fail/all.T
index 1f160a0d77..29f6c7488d 100644
--- a/testsuite/tests/annotations/should_fail/all.T
+++ b/testsuite/tests/annotations/should_fail/all.T
@@ -1,6 +1,6 @@
-test('annfail01', normal, compile_fail, [''])
-test('annfail02', normal, compile_fail, [''])
+test('annfail01', req_interp, compile_fail, [''])
+test('annfail02', req_interp, compile_fail, [''])
test('annfail03', req_interp, compile_fail, [''])
test('annfail04', [extra_files(['Annfail04_Help.hs']),
req_interp], multimod_compile_fail, ['annfail04', '-v0'])
@@ -12,12 +12,12 @@ test('annfail07', req_interp, compile_fail, [''])
test('annfail08', req_interp, compile_fail, [''])
test('annfail09', req_interp, compile_fail, [''])
test('annfail10', req_interp, compile_fail, [''])
-test('annfail11', normal, compile_fail, [''])
+test('annfail11', req_interp, compile_fail, [''])
test('annfail12', req_interp, compile_fail, ['-v0'])
-test('annfail13', normal, compile_fail, [''])
-test('T10826', normal, compile_fail, [''])
-test('T19374b', normal, compile_fail, [''])
-test('T19374c', normal, compile_fail, [''])
+test('annfail13', req_interp, compile_fail, [''])
+test('T10826', req_interp, compile_fail, [''])
+test('T19374b', req_interp, compile_fail, [''])
+test('T19374c', req_interp, compile_fail, [''])
""""
Helpful things to C+P:
diff --git a/testsuite/tests/annotations/should_run/all.T b/testsuite/tests/annotations/should_run/all.T
index 0c2acc7f63..e0fd311dcd 100644
--- a/testsuite/tests/annotations/should_run/all.T
+++ b/testsuite/tests/annotations/should_run/all.T
@@ -8,6 +8,7 @@ setTestOpts(when(fast(), skip))
# config.ghc_th_way_flags.
test('annrun01',
[extra_files(['Annrun01_Help.hs']),
+ req_interp,
pre_cmd('$MAKE -s --no-print-directory config'),
omit_ways(['dyn'] + prof_ways)],
multimod_compile_and_run,
diff --git a/testsuite/tests/backpack/should_run/all.T b/testsuite/tests/backpack/should_run/all.T
index d4deb4f4a8..3300c5d8ac 100644
--- a/testsuite/tests/backpack/should_run/all.T
+++ b/testsuite/tests/backpack/should_run/all.T
@@ -1,13 +1,13 @@
-test('bkprun01', normal, backpack_run, [''])
-test('bkprun02', normal, backpack_run, [''])
-test('bkprun03', normal, backpack_run, [''])
-test('bkprun04', normal, backpack_run, [''])
-test('bkprun05', exit_code(1), backpack_run, [''])
-test('bkprun06', normal, backpack_run, [''])
-test('bkprun07', normal, backpack_run, [''])
-test('bkprun08', normal, backpack_run, [''])
-test('bkprun09', normal, backpack_run, ['-O'])
-test('T13955', normal, backpack_run, [''])
-test('T15138', normal, backpack_run, [''])
-test('T15379', normal, backpack_run,[''])
+test('bkprun01', req_c, backpack_run, [''])
+test('bkprun02', req_c, backpack_run, [''])
+test('bkprun03', req_c, backpack_run, [''])
+test('bkprun04', req_c, backpack_run, [''])
+test('bkprun05', [exit_code(1), req_c], backpack_run, [''])
+test('bkprun06', req_c, backpack_run, [''])
+test('bkprun07', req_c, backpack_run, [''])
+test('bkprun08', req_c, backpack_run, [''])
+test('bkprun09', req_c, backpack_run, ['-O'])
+test('T13955', req_c, backpack_run, [''])
+test('T15138', req_c, backpack_run, [''])
+test('T15379', req_c, backpack_run,[''])
test('T20133', expect_broken(20133), backpack_run, [''])
diff --git a/testsuite/tests/codeGen/should_compile/T17904.hs b/testsuite/tests/codeGen/should_compile/T17904.hs
index 18badc605a..f5e57f0c5f 100644
--- a/testsuite/tests/codeGen/should_compile/T17904.hs
+++ b/testsuite/tests/codeGen/should_compile/T17904.hs
@@ -13,8 +13,6 @@ module T17904
import GHC.Exts ( TYPE, Int (..) )
import Prelude hiding (lookup)
-{-# ANN module ("HLint: ignore Eta reduce" :: String) #-}
-
class Hashable a where
hashWithSalt :: Int -> a -> Int
diff --git a/testsuite/tests/codeGen/should_run/T20137/all.T b/testsuite/tests/codeGen/should_run/T20137/all.T
index 33e1975bbb..e9e65ebea2 100644
--- a/testsuite/tests/codeGen/should_run/T20137/all.T
+++ b/testsuite/tests/codeGen/should_run/T20137/all.T
@@ -1 +1 @@
-test('T20137', normal, compile_and_run, ['T20137C.c'])
+test('T20137', req_c, compile_and_run, ['T20137C.c'])
diff --git a/testsuite/tests/codeGen/should_run/T20735/all.T b/testsuite/tests/codeGen/should_run/T20735/all.T
index d10c0c0f79..7b8ed38ec4 100644
--- a/testsuite/tests/codeGen/should_run/T20735/all.T
+++ b/testsuite/tests/codeGen/should_run/T20735/all.T
@@ -1,5 +1,5 @@
test('T20735',
- normal,
+ req_c,
multi_compile_and_run,
['T20735', [('T20735_c.c', '')], ''])
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T
index 081cca22b7..4b6d1b38a1 100644
--- a/testsuite/tests/codeGen/should_run/all.T
+++ b/testsuite/tests/codeGen/should_run/all.T
@@ -205,8 +205,8 @@ test('T16449_2', exit_code(0), compile_and_run, [''])
test('T16846', [only_ways(['optasm']), exit_code(1)], compile_and_run, [''])
test('T17920', cmm_src, compile_and_run, [''])
-test('T18527', normal, compile_and_run, ['T18527FFI.c'])
-test('T19149', only_ways('sanity'), compile_and_run, ['T19149_c.c'])
+test('T18527', req_c, compile_and_run, ['T18527FFI.c'])
+test('T19149', [req_c,only_ways('sanity')], compile_and_run, ['T19149_c.c'])
test('T20275', normal, compile_and_run, [''])
test('CallConv', [when(unregisterised(), skip),
diff --git a/testsuite/tests/corelint/all.T b/testsuite/tests/corelint/all.T
index 4deab99146..4271974c83 100644
--- a/testsuite/tests/corelint/all.T
+++ b/testsuite/tests/corelint/all.T
@@ -1,6 +1,6 @@
test('T21115', normal, compile_fail, [''])
-test('T21115b', normal, compile_fail, ['-dsuppress-uniques -dsuppress-all'])
+test('T21115b', req_th, compile_fail, ['-dsuppress-uniques -dsuppress-all'])
test('T21152', normal, compile, ['-g3'])
## Tests which use the GHC API.
diff --git a/testsuite/tests/dependent/should_compile/all.T b/testsuite/tests/dependent/should_compile/all.T
index 77dcb580df..9e68957784 100644
--- a/testsuite/tests/dependent/should_compile/all.T
+++ b/testsuite/tests/dependent/should_compile/all.T
@@ -2,9 +2,9 @@ test('Dep1', only_ways(['normal']), compile, [''])
test('Dep2', only_ways(['normal']), compile, [''])
test('Dep3', only_ways(['normal']), compile, [''])
test('KindEqualities', only_ways(['normal']), compile, [''])
-test('KindEqualities2', only_ways(['normal']), compile, [''])
-test('Rae31', only_ways(['normal']), compile, [''])
-test('RAE_T32b', only_ways(['normal']), compile, [''])
+test('KindEqualities2', [req_th,only_ways(['normal'])], compile, [''])
+test('Rae31', [req_th,only_ways(['normal'])], compile, [''])
+test('RAE_T32b', [req_th,only_ways(['normal'])], compile, [''])
test('KindLevels', normal, compile, [''])
test('RaeBlogPost', normal, compile, [''])
test('mkGADTVars', normal, compile, [''])
@@ -35,16 +35,7 @@ test('T13538', normal, compile, [''])
test('T12176', normal, compile, [''])
test('T14038', normal, compile, [''])
test('T12742', normal, compile, [''])
-# we omit profasm because it doesn't bring much to the table but
-# introduces its share of complexity, as the test as it is fails with
-# profasm:
-# T13910.hs:6:5: fatal:
-# Cannot load -prof objects when GHC is built with -dynamic
-# To fix this, either:
-# (1) Use -fexternal-interpreter, or
-# (2) Build the program twice: once with -dynamic, and then
-# with -prof using -osuf to set a different object file suffix.
-test('T13910', [omit_ways(['profasm'])], compile, [''])
+test('T13910', [req_th], compile, [''])
test('T13938', [req_th, extra_files(['T13938a.hs'])], makefile_test, ['T13938'])
test('T14556', normal, compile, [''])
test('T14720', normal, compile, [''])
diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T
index 5d23680d2b..922b7126b7 100644
--- a/testsuite/tests/deriving/should_compile/all.T
+++ b/testsuite/tests/deriving/should_compile/all.T
@@ -128,7 +128,7 @@ test('T17339', normal, compile,
['-ddump-simpl -dsuppress-idinfo -dno-typeable-binds'])
test('T17880', normal, compile, [''])
test('T18055', normal, compile, [''])
-test('T18321', normal, compile, [''])
+test('T18321', req_th, compile, [''])
test('T18914', normal, compile, [''])
# We need to find derived instances in the Tc trace dump.
# They are printed in tcDeriv beginning with "rnd" line
diff --git a/testsuite/tests/driver/T20604/all.T b/testsuite/tests/driver/T20604/all.T
index 290da3ec53..79cb2dd256 100644
--- a/testsuite/tests/driver/T20604/all.T
+++ b/testsuite/tests/driver/T20604/all.T
@@ -9,5 +9,6 @@ def normalise_paths(s):
return '\n'.join(res)
-test('T20604', [extra_files(['A.hs', 'A1.hs'])
+test('T20604', [ req_th
+ , extra_files(['A.hs', 'A1.hs'])
, normalise_fun(normalise_paths)], makefile_test, [])
diff --git a/testsuite/tests/driver/T7835/all.T b/testsuite/tests/driver/T7835/all.T
index aa5ba23a94..69bb1e81bf 100644
--- a/testsuite/tests/driver/T7835/all.T
+++ b/testsuite/tests/driver/T7835/all.T
@@ -1,2 +1,2 @@
-test('T7835', [extra_files(['Test.hs', 'TestPrim.hs', 'test-prims.cmm'])], makefile_test, [])
+test('T7835', [cmm_src,extra_files(['Test.hs', 'TestPrim.hs', 'test-prims.cmm'])], makefile_test, [])
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index 3d1b417c91..489e5c06a3 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -267,7 +267,7 @@ test('json', normal, compile_fail, ['-ddump-json'])
# won't tell. It looks unrelated and is annoying to debug. Hence we disable the
# warning to prevent spurious errors.
test('json2', normalise_version('base','ghc-prim'), compile, ['-ddump-types -ddump-json -Wno-unsupported-llvm-version'])
-test('T16167', exit_code(1), run_command,
+test('T16167', [req_interp,exit_code(1)], run_command,
['{compiler} -x hs -e ":set prog T16167.hs" -ddump-json T16167.hs'])
test('T13604', [], makefile_test, [])
test('T13604a', [], makefile_test, [])
@@ -291,10 +291,10 @@ test('T17786', unless(opsys('mingw32'), skip), makefile_test, [])
test('T18369', normal, compile, ['-O'])
test('T21682', normal, compile_fail, ['-Werror=unrecognised-warning-flags -Wfoo'])
test('FullGHCVersion', normal, compile_and_run, ['-package ghc-boot'])
-test('OneShotTH', normal, makefile_test, [])
+test('OneShotTH', req_th, makefile_test, [])
test('T17481', normal, makefile_test, [])
test('T20084', normal, makefile_test, [])
-test('RunMode', extra_files(['RunMode/Test.hs']), run_command, ['{compiler} --run -iRunMode/ -ignore-dot-ghci RunMode.hs -- hello'])
+test('RunMode', [req_interp,extra_files(['RunMode/Test.hs'])], run_command, ['{compiler} --run -iRunMode/ -ignore-dot-ghci RunMode.hs -- hello'])
test('T20439', normal, run_command,
['echo "module Foo where" >> Foo.hs && \
{compiler} -E -fno-code -XCPP -v Foo.hs 2>&1 | grep "Copying" | sed "s/.*to//" '])
diff --git a/testsuite/tests/driver/fat-iface/all.T b/testsuite/tests/driver/fat-iface/all.T
index 61cd6364bd..e71b0f56bc 100644
--- a/testsuite/tests/driver/fat-iface/all.T
+++ b/testsuite/tests/driver/fat-iface/all.T
@@ -3,17 +3,17 @@ test('fat005', [extra_files(['Fat.hs']), filter_stdout_lines(r'= Proto-BCOs')],
test('fat006', [extra_files(['Fat.hs'])], makefile_test, ['fat006'])
test('fat006a', [extra_files(['Fat.hs'])], makefile_test, ['fat006a'])
test('fat007', [extra_files(['Fat.hs'])], makefile_test, ['fat007'])
-test('fat008', [unless(ghc_dynamic(), skip), extra_files(['FatTH.hs', 'FatQuote.hs']), copy_files], makefile_test, ['fat008'])
-test('fat009', [extra_files(['FatTH.hs', 'FatQuote.hs']), copy_files], makefile_test, ['fat009'])
-test('fat010', [extra_files(['THA.hs', 'THB.hs', 'THC.hs']), copy_files], makefile_test, ['fat010'])
+test('fat008', [req_th, unless(ghc_dynamic(), skip), extra_files(['FatTH.hs', 'FatQuote.hs']), copy_files], makefile_test, ['fat008'])
+test('fat009', [req_th, extra_files(['FatTH.hs', 'FatQuote.hs']), copy_files], makefile_test, ['fat009'])
+test('fat010', [req_th,extra_files(['THA.hs', 'THB.hs', 'THC.hs']), copy_files], makefile_test, ['fat010'])
# Check linking works when using -fbyte-code-and-object-code
-test('fat011', [extra_files(['FatMain.hs', 'FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatMain', '-fbyte-code-and-object-code -fprefer-byte-code'])
+test('fat011', [req_th, extra_files(['FatMain.hs', 'FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatMain', '-fbyte-code-and-object-code -fprefer-byte-code'])
# Check that we use interpreter rather than enable dynamic-too if needed for TH
-test('fat012', [unless(ghc_dynamic(), skip), extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fprefer-byte-code'])
+test('fat012', [req_th, unless(ghc_dynamic(), skip), extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fprefer-byte-code'])
# Check that no objects are generated if using -fno-code and -fprefer-byte-code
-test('fat013', [extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fno-code -fprefer-byte-code'])
+test('fat013', [req_th, extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fno-code -fprefer-byte-code'])
# When using interpreter should not produce objects
-test('fat014', [extra_files(['FatTH.hs', 'FatQuote.hs']), extra_run_opts('-fno-code')], ghci_script, ['fat014.script'])
-test('fat015', [unless(ghc_dynamic(), skip), extra_files(['FatQuote.hs', 'FatQuote1.hs', 'FatQuote2.hs', 'FatTH1.hs', 'FatTH2.hs', 'FatTHTop.hs'])], multimod_compile, ['FatTHTop', '-fno-code -fwrite-interface'])
+test('fat014', [req_th, extra_files(['FatTH.hs', 'FatQuote.hs']), extra_run_opts('-fno-code')], ghci_script, ['fat014.script'])
+test('fat015', [req_th, unless(ghc_dynamic(), skip), extra_files(['FatQuote.hs', 'FatQuote1.hs', 'FatQuote2.hs', 'FatTH1.hs', 'FatTH2.hs', 'FatTHTop.hs'])], multimod_compile, ['FatTHTop', '-fno-code -fwrite-interface'])
diff --git a/testsuite/tests/driver/multipleHomeUnits/all.T b/testsuite/tests/driver/multipleHomeUnits/all.T
index 53090f2e68..9e454029d2 100644
--- a/testsuite/tests/driver/multipleHomeUnits/all.T
+++ b/testsuite/tests/driver/multipleHomeUnits/all.T
@@ -2,7 +2,7 @@ test('multipleHomeUnits_single1', [extra_files([ 'a/', 'unitA'])], multiunit_com
test('multipleHomeUnits_single2', [extra_files([ 'b/', 'unitB'])], multiunit_compile, [['unitB'], '-fhide-source-paths'])
test('multipleHomeUnits_single3', [extra_files([ 'c/', 'unitC'])], multiunit_compile, [['unitC'], '-fhide-source-paths'])
test('multipleHomeUnits_single4', [extra_files([ 'd/', 'unitD'])], multiunit_compile, [['unitD'], '-fhide-source-paths'])
-test('multipleHomeUnits_single5', [extra_files([ 'th/', 'unitTH'])], multiunit_compile, [['unitTH'], '-fhide-source-paths'])
+test('multipleHomeUnits_single5', [req_th,extra_files([ 'th/', 'unitTH'])], multiunit_compile, [['unitTH'], '-fhide-source-paths'])
test('multipleHomeUnits_cpp', [extra_files([ 'cpp-includes/', 'unitCPPIncludes'])], multiunit_compile, [['unitCPPIncludes'], '-fhide-source-paths'])
test('multipleHomeUnits_cfile', [extra_files([ 'c-file/', 'unitCFile'])], multiunit_compile, [['unitCFile'], '-fhide-source-paths'])
test('multipleHomeUnits_callstack', [extra_files([ 'callstack/', 'unitCallstack'])], makefile_test, [])
diff --git a/testsuite/tests/driver/multipleHomeUnits/o-dir/all.T b/testsuite/tests/driver/multipleHomeUnits/o-dir/all.T
index 9e3d92dedc..c95bebdda7 100644
--- a/testsuite/tests/driver/multipleHomeUnits/o-dir/all.T
+++ b/testsuite/tests/driver/multipleHomeUnits/o-dir/all.T
@@ -1,6 +1,7 @@
# This test checks that getRootSummary doesn't cross package boundaries.
test('multipleHomeUnits_odir'
- , [extra_files([ 'p1/', 'unitP1'])
+ , [ extra_files([ 'p1/', 'unitP1'])
+ , req_c
]
, makefile_test
, ['mhu-odir'])
diff --git a/testsuite/tests/driver/multipleHomeUnits/th-deps/all.T b/testsuite/tests/driver/multipleHomeUnits/th-deps/all.T
index 4e89f8b296..f9285645df 100644
--- a/testsuite/tests/driver/multipleHomeUnits/th-deps/all.T
+++ b/testsuite/tests/driver/multipleHomeUnits/th-deps/all.T
@@ -1 +1 @@
-test('multipleHomeUnits_th-deps', [extra_files([ 'p1/', 'p2', 'q', 'unitP1', 'unitP2', 'unitQ'])], multiunit_compile, [['unitP1', 'unitP2', 'unitQ'], '-fhide-source-paths'])
+test('multipleHomeUnits_th-deps', [req_th,extra_files([ 'p1/', 'p2', 'q', 'unitP1', 'unitP2', 'unitQ'])], multiunit_compile, [['unitP1', 'unitP2', 'unitQ'], '-fhide-source-paths'])
diff --git a/testsuite/tests/driver/recompTH/all.T b/testsuite/tests/driver/recompTH/all.T
index be28961173..8d75ed0308 100644
--- a/testsuite/tests/driver/recompTH/all.T
+++ b/testsuite/tests/driver/recompTH/all.T
@@ -1,4 +1,4 @@
-test('recompTH', [extra_files(['A.hs', 'B1.hs', 'B2.hs' ]),
+test('recompTH', [req_th, extra_files(['A.hs', 'B1.hs', 'B2.hs' ]),
when(fast(), skip)
, normalise_slashes],
makefile_test, [])
diff --git a/testsuite/tests/driver/th-new-test/all.T b/testsuite/tests/driver/th-new-test/all.T
index 8a98d69919..54dd7852be 100644
--- a/testsuite/tests/driver/th-new-test/all.T
+++ b/testsuite/tests/driver/th-new-test/all.T
@@ -1,4 +1,4 @@
-test('th-new-test', [extra_files(['A.hs', 'B.hs', 'C.hs', 'D.hs', 'B1.hs', 'D1.hs', 'Main.hs']),
+test('th-new-test', [req_th, extra_files(['A.hs', 'B.hs', 'C.hs', 'D.hs', 'B1.hs', 'D1.hs', 'Main.hs']),
when(fast(), skip)
, normalise_slashes],
makefile_test, [])
diff --git a/testsuite/tests/ffi/should_compile/all.T b/testsuite/tests/ffi/should_compile/all.T
index cf7f9502e9..d8afeb9f7b 100644
--- a/testsuite/tests/ffi/should_compile/all.T
+++ b/testsuite/tests/ffi/should_compile/all.T
@@ -35,8 +35,7 @@ test('T11983', [omit_ways(['ghci'])], compile, ['T11983.c'])
test('T14125', normal, compile, [''])
test(
'cc017',
- # We need TH but can't load profiled dynamic objects
- when(ghc_dynamic(), omit_ways(['profasm'])),
+ req_th,
compile,
[
'-optc=-DC -optcxx=-DCXX -optcxx=-std=c++11'
diff --git a/testsuite/tests/ffi/should_fail/all.T b/testsuite/tests/ffi/should_fail/all.T
index 9080282782..648af796c2 100644
--- a/testsuite/tests/ffi/should_fail/all.T
+++ b/testsuite/tests/ffi/should_fail/all.T
@@ -9,7 +9,7 @@ test('T3066', normal, compile_fail, [''])
test('ccfail004', [extra_files(['Ccfail004A.hs'])], multimod_compile_fail, ['ccfail004', '-v0'])
test('ccfail005', normal, compile_fail, [''])
test('ccall_value', normal, compile_fail, [''])
-test('capi_value_function', normal, compile_fail, [''])
+test('capi_value_function', req_c, compile_fail, [''])
test('NonreducingFfiSignature', normal, compile_fail, [''])
test('T5664', normal, compile_fail, ['-v0'])
test('T7506', normal, compile_fail, [''])
@@ -23,7 +23,7 @@ test('T21305_fail', normal, compile_fail, [''])
# from an unsafe foreign function) and only makes sense in non-threaded way
# (threaded runtime will hang). See #14912.
test('UnsafeReenter',
- [omit_ways(threaded_ways), exit_code(1)],
+ [omit_ways(threaded_ways), exit_code(1), req_c],
compile_and_run,
['UnsafeReenterC.c'])
diff --git a/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T
index 79783c4776..da98a5ff6b 100644
--- a/testsuite/tests/ffi/should_run/all.T
+++ b/testsuite/tests/ffi/should_run/all.T
@@ -30,7 +30,8 @@ test('ffi004', skip, compile_and_run, [''])
test('ffi005', [ omit_ways(prof_ways + ['ghci']),
when(arch('i386'), skip),
when(platform('i386-apple-darwin'), expect_broken(4105)),
- exit_code(3) ],
+ exit_code(3),
+ req_c ],
compile_and_run, ['ffi005_c.c'])
test('ffi006', normal, compile_and_run, [''])
@@ -72,14 +73,14 @@ test('ffi014', [only_ways(['threaded1', 'threaded2'])], compile_and_run,
['ffi014_cbits.c'])
# GHCi can't handle the separate C file (ToDo: fix this somehow)
-test('ffi015', [omit_ways(['ghci'])], compile_and_run, ['ffi015_cbits.c'])
+test('ffi015', [req_c,omit_ways(['ghci'])], compile_and_run, ['ffi015_cbits.c'])
# GHCi can't handle foreign import "&"
test('ffi016', omit_ways(['ghci']), compile_and_run, [''])
test('ffi017', normal, compile_and_run, [''])
-test('ffi018', [omit_ways(['ghci'])], compile_and_run, ['ffi018_c.c'])
+test('ffi018', [req_c,omit_ways(['ghci'])], compile_and_run, ['ffi018_c.c'])
test('ffi018_ghci',
[extra_files(['ffi018.h']),
@@ -93,14 +94,14 @@ test('ffi019', normal, compile_and_run, [''])
# This one originally failed only GHCi, but doesn't hurt to test all ways.
test('T1679', normal, compile_and_run, [''])
-test('T1288', [omit_ways(['ghci'])], compile_and_run, ['T1288_c.c'])
+test('T1288', [omit_ways(['ghci']), req_c], compile_and_run, ['T1288_c.c'])
test('T1288_ghci',
[only_ways(['ghci']),
when(unregisterised(), fragile(16085)),
pre_cmd('$MAKE -s --no-print-directory T1288_ghci_setup')],
compile_and_run, ['T1288_ghci_c.o'])
-test('T2276', [omit_ways(['ghci'])], compile_and_run, ['T2276_c.c'])
+test('T2276', [omit_ways(['ghci']), req_c], compile_and_run, ['T2276_c.c'])
test('T2276_ghci', [ only_ways(['ghci']),
when(opsys('darwin'), skip), # stdcall not supported on OS X
pre_cmd('$MAKE -s --no-print-directory T2276_ghci_setup') ],
@@ -108,12 +109,12 @@ test('T2276_ghci', [ only_ways(['ghci']),
test('T2469', normal, compile_and_run, ['-optc-std=gnu99'])
-test('T2594', [omit_ways(['ghci'])], compile_and_run, ['T2594_c.c'])
+test('T2594', [omit_ways(['ghci']), req_c], compile_and_run, ['T2594_c.c'])
-test('fptr01', [omit_ways(['ghci'])], compile_and_run, ['fptr01_c.c'])
+test('fptr01', [omit_ways(['ghci']), req_c], compile_and_run, ['fptr01_c.c'])
test('fptr02', normal, compile_and_run, [''])
-test('fptrfail01', [omit_ways(['ghci']), exit_code(1)], compile_and_run,
+test('fptrfail01', [omit_ways(['ghci']), exit_code(1), req_c], compile_and_run,
['fptrfail01_c.c'])
test('T2917a', normal, compile_and_run, [''])
@@ -135,7 +136,7 @@ else:
flagsForT4038 = ['']
test('T4038', normal, compile_and_run, flagsForT4038)
-test('T4221', [omit_ways(['ghci'])], compile_and_run, ['T4221_c.c'])
+test('T4221', [omit_ways(['ghci']),req_c], compile_and_run, ['T4221_c.c'])
test('T5402', [ omit_ways(['ghci']),
exit_code(42),
@@ -158,10 +159,10 @@ test('Capi_Ctype_001', [extra_files(['Capi_Ctype_A_001.hsc', 'capi_ctype_001.h',
test('Capi_Ctype_002', [extra_files(['Capi_Ctype_A_002.hsc', 'capi_ctype_002_A.h', 'capi_ctype_002_B.h'])],
makefile_test, ['Capi_Ctype_002'])
-test('ffi_parsing_001', [omit_ways(['ghci'])], compile_and_run,
+test('ffi_parsing_001', [omit_ways(['ghci']), req_c], compile_and_run,
['ffi_parsing_001_c.c'])
-test('capi_value', [omit_ways(['ghci'])], compile_and_run, ['capi_value_c.c'])
+test('capi_value', [omit_ways(['ghci']), req_c], compile_and_run, ['capi_value_c.c'])
test('T7170',
[when(opsys('mingw32'), fragile(16801)),
@@ -171,7 +172,7 @@ test('T7170',
test('T4012', [expect_broken_for(7388, ['ghci'])], multimod_compile_and_run,
['T4012', ''])
-test('T8083', [omit_ways(['ghci'])], compile_and_run, ['T8083_c.c'])
+test('T8083', [omit_ways(['ghci']), req_c], compile_and_run, ['T8083_c.c'])
test('T9274', [omit_ways(['ghci'])], compile_and_run, [''])
@@ -183,45 +184,46 @@ test('ffi023', [ omit_ways(['ghci']),
# needs it.
compile_and_run, ['ffi023_c.c'])
-test('T12134', [omit_ways(['ghci'])], compile_and_run, ['T12134_c.c'])
+test('T12134', [omit_ways(['ghci']), req_c], compile_and_run, ['T12134_c.c'])
-test('T12614', [omit_ways(['ghci'])], compile_and_run, ['T12614_c.c'])
+test('T12614', [omit_ways(['ghci']), req_c], compile_and_run, ['T12614_c.c'])
-test('T14624', [omit_ways(['ghci'])], compile_and_run, ['T14624_c.c'])
+test('T14624', [omit_ways(['ghci']), req_c], compile_and_run, ['T14624_c.c'])
-test('T15933', extra_files(['T15933_c.c', 'T15933.h']), makefile_test, ['T15933'])
+test('T15933', [extra_files(['T15933_c.c', 'T15933.h']), req_c], makefile_test, ['T15933'])
-test('T16650a', [omit_ways(['ghci'])], compile_and_run, ['T16650a_c.c'])
+test('T16650a', [omit_ways(['ghci']), req_c], compile_and_run, ['T16650a_c.c'])
-test('T16650b', [omit_ways(['ghci'])], compile_and_run, ['T16650b_c.c'])
+test('T16650b', [omit_ways(['ghci']), req_c], compile_and_run, ['T16650b_c.c'])
-test('T16650c', [omit_ways(['ghci'])], compile_and_run, ['T16650c_c.c'])
+test('T16650c', [omit_ways(['ghci']), req_c], compile_and_run, ['T16650c_c.c'])
-test('T16650d', [omit_ways(['ghci'])], compile_and_run, ['T16650d_c.c'])
+test('T16650d', [omit_ways(['ghci']), req_c], compile_and_run, ['T16650d_c.c'])
-test('PrimFFIInt8', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIInt8_c.c'])
+test('PrimFFIInt8', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIInt8_c.c'])
-test('PrimFFIWord8', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIWord8_c.c'])
+test('PrimFFIWord8', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIWord8_c.c'])
-test('PrimFFIInt16', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIInt16_c.c'])
+test('PrimFFIInt16', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIInt16_c.c'])
-test('PrimFFIWord16', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIWord16_c.c'])
+test('PrimFFIWord16', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIWord16_c.c'])
-test('PrimFFIInt32', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIInt32_c.c'])
+test('PrimFFIInt32', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIInt32_c.c'])
-test('PrimFFIWord32', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIWord32_c.c'])
+test('PrimFFIWord32', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIWord32_c.c'])
-test('T493', [omit_ways(['ghci'])], compile_and_run, ['T493_c.c'])
+test('T493', [omit_ways(['ghci']), req_c], compile_and_run, ['T493_c.c'])
-test('UnliftedNewtypesByteArrayOffset', [omit_ways(['ghci'])], compile_and_run, ['UnliftedNewtypesByteArrayOffset_c.c'])
+test('UnliftedNewtypesByteArrayOffset', [omit_ways(['ghci']), req_c], compile_and_run, ['UnliftedNewtypesByteArrayOffset_c.c'])
-test('T17471', [omit_ways(['ghci'])], compile_and_run,
+test('T17471', [omit_ways(['ghci']), req_c], compile_and_run,
['T17471_c.c -optc-D -optcFOO'])
test('IncallAffinity',
[req_smp, only_ways(['threaded1', 'threaded2']),
# Unregisterised build doesn't support
- when(unregisterised(), skip)],
+ when(unregisterised(), skip),
+ req_c],
compile_and_run,
['IncallAffinity_c.c -no-hs-main'])
diff --git a/testsuite/tests/generics/all.T b/testsuite/tests/generics/all.T
index a43f585020..1f785211e0 100644
--- a/testsuite/tests/generics/all.T
+++ b/testsuite/tests/generics/all.T
@@ -20,9 +20,10 @@ test('GenCannotDoRep1_8', normal, compile_fail, [''])
test('GFullyStrict', normal, compile_and_run, [''])
test('T5462Yes1', [extra_files(['GEnum/', 'GEq/', 'GFunctor/']),
- outputdir('out_T5462Yes1')]
+ outputdir('out_T5462Yes1'),
+ req_c]
, multimod_compile_and_run, ['T5462Yes1', '-iGEq -iGEnum -iGFunctor'])
-test('T5462Yes2', [extra_files(['GFunctor/']), outputdir('out_T5462Yes2')]
+test('T5462Yes2', [extra_files(['GFunctor/']), outputdir('out_T5462Yes2'), req_c]
, multimod_compile_and_run, ['T5462Yes2', '-iGFunctor'])
test('T5462No1', [extra_files(['GFunctor/']), outputdir('out_T5462No1')]
, multimod_compile_fail, ['T5462No1', '-iGFunctor'])
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index 5a8d0cd88d..c056a1e056 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -111,7 +111,7 @@ test('T21092', normal, compile_fail, [''])
test('T9167', normal, compile_fail, [''])
test('T9171', normal, compile_fail, [''])
test('T9097', normal, compile_fail, [''])
-test('T9160', normal, compile_fail, [''])
+test('T9160', req_th, compile_fail, [''])
test('T9357', normal, compile_fail, [''])
test('T9371', normal, compile_fail, [''])
test('T9433', normal, compile_fail, [''])
diff --git a/testsuite/tests/linear/should_compile/all.T b/testsuite/tests/linear/should_compile/all.T
index 111ba6751a..3b73636071 100644
--- a/testsuite/tests/linear/should_compile/all.T
+++ b/testsuite/tests/linear/should_compile/all.T
@@ -33,7 +33,7 @@ test('LinearLetRec', expect_broken(18694), compile, ['-O -dlinear-core-lint'])
test('LinearTH1', normal, compile, [''])
test('LinearTH2', normal, compile, [''])
test('LinearTH3', normal, compile, [''])
-test('LinearTH4', normal, compile, [''])
+test('LinearTH4', req_th, compile, [''])
test('LinearHole', normal, compile, [''])
test('LinearDataConSections', normal, compile, [''])
test('T18731', normal, compile, [''])
diff --git a/testsuite/tests/overloadedrecflds/should_compile/all.T b/testsuite/tests/overloadedrecflds/should_compile/all.T
index fc56b23fab..9d49752f2b 100644
--- a/testsuite/tests/overloadedrecflds/should_compile/all.T
+++ b/testsuite/tests/overloadedrecflds/should_compile/all.T
@@ -3,7 +3,7 @@ test('T12609', normal, compile, [''])
test('T16597', [], multimod_compile, ['T16597', '-v0'])
test('T17176', normal, compile, [''])
test('DRFPatSynExport', [], makefile_test, ['DRFPatSynExport'])
-test('NoFieldSelectors', normal, compile, [''])
+test('NoFieldSelectors', req_interp, compile, [''])
test('NFSDRF', normal, compile, [''])
test('NFSImport', [extra_files(['NFSExport.hs'])], multimod_compile, ['NFSImport NFSExport', '-v0'])
test('T18999_NoFieldSelectors', normal, compile, [''])
diff --git a/testsuite/tests/overloadedrecflds/should_fail/all.T b/testsuite/tests/overloadedrecflds/should_fail/all.T
index 5e8d0614a0..28ec4f7b7e 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/all.T
+++ b/testsuite/tests/overloadedrecflds/should_fail/all.T
@@ -20,7 +20,7 @@ test('overloadedrecfldsfail14', normal, compile_fail, [''])
test('overloadedlabelsfail01', normal, compile_fail, [''])
test('overloadedlabelsfail02', normal, compile_fail, [''])
test('overloadedlabelsfail03', normal, compile_fail, [''])
-test('T11103', normal, compile_fail, [''])
+test('T11103', req_th, compile_fail, [''])
test('T11167_ambiguous_fixity', [], multimod_compile_fail,
['T11167_ambiguous_fixity', ''])
test('T13132_duplicaterecflds', normal, compile_fail, [''])
diff --git a/testsuite/tests/overloadedrecflds/should_run/all.T b/testsuite/tests/overloadedrecflds/should_run/all.T
index 716a616dec..ce4bbfd728 100644
--- a/testsuite/tests/overloadedrecflds/should_run/all.T
+++ b/testsuite/tests/overloadedrecflds/should_run/all.T
@@ -3,14 +3,14 @@ test('overloadedrecfldsrun01', [], multimod_compile_and_run,
test('overloadedrecfldsrun02', [extra_files(['OverloadedRecFldsRun02_A.hs'])], multimod_compile_and_run,
['overloadedrecfldsrun02', ''])
test('overloadedrecfldsrun03', normal, compile_and_run, [''])
-test('overloadedrecfldsrun04', omit_ways(prof_ways), compile_and_run, [''])
+test('overloadedrecfldsrun04', [req_th,omit_ways(prof_ways)], compile_and_run, [''])
test('overloadedrecfldsrun05', normal, compile_and_run, [''])
test('overloadedrecfldsrun07', normal, compile_and_run, [''])
test('overloadedrecflds_generics', normal, compile_and_run, [''])
test('overloadedlabelsrun01', normal, compile_and_run, [''])
test('overloadedlabelsrun02', normal, compile_and_run, [''])
test('overloadedlabelsrun03', normal, compile_and_run, [''])
-test('overloadedlabelsrun04', [extra_files(['OverloadedLabelsRun04_A.hs']),
+test('overloadedlabelsrun04', [req_th, extra_files(['OverloadedLabelsRun04_A.hs']),
omit_ways(prof_ways)], multimod_compile_and_run,
['overloadedlabelsrun04', config.ghc_th_way_flags])
test('hasfieldrun01', normal, compile_and_run, [''])
diff --git a/testsuite/tests/package/T20010/all.T b/testsuite/tests/package/T20010/all.T
index 4bfaecfcc2..4197e44644 100644
--- a/testsuite/tests/package/T20010/all.T
+++ b/testsuite/tests/package/T20010/all.T
@@ -1,4 +1,4 @@
# Test that GHC links to the C++ standard library as expected
# when the system-cxx-std-lib package is used.
-test('T20010', normal, makefile_test, [])
-test('T20010-ghci', extra_files(['T20010_c.cpp', 'T20010.hs']), makefile_test, [])
+test('T20010', req_c, makefile_test, [])
+test('T20010-ghci', [req_c, extra_files(['T20010_c.cpp', 'T20010.hs'])], makefile_test, [])
diff --git a/testsuite/tests/parser/should_compile/all.T b/testsuite/tests/parser/should_compile/all.T
index 5fc2a72566..f2ccfcd438 100644
--- a/testsuite/tests/parser/should_compile/all.T
+++ b/testsuite/tests/parser/should_compile/all.T
@@ -165,7 +165,8 @@ test('NegativeLiteralsNoExt', normal, compile, [''])
# (2) Build the program twice: once with -dynamic, and then
# with -prof using -osuf to set a different object file suffix.
test('proposal-229f',
- [ extra_files(['proposal-229f.hs', 'Proposal229f_instances.hs']),
+ [ req_th,
+ extra_files(['proposal-229f.hs', 'Proposal229f_instances.hs']),
omit_ways(['profasm', 'profthreaded'])
],
multimod_compile_and_run, ['proposal-229f.hs', ''])
diff --git a/testsuite/tests/parser/unicode/all.T b/testsuite/tests/parser/unicode/all.T
index c854ea41c4..100ce14069 100644
--- a/testsuite/tests/parser/unicode/all.T
+++ b/testsuite/tests/parser/unicode/all.T
@@ -28,7 +28,7 @@ test('T10907', normal, compile, [''])
test('T7650', normal, compile, [''])
test('brackets', normal, compile, [''])
-test('T18225A', normal, compile, [''])
+test('T18225A', req_th, compile, [''])
test('T18225B', normal, compile_fail, [''])
test('T18158', normal, compile, [''])
diff --git a/testsuite/tests/patsyn/should_run/all.T b/testsuite/tests/patsyn/should_run/all.T
index d490157e4a..674324b9d0 100644
--- a/testsuite/tests/patsyn/should_run/all.T
+++ b/testsuite/tests/patsyn/should_run/all.T
@@ -14,16 +14,7 @@ test('records-run', normal, compile_and_run, [''])
test('ghci', just_ghci, ghci_script, ['ghci.script'])
test('T11985', just_ghci, ghci_script, ['T11985.script'])
test('T11224', normal, compile_and_run, ['-Wincomplete-patterns -Woverlapping-patterns'])
-# we omit profasm/profthreaded because it doesn't bring much to the table but
-# introduces its share of complexity, as the test as it is fails with
-# profasm:
-# T13688.hs:6:13: fatal:
-# Cannot load -prof objects when GHC is built with -dynamic
-# To fix this, either:
-# (1) Use -fexternal-interpreter, or
-# (2) Build the program twice: once with -dynamic, and then
-# with -prof using -osuf to set a different object file suffix.
-test('T13688', omit_ways(['profasm', 'profthreaded']), multimod_compile_and_run, ['T13688', '-v0'])
+test('T13688', req_th, multimod_compile_and_run, ['T13688', '-v0'])
# Requires UnboxedSums, which GHCi does not support.
test('T14228', omit_ways(['ghci']), compile_and_run, [''])
test('records-poly-update', normal, compile_and_run, [''])
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index e649651460..fbe65d4b1c 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -55,7 +55,7 @@ test('T6129', normal, compile_fail,[''])
test('T7053', normal, compile,[''])
test('T7053a', normal, compile,[''])
test('T7020', normal, compile,[''])
-test('T7022', normal, makefile_test, [])
+test('T7022', req_th, makefile_test, [])
test('T7073', normal, compile,[''])
test('T7128', normal, compile,[''])
test('T7151', normal, compile_fail,[''])
diff --git a/testsuite/tests/qualifieddo/should_run/all.T b/testsuite/tests/qualifieddo/should_run/all.T
index 17cf2f0d7b..39767fb5d1 100644
--- a/testsuite/tests/qualifieddo/should_run/all.T
+++ b/testsuite/tests/qualifieddo/should_run/all.T
@@ -7,5 +7,5 @@ test('qdorun002', [qextra_files], multimod_compile_and_run, ['qdorun002', ''])
test('qdorun003', [qextra_files], multimod_compile_and_run, ['qdorun003', ''])
test('qdorun004', normal, compile_and_run, [''])
test('qdorun005', [qextra_files], multimod_compile_and_run, ['qdorun005', ''])
-test('qdorun006', [qextra_files], multimod_compile_and_run, ['qdorun006', ''])
+test('qdorun006', [req_th,qextra_files], multimod_compile_and_run, ['qdorun006', ''])
test('qdorun007', [qextra_files], multimod_compile_and_run, ['qdorun007', ''])
diff --git a/testsuite/tests/quotes/TH_spliceViewPat/test.T b/testsuite/tests/quotes/TH_spliceViewPat/test.T
index c7e1ccaef4..7549ca0c8c 100644
--- a/testsuite/tests/quotes/TH_spliceViewPat/test.T
+++ b/testsuite/tests/quotes/TH_spliceViewPat/test.T
@@ -3,6 +3,7 @@ def f(name, opts):
setTestOpts(f)
-test('TH_spliceViewPat', [extra_files(['A.hs', 'Main.hs']),
- omit_ways(prof_ways)], multimod_compile_and_run,
+test('TH_spliceViewPat', [ req_th
+ , extra_files(['A.hs', 'Main.hs'])
+ ], multimod_compile_and_run,
['Main', config.ghc_th_way_flags])
diff --git a/testsuite/tests/quotes/all.T b/testsuite/tests/quotes/all.T
index 4a39f454b3..ba580ccaf4 100644
--- a/testsuite/tests/quotes/all.T
+++ b/testsuite/tests/quotes/all.T
@@ -18,7 +18,7 @@ test('T10384', normal, compile_fail, [''])
test('T16384', req_th, compile, [''])
test('T17857', normal, compile, [''])
test('T18103', normal, compile, [''])
-test('T18263', normal, compile, [''])
+test('T18263', req_th, compile, [''])
test('T18521', normal, compile, [''])
test('TH_tf2', normal, compile, ['-v0'])
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 9e7d49fa51..9ad3dd0baf 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -189,4 +189,4 @@ test('unused_haddock', normal, compile, ['-haddock -Wall'])
test('T19984', normal, compile, ['-fwarn-unticked-promoted-constructors'])
test('T21654', normal, compile, ['-Wunused-top-binds'])
test('T22057', normal, compile, ['-Wall'])
-test('T22067', normal, compile, ['-Wall'])
+test('T22067', req_th, compile, ['-Wall'])
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index 5e62e28847..a096e07634 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -43,7 +43,7 @@ test('rnfail040', [extra_files(['Rnfail040_A.hs']), normalise_version('base')],
test('rnfail041', normal, compile_fail, [''])
test('rnfail042', normal, compile_fail, [''])
-test('rnfail043', unless(doing_ghci, skip), compile_fail, ['-v0'])
+test('rnfail043', [req_th,unless(doing_ghci, skip)], compile_fail, ['-v0'])
test('rnfail044', normal, compile_fail, [''])
test('rnfail045', normal, compile_fail, [''])
test('rnfail046', normal, compile_fail, [''])
@@ -176,4 +176,4 @@ test('T19843l', normal, compile_fail, [''])
test('T19843m', normal, compile_fail, [''])
test('T11167_ambig', normal, compile_fail, [''])
test('T18138', normal, compile_fail, [''])
-test('T20147', normal, compile_fail, ['']) \ No newline at end of file
+test('T20147', normal, compile_fail, [''])
diff --git a/testsuite/tests/rep-poly/all.T b/testsuite/tests/rep-poly/all.T
index 39c9bed7ae..9d6adb937d 100644
--- a/testsuite/tests/rep-poly/all.T
+++ b/testsuite/tests/rep-poly/all.T
@@ -10,7 +10,7 @@ test('T14561b', normal, compile_fail, [''])
test('T14765', normal, compile_fail, [''])
test('T17360', normal, compile_fail, [''])
test('T17817', normal, compile_fail, [''])
-test('T18170a', [extra_files(['T18170c.hs'])], multimod_compile, ['T18170a.hs', '-v0'])
+test('T18170a', [req_th,extra_files(['T18170c.hs'])], multimod_compile, ['T18170a.hs', '-v0'])
test('T18170b', [extra_files(['T18170c.hs']), expect_broken(19893)], multimod_compile_fail, ['T18170b.hs', '-v0'])
# T18170b isn't actually broken, but it causes a Core Lint error
# even though the program is (correctly) rejected by the typechecker
diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T
index 71d16bf748..4f57c51f57 100644
--- a/testsuite/tests/rts/all.T
+++ b/testsuite/tests/rts/all.T
@@ -196,7 +196,7 @@ test('EventlogOutput_IPE',
def noCapabilityOutputFilter(s):
return re.sub(r'[a-f0-9]+: IPE:', 'IPE:', s)
-test('T4059', [], makefile_test, ['T4059'])
+test('T4059', req_c, makefile_test, ['T4059'])
# Test for #4274
test('exec_signals',
@@ -222,7 +222,7 @@ test('T5250', [extra_files(['spalign.c']),
omit_ways(['ghci']) ],
compile_and_run, ['spalign.c'])
-test('T5423', [], makefile_test, ['T5423'])
+test('T5423', cmm_src, makefile_test, ['T5423'])
test('T5993', extra_run_opts('+RTS -k8 -RTS'), compile_and_run, [''])
@@ -270,7 +270,8 @@ test('ffishutdown', [ignore_stderr, only_ways(['threaded1','threaded2'])],
# Times out in ghci way.
# Also times out on x86_64-linux from time to time.
test('T7919', [ when(fast(), skip)
- , omit_ways(['ghci'] + prof_ways)
+ , omit_ways(['ghci'])
+ , req_th
, when(platform('x86_64-unknown-linux'), fragile(22283))
]
, compile_and_run, [config.ghc_th_way_flags])
@@ -362,8 +363,9 @@ test('T10728', [extra_run_opts('+RTS -maxN3 -RTS'), only_ways(['threaded2'])],
test('T9405', [when(opsys('mingw32'), expect_broken(21361))], makefile_test, ['T9405'])
-test('T11788', when(ghc_dynamic(), skip),
- makefile_test, ['T11788'])
+test('T11788', [ when(ghc_dynamic(), skip)
+ , req_interp
+ ], makefile_test, ['T11788'])
test('T10296a', [req_smp], makefile_test, ['T10296a'])
@@ -446,10 +448,10 @@ test('keep-cafs',
# Test proper functioning of C++ exceptions within a C++ program.
# On darwin, this requires -fcompact-unwind.
-test('T11829', [ check_errmsg("This is a test") ], compile_and_run,
+test('T11829', [ req_c, check_errmsg("This is a test") ], compile_and_run,
['T11829_c.cpp -package system-cxx-std-lib'])
-test('T16514', normal, compile_and_run, ['T16514_c.c'])
+test('T16514', req_c, compile_and_run, ['T16514_c.c'])
test('test-zeroongc', extra_run_opts('-DZ'), compile_and_run, ['-debug'])
test('T13676',
@@ -457,7 +459,10 @@ test('T13676',
extra_files(['T13676.hs'])],
ghci_script, ['T13676.script'])
test('InitEventLogging',
- [only_ways(['normal']), extra_run_opts('+RTS -RTS')],
+ [ only_ways(['normal'])
+ , extra_run_opts('+RTS -RTS')
+ , req_c
+ ],
compile_and_run, ['InitEventLogging_c.c'])
test('RestartEventLogging',
[only_ways(['threaded1','threaded2']), extra_run_opts('+RTS -la -RTS')],
@@ -485,11 +490,11 @@ test('T20199', [ grep_errmsg('Hello') ]
# We need to be precise about the used way here as different ways may lead to
# different closures (and their orders) on the stack (which is checked by this
# test).
-test('cloneMyStack', [only_ways(['normal']), extra_files(['cloneStackLib.c'])],
+test('cloneMyStack', [req_c,only_ways(['normal']), extra_files(['cloneStackLib.c'])],
compile_and_run, ['cloneStackLib.c'])
test('cloneMyStack2', ignore_stdout, compile_and_run, [''])
-test('cloneMyStack_retBigStackFrame', [extra_files(['cloneStackLib.c']), ignore_stdout], compile_and_run, ['cloneStackLib.c'])
-test('cloneThreadStack', [only_ways(['threaded1']), extra_ways(['threaded1']), extra_files(['cloneStackLib.c'])], compile_and_run, ['cloneStackLib.c -threaded'])
+test('cloneMyStack_retBigStackFrame', [req_c, extra_files(['cloneStackLib.c']), ignore_stdout], compile_and_run, ['cloneStackLib.c'])
+test('cloneThreadStack', [req_c, only_ways(['threaded1']), extra_ways(['threaded1']), extra_files(['cloneStackLib.c'])], compile_and_run, ['cloneStackLib.c -threaded'])
test('decodeMyStack', normal, compile_and_run, ['-finfo-table-map'])
# Options:
# - `-kc8K`: Set stack chunk size to it's minimum to provoke underflow stack frames.
diff --git a/testsuite/tests/saks/should_compile/all.T b/testsuite/tests/saks/should_compile/all.T
index d1fc603a73..78eb3e2331 100644
--- a/testsuite/tests/saks/should_compile/all.T
+++ b/testsuite/tests/saks/should_compile/all.T
@@ -37,12 +37,6 @@ test('T16731', normal, compile, [''])
test('T16721', normal, ghci_script, ['T16721.script'])
test('T16756a', normal, compile, [''])
-# We omit 'profasm' because it fails with:
-# Cannot load -prof objects when GHC is built with -dynamic
-# To fix this, either:
-# (1) Use -fexternal-interpreter, or
-# (2) Build the program twice: once with -dynamic, and then
-# with -prof using -osuf to set a different object file suffix.
-test('saks027', omit_ways(['profasm']), compile, ['-v0 -ddump-splices -dsuppress-uniques'])
-test('saks028', omit_ways(['profasm']), compile, [''])
-test('T17164', omit_ways(['profasm']), compile, ['-v0 -ddump-splices -dsuppress-uniques'])
+test('saks027', req_th, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
+test('saks028', req_th, compile, [''])
+test('T17164', req_th, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
diff --git a/testsuite/tests/showIface/should_fail/all.T b/testsuite/tests/showIface/should_fail/all.T
index 0dd8106b81..801da04c11 100644
--- a/testsuite/tests/showIface/should_fail/all.T
+++ b/testsuite/tests/showIface/should_fail/all.T
@@ -1,9 +1,9 @@
test('THPutDocExternal',
- normal,
+ req_th,
multimod_compile_fail,
['THPutDocExternal', '-no-hs-main -haddock -c -v0'])
test('THPutDocNonExistent',
- normal,
+ req_th,
multimod_compile_fail,
['THPutDocNonExistent', '-no-hs-main -haddock -c -v0'])
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index d4ad82e0d9..e0e9ab29f0 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -134,7 +134,7 @@ test('T5366',
normal,
makefile_test, ['T5366'])
test('T7796', [], makefile_test, ['T7796'])
-test('T5550', omit_ways(prof_ways), compile, [''])
+test('T5550', req_interp, compile, [''])
test('T7865', normal, makefile_test, ['T7865'])
# T7785: we want to check that we specialise 'shared'. But Tidy discards the
@@ -347,7 +347,7 @@ test('T18747B', normal, compile, [''])
test('T18815', only_ways(['optasm']), makefile_test, ['T18815'])
test('T18668', normal, compile, ['-dsuppress-uniques'])
test('T18995', [ grep_errmsg(r'print') ], compile, ['-O -ddump-simpl -dsuppress-uniques'])
-test('T19168', normal, compile, [''])
+test('T19168', req_interp, compile, [''])
test('T19246', only_ways(['optasm']), multimod_compile, ['T19246', '-v0 -ddump-rules'])
test('T19360', only_ways(['optasm']), compile, [''])
@@ -393,7 +393,7 @@ test('OpaqueNoCastWW', normal, compile, ['-O -ddump-simpl -dsuppress-uniques'])
test('OpaqueNoRebox', normal, compile, ['-O -ddump-simpl -dsuppress-uniques'])
test('OpaqueNoRebox2', normal, compile, ['-O -ddump-simpl -dsuppress-uniques'])
test('OpaqueNoRebox3', normal, compile, ['-O -ddump-simpl -dsuppress-uniques'])
-test('OpaqueNoSpecConstr', normal, compile, ['-O -ddump-simpl -dsuppress-uniques'])
+test('OpaqueNoSpecConstr', req_interp, compile, ['-O -ddump-simpl -dsuppress-uniques'])
test('OpaqueNoSpecialise', normal, compile, ['-O -ddump-simpl -dsuppress-uniques'])
test('OpaqueNoStrictArgWW', normal, compile, ['-O -fworker-wrapper-cbv -ddump-simpl -dsuppress-uniques'])
test('OpaqueNoWW', normal, compile, ['-O -ddump-simpl -dsuppress-uniques'])
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index c1b10ff6c8..80738de7c1 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -625,14 +625,7 @@ test('T14811', normal, compile, [''])
test('T14934', [extra_files(['T14934.hs', 'T14934a.hs'])], makefile_test, [])
test('T13643', normal, compile, [''])
test('SplitWD', normal, compile, [''])
-# we omit profasm because it fails with:
-# T14441.hs:1:1: fatal:
-# Cannot load -prof objects when GHC is built with -dynamic
-# To fix this, either:
-# (1) Use -fexternal-interpreter, or
-# (2) Build the program twice: once with -dynamic, and then
-# with -prof using -osuf to set a different object file suffix.
-test('T14441', omit_ways(['profasm']), compile, [''])
+test('T14441', req_th, compile, [''])
test('T15079', normal, compile, [''])
test('T15050', normal, compile, [''])
test('T14735', normal, compile, [''])
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index efad13aacd..9d97a8ea3f 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -441,7 +441,7 @@ test('T12837', normal, compile_fail, [''])
test('T12906', normal, compile_fail, [''])
test('T12918a', normal, compile_fail, [''])
test('T12918b', normal, compile_fail, [''])
-test('T12921', normal, compile_fail, [''])
+test('T12921', req_interp, compile_fail, [''])
test('T12947', normal, compile_fail, [''])
test('StrictBinds', normal, compile_fail, [''])
test('T13068', [extra_files(['T13068.hs', 'T13068a.hs', 'T13068.hs-boot', 'T13068m.hs'])], multimod_compile_fail, ['T13068m', ''])
@@ -497,7 +497,7 @@ test('T15552a', normal, compile_fail, [''])
test('T15592a', normal, compile_fail, [''])
test('T15629', normal, compile_fail, [''])
test('T15767', normal, compile_fail, [''])
-test('T15648', [extra_files(['T15648a.hs'])], multimod_compile_fail, ['T15648', '-v0 -fprint-equality-relations'])
+test('T15648', [req_th,extra_files(['T15648a.hs'])], multimod_compile_fail, ['T15648', '-v0 -fprint-equality-relations'])
test('T15712', normal, compile_fail, [''])
test('T15793', normal, compile_fail, [''])
test('T15796', normal, compile_fail, [''])
diff --git a/testsuite/tests/unboxedsums/all.T b/testsuite/tests/unboxedsums/all.T
index 5135a5701b..d1278a4eb2 100644
--- a/testsuite/tests/unboxedsums/all.T
+++ b/testsuite/tests/unboxedsums/all.T
@@ -17,8 +17,8 @@ test('unboxedsums10', omit_ways(['ghci']), compile_and_run, [''])
test('unboxedsums11', omit_ways(['ghci']), compile_and_run, [''])
test('unboxedsums12', omit_ways(['ghci']), compile, [''])
-test('UnboxedSumsTH', omit_ways(['ghci']), compile, [''])
-test('UnboxedSumsTH_Fail', omit_ways(['ghci']), compile_fail, [''])
+test('UnboxedSumsTH', [req_th,omit_ways(['ghci'])], compile, [''])
+test('UnboxedSumsTH_Fail', [req_th,omit_ways(['ghci'])], compile_fail, [''])
test('ffi1', normal, compile_fail, [''])
test('thunk', only_ways(['normal']), compile_and_run, [''])