summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-12-07 10:50:59 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2023-01-04 11:58:42 +0000
commit15bee1239877a4629a245fe457f06e5f96668423 (patch)
tree5004232eea23fe3b6f449c1513de95ddbc8d6ded /hadrian
parente640940c55a88d10537682baf530f3772e55459a (diff)
downloadhaskell-15bee1239877a4629a245fe457f06e5f96668423.tar.gz
hadrian: Add test:all_deps to build just testsuite dependencies
Fixes #22534
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/doc/testsuite.md13
-rw-r--r--hadrian/src/Rules/Test.hs3
2 files changed, 16 insertions, 0 deletions
diff --git a/hadrian/doc/testsuite.md b/hadrian/doc/testsuite.md
index 49a310d8a8..6ba289dd2b 100644
--- a/hadrian/doc/testsuite.md
+++ b/hadrian/doc/testsuite.md
@@ -22,6 +22,19 @@ tested in CI. If you use an untested flavour such as "Quick" then you run the
risk that not all tests will pass. In particular you can rely on the `validate`
and `perf` flavours being tested but no others.
+## Building just the dependencies needed for the testsuite
+
+By default the testsuite is queried to work out what specific dependencies need to
+be built for tests. For example, some linter tests don't require anything to be built.
+If you wish to build all the targets for the testsuite before running any tests there is
+a special meta-target which builds all the dependencies you might need when running the testsuite.
+
+```
+build test:all_deps
+```
+
+
+
## Running only a subset of the testsuite
### Specific tests
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index 0c8bd0059d..58b689bad3 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -82,6 +82,9 @@ inTreeOutTree inTree outTree = do
testsuiteDeps :: Rules ()
testsuiteDeps = do
root <- buildRootRules
+ "test:all_deps" ~> do
+ need ("test:ghc" : map cp_target checkPrograms)
+
"test:ghc" ~> inTreeOutTree
(\stg -> do
needTestsuitePackages stg