diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-01-31 19:08:01 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-02-04 10:02:35 -0500 |
commit | 62d670eb3a1c059f1ff977471f8d77dac5cf21b8 (patch) | |
tree | cf1406720690eba63cc3ad2d92385dc8689ad1d5 /testsuite/mk | |
parent | eddaa591a478e7598a9f5df4c26306e4fadbf08e (diff) | |
download | haskell-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/mk')
-rw-r--r-- | testsuite/mk/ghc-config.hs | 5 | ||||
-rw-r--r-- | testsuite/mk/test.mk | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs index e4631f13ff..a22d9b46d1 100644 --- a/testsuite/mk/ghc-config.hs +++ b/testsuite/mk/ghc-config.hs @@ -20,12 +20,15 @@ main = do getGhcFieldOrFail fields "GhcDebugged" "Debug on" getGhcFieldOrFail fields "GhcWithNativeCodeGen" "Have native code generator" getGhcFieldOrFail fields "GhcWithInterpreter" "Have interpreter" + getGhcFieldOrFail fields "GhcWithRtsLinker" "target has RTS linker" getGhcFieldOrFail fields "GhcUnregisterised" "Unregisterised" getGhcFieldOrFail fields "GhcWithSMP" "Support SMP" getGhcFieldOrFail fields "GhcRTSWays" "RTS ways" - getGhcFieldOrFail fields "GhcLeadingUnderscore" "Leading underscore" + getGhcFieldOrFail fields "GhcLibdir" "LibDir" + getGhcFieldOrFail fields "GhcGlobalPackageDb" "Global Package DB" getGhcFieldOrDefault fields "GhcDynamic" "GHC Dynamic" "NO" getGhcFieldOrDefault fields "GhcProfiled" "GHC Profiled" "NO" + getGhcFieldOrDefault fields "LeadingUnderscore" "Leading underscore" "NO" getGhcFieldProgWithDefault fields "AR" "ar command" "ar" getGhcFieldProgWithDefault fields "CLANG" "LLVM clang command" "clang" getGhcFieldProgWithDefault fields "LLC" "LLVM llc command" "llc" diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index e01a76eb29..56c720f0fd 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -189,6 +189,14 @@ else RUNTEST_OPTS += -e ghc_with_smp=False endif +ifeq "$(GhcWithRtsLinker)" "YES" +RUNTEST_OPTS += -e config.have_RTS_linker=True +else +RUNTEST_OPTS += -e config.have_RTS_linker=False +endif + +RUNTEST_OPTS += -e config.libdir="\"$(GhcLibdir)\"" + ifeq "$(WINDOWS)" "YES" RUNTEST_OPTS += -e windows=True else |