summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorZubin Duggal <zubin.duggal@gmail.com>2021-08-03 13:50:18 +0530
committerZubin Duggal <zubin.duggal@gmail.com>2021-10-13 13:51:00 +0530
commit4536e8ca27e2173af9bc72e2e5992be140ecb2d2 (patch)
tree5cb1b99d618fca8dbc91277102a48036af9595b2 /testsuite/driver/testlib.py
parent58bd0cc1e6dc95328879fc53e9c58b7079d4c292 (diff)
downloadhaskell-4536e8ca27e2173af9bc72e2e5992be140ecb2d2.tar.gz
hadrian, testsuite: Teach Hadrian to query the testsuite driver for dependencies
Issues #19072, #17728, #20176
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 3202bab65c..20b4181004 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -196,7 +196,17 @@ def _reqlib( name, opts, lib ):
for db in config.test_package_db:
opts.extra_hc_opts = opts.extra_hc_opts + ' -package-db=' + db + ' '
+def _req_hadrian_deps(name,opts,deps):
+ opts.hadrian_deps.update(deps)
+
+def req_hadrian_deps(deps):
+ return lambda name, opts: _req_hadrian_deps(name,opts,deps)
+
+# We want the 'docs-haddock' dependency and not just the
+# haddock executable since the haddock tests need documentation
+# for the boot libraries
def req_haddock( name, opts ):
+ _req_hadrian_deps(name,opts,["docs-haddock"])
if not config.haddock:
opts.expect = 'missing-lib'
opts.skip = True
@@ -1079,6 +1089,12 @@ def test_common_work(watcher: testutil.Watcher,
else:
framework_fail(name, None, 'extra_file is empty string')
+ # If we are only reporting hadrian dependencies, then skip the test
+ # and add its dependencies to the global set
+ if do_ways and config.only_report_hadrian_deps:
+ do_ways = []
+ config.hadrian_deps |= getTestOpts().hadrian_deps
+
# Run the required tests...
for way in do_ways:
if stopping():