summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/driver/testglobals.py3
-rw-r--r--testsuite/driver/testlib.py9
2 files changed, 11 insertions, 1 deletions
diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index 3984291ff8..6604036c12 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -139,6 +139,9 @@ class TestConfig:
# Do we have interpreter support?
self.have_interp = False
+ # Do we have RTS linker?
+ self.have_RTS_linker = False
+
# Does the platform support loading of dynamic shared libraries? e.g.
# some musl-based environments do not.
self.supports_dynamic_libs = True
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 5f3f44d035..8a9c280835 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -439,10 +439,17 @@ def only_ways( ways: List[WayName] ):
# -----
+def valid_way( way: WayName ) -> bool:
+ if way in {'ghci', 'ghci-ext'}:
+ return config.have_RTS_linker
+ if way == 'ghci-ext-prof':
+ return config.have_RTS_linker and config.have_profiling
+ return True
+
def extra_ways( ways: List[WayName] ):
def helper( name: TestName, opts ):
_lint_ways(name, ways)
- opts.extra_ways = ways
+ opts.extra_ways = [way for way in ways if valid_way(way)]
return helper