summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-12-23 02:24:17 -0500
committerBen Gamari <ben@smart-cactus.org>2018-12-24 00:24:04 -0500
commit5499f12f32a8deaa2a30c13359473b1178236341 (patch)
tree84cedd79df924829c6bb60b4e7419c04e5de0781
parentbd8a6bde2ee73e599800137b9428a401bc105985 (diff)
downloadhaskell-5499f12f32a8deaa2a30c13359473b1178236341.tar.gz
testsuite: Mark th tests as broken in ext-interp way in LLVM build flavours
This is due to the failures documented in #16087. The condition here could be improved as it matches on `BUILD_FLAVOUR` instead of looking at the compiler flags. However, it's better than nothing and I hope we will be able to fix these issues before long.
-rw-r--r--hadrian/src/Settings/Builders/RunTest.hs4
-rw-r--r--testsuite/mk/test.mk7
-rw-r--r--testsuite/tests/th/all.T2
3 files changed, 13 insertions, 0 deletions
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index 8312592ff6..908668b2a5 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -83,6 +83,9 @@ runTestBuilderArgs = builder RunTest ? do
timeoutProg <- expr buildRoot <&> (-/- timeoutPath)
integerLib <- expr (integerLibrary flav)
+ -- See #16087
+ let ghcBuiltByLlvm = False -- TODO: Implement this check
+
let asZeroOne s b = s ++ zeroOne b
-- TODO: set CABAL_MINIMAL_BUILD/CABAL_PLUGIN_BUILD
@@ -112,6 +115,7 @@ runTestBuilderArgs = builder RunTest ? do
, arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault
, arg "-e", arg $ "config.ghc_dynamic=" ++ show hasDynamic
, arg "-e", arg $ "config.integer_backend=" ++ show (pkgName integerLib)
+ , arg "-e", arg $ "config.ghc_built_by_llvm=" ++ show ghcBuiltByLlvm
-- Use default value, see:
-- https://github.com/ghc/ghc/blob/master/testsuite/mk/boilerplate.mk
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 1bac4fd091..cead469765 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -240,6 +240,13 @@ else
RUNTEST_OPTS += -e config.local=True
endif
+# Some tests in ext-interp fail when ghc-stage2 is built using LLVM. See #16087
+ifeq "$(findstring llvm,$(BUILD_FLAVOUR))" ""
+RUNTEST_OPTS += -e config.ghc_built_by_llvm=False
+else
+RUNTEST_OPTS += -e config.ghc_built_by_llvm=True
+endif
+
RUNTEST_OPTS += -e 'config.integer_backend="$(INTEGER_LIBRARY)"'
RUNTEST_OPTS += \
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index 96c7e1e726..1bea110399 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -12,6 +12,8 @@ setTestOpts(req_interp)
if config.have_ext_interp :
setTestOpts(extra_ways(['ext-interp']))
setTestOpts(only_ways(['normal','ghci','ext-interp']))
+ if config.ghc_built_by_llvm:
+ setTestOpts(expect_broken_for(16087, ['ext-interp']))
test('TH_mkName', normal, compile, ['-v0'])
test('TH_overloadedlabels', normal, compile, ['-v0'])