summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-01-31 19:08:01 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-02-04 09:38:47 +0000
commitf76886edbc9b0b8feeeed95e25cb20b9035f8eaf (patch)
tree9e0fea48143276c2903c3567709f7ad6c9f9eb29 /testsuite/driver/testlib.py
parente59446c6a682587c21424e5830f305ab2f8f8cfa (diff)
downloadhaskell-wip/testsuite-linters.tar.gz
testsuite: Run testsuite dependency calculation before GHC is builtwip/testsuite-linters
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.py6
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 ):