diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-01-31 19:08:01 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-02-03 15:21:46 +0000 |
commit | d29412537467cc4617da5e8859554e9ccd1924b7 (patch) | |
tree | 1595803ce81a7b2bcefcc8697fffe7a449452591 /testsuite/driver/testlib.py | |
parent | e59446c6a682587c21424e5830f305ab2f8f8cfa (diff) | |
download | haskell-wip/lint-testsuite.tar.gz |
testsuite: Run testsuite dependency calculation before GHC is builtwip/lint-testsuite
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/driver/testlib.py')
-rw-r--r-- | testsuite/driver/testlib.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 423cd99313..74ba9909f1 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -125,6 +125,12 @@ def setTestOpts( f ): # type TestOpt = (name :: String, opts :: Object) -> IO () def normal( name, opts ): + opts.hadrian_deps.update(["test:ghc"]) + return; + +# A test with no hadrian built dependencies, including the test compiler +# This is used for linters. +def no_deps( name, opts): return; def skip( name, opts ): |