Commit 20160f1a authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

testsuite: Don't run tests requiring TH in profasm way when GhcDynamic

Since we can't load profiled objects when GhcDynamic==YES. Affects:

* T16737
* T16384
* T16718
* T16619
* T16190
parent 1cbfef47
......@@ -434,6 +434,14 @@ def unless(b, f):
def doing_ghci():
return 'ghci' in config.run_ways
def requires_th(name, opts):
Mark a test as requiring TemplateHaskell. Currently this means
that we don't run the test in the profasm when when GHC is
dynamically-linked since we can't load profiled objects in this case.
return when(ghc_dynamic(), omit_ways(['profasm']))
def ghc_dynamic():
return config.ghc_dynamic
......@@ -272,5 +272,7 @@ test('inline-check', omit_ways(['hpc', 'profasm'])
test('T14452', [], makefile_test, [])
test('T15396', normal, compile_and_run, ['-package ghc'])
[extra_files(['T16737include/']), expect_broken_for(16541, ['ghci'])],
expect_broken_for(16541, ['ghci'])],
compile_and_run, ['-optP=-isystem -optP=T16737include'])
......@@ -142,5 +142,5 @@ test('T15457', normal, compile, [''])
test('T15675', normal, compile, [''])
test('T15781', normal, compile, [''])
test('T16339', normal, compile, [''])
test('T16619', [], multimod_compile, ['T16619', '-v0'])
test('T16619', requires_th, multimod_compile, ['T16619', '-v0'])
test('T504', normal, compile, [''])
......@@ -404,7 +404,7 @@ test ('WWRec',
['-v0 -O'])
[requires_th, collect_stats()],
['T16190.hs', '-v0'])
......@@ -15,7 +15,7 @@ test('T8633', normal, compile_and_run, [''])
test('T8759a', normal, compile, ['-v0'])
test('T9824', normal, compile, ['-v0'])
test('T10384', normal, compile_fail, [''])
test('T16384', normal, compile, [''])
test('T16384', requires_th, compile, [''])
test('TH_tf2', normal, compile, ['-v0'])
test('TH_ppr1', normal, compile_and_run, [''])
......@@ -10,4 +10,4 @@ test('T8958', [normalise_fun(normalise_errmsg), only_ways('normal')], compile, [
test('T10263', normal, compile, [''])
test('T9204b', [], multimod_compile, ['T9204b', '-v0'])
test('T14101', normal, compile, [''])
test('T16718', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('T16718', requires_th, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment