summaryrefslogtreecommitdiff
path: root/testsuite/config
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-01-31 19:08:01 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-04 10:02:35 -0500
commit62d670eb3a1c059f1ff977471f8d77dac5cf21b8 (patch)
treecf1406720690eba63cc3ad2d92385dc8689ad1d5 /testsuite/config
parenteddaa591a478e7598a9f5df4c26306e4fadbf08e (diff)
downloadhaskell-62d670eb3a1c059f1ff977471f8d77dac5cf21b8.tar.gz
testsuite: Run testsuite dependency calculation before GHC is built
The main motivation for this patch is to allow tests to be added to the testsuite which test things about the source tree without needing to build GHC. In particular the notes linter can easily start failing and by integrating it into the testsuite the process of observing these changes is caught by normal validation procedures rather than having to run the linter specially. With this patch I can run ``` ./hadrian/build test --flavour=devel2 --only="uniques" ``` In a clean tree to run the checkUniques linter without having to build GHC. Fixes #21029
Diffstat (limited to 'testsuite/config')
-rw-r--r--testsuite/config/ghc27
1 files changed, 2 insertions, 25 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index e4149da796..632db8fc57 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -183,18 +183,6 @@ llvm_ways = [x[0] for x in config.way_flags.items()
def get_compiler_info():
- s = getStdout([config.compiler, '--info'])
- s = re.sub('[\r\n]', '', s)
- compilerInfoDict = dict(eval(s))
- s = getStdout([config.compiler, '+RTS', '--info'])
- s = re.sub('[\r\n]', '', s)
- rtsInfoDict = dict(eval(s))
-
- config.have_ncg = compilerInfoDict.get("Have native code generator", "NO") == "YES"
-
- # Detect whether an LLVM toolhain is available
- llc_path = compilerInfoDict.get("LLVM llc command")
- config.have_llvm = shutil.which(llc_path) is not None
if config.unregisterised:
print("Unregisterised build; skipping LLVM ways...")
elif config.have_llvm:
@@ -212,25 +200,14 @@ def get_compiler_info():
# backend by default.
config.ghc_built_by_llvm = not config.have_ncg and not config.unregisterised
- config.have_RTS_linker = compilerInfoDict.get("target has RTS linker", "NO") == "YES"
# external interpreter needs RTS linker support
# If the field is not present (GHC 8.0 and earlier), assume we don't
# have -fexternal-interpreter (though GHC 8.0 actually does)
# so we can still run most tests.
- config.have_ext_interp = compilerInfoDict.get("target has RTS linker", "NO") == "YES"
+ config.have_ext_interp = config.have_RTS_linker
# See Note [Replacing backward slashes in config.libdir].
- config.libdir = compilerInfoDict['LibDir'].replace('\\', '/')
-
- if re.match(".*_p(_.*|$)", rtsInfoDict["RTS way"]):
- config.compiler_profiled = True
- else:
- config.compiler_profiled = False
-
- try:
- config.package_conf_cache_file = compilerInfoDict["Global Package DB"] + '/package.cache'
- except:
- config.package_conf_cache_file = ''
+ config.libdir = config.libdir.replace('\\', '/')
# See Note [WayFlags]
if config.ghc_dynamic: