From 1c229def93ad4d44e5d24644be94ea7faf4946f1 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sun, 23 Dec 2018 02:24:17 -0500 Subject: 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. --- hadrian/src/Settings/Builders/RunTest.hs | 4 ++++ testsuite/mk/test.mk | 7 +++++++ testsuite/tests/th/all.T | 2 ++ 3 files changed, 13 insertions(+) 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']) -- cgit v1.2.1