summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-06-11 15:56:07 -0400
committerBen Gamari <ben@smart-cactus.org>2019-06-12 08:27:25 -0400
commit20160f1a8a8ed69c168bee5c8d43373191303b3f (patch)
tree0cc245157a0a58e253148ef29353f8d550fe8453
parent1cbfef47f0288a0f55e8f3db71076afd190121ca (diff)
downloadhaskell-20160f1a8a8ed69c168bee5c8d43373191303b3f.tar.gz
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
-rw-r--r--testsuite/driver/testlib.py8
-rw-r--r--testsuite/tests/driver/all.T4
-rw-r--r--testsuite/tests/parser/should_compile/all.T2
-rw-r--r--testsuite/tests/perf/compiler/all.T2
-rw-r--r--testsuite/tests/quotes/all.T2
-rw-r--r--testsuite/tests/roles/should_compile/all.T2
6 files changed, 15 insertions, 5 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 442d90da8a..9ec39267d6 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -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
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index d1e74a961a..a3f33c567f 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -272,5 +272,7 @@ test('inline-check', omit_ways(['hpc', 'profasm'])
test('T14452', [], makefile_test, [])
test('T15396', normal, compile_and_run, ['-package ghc'])
test('T16737',
- [extra_files(['T16737include/']), expect_broken_for(16541, ['ghci'])],
+ [extra_files(['T16737include/']),
+ requires_th,
+ expect_broken_for(16541, ['ghci'])],
compile_and_run, ['-optP=-isystem -optP=T16737include'])
diff --git a/testsuite/tests/parser/should_compile/all.T b/testsuite/tests/parser/should_compile/all.T
index fdb35c4d58..8ea9cce13d 100644
--- a/testsuite/tests/parser/should_compile/all.T
+++ b/testsuite/tests/parser/should_compile/all.T
@@ -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, [''])
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index 39aed75eca..40b5e268f0 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -404,7 +404,7 @@ test ('WWRec',
['-v0 -O'])
test('T16190',
- collect_stats(),
+ [requires_th, collect_stats()],
multimod_compile,
['T16190.hs', '-v0'])
diff --git a/testsuite/tests/quotes/all.T b/testsuite/tests/quotes/all.T
index d5bdda0124..18c4247ed1 100644
--- a/testsuite/tests/quotes/all.T
+++ b/testsuite/tests/quotes/all.T
@@ -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, [''])
diff --git a/testsuite/tests/roles/should_compile/all.T b/testsuite/tests/roles/should_compile/all.T
index ae4a490579..064202e73f 100644
--- a/testsuite/tests/roles/should_compile/all.T
+++ b/testsuite/tests/roles/should_compile/all.T
@@ -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'])