[commit: ghc] wip/llvm-th-tests-broken: testsuite: Mark th tests as broken in ext-interp way in LLVM build flavours (1c229de)

git at git.haskell.org git at git.haskell.org
Thu Dec 27 17:00:12 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/llvm-th-tests-broken
Link       : http://ghc.haskell.org/trac/ghc/changeset/1c229def93ad4d44e5d24644be94ea7faf4946f1/ghc

>---------------------------------------------------------------

commit 1c229def93ad4d44e5d24644be94ea7faf4946f1
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Dec 23 02:24:17 2018 -0500

    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.


>---------------------------------------------------------------

1c229def93ad4d44e5d24644be94ea7faf4946f1
 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 8312592..908668b 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 1bac4fd..cead469 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 96c7e1e..1bea110 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'])



More information about the ghc-commits mailing list