summaryrefslogtreecommitdiff
path: root/testsuite/driver
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/driver')
-rw-r--r--testsuite/driver/testglobals.py7
-rw-r--r--testsuite/driver/testlib.py16
2 files changed, 19 insertions, 4 deletions
diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index ea0b03b3c1..8c52f7f148 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -147,8 +147,11 @@ class TestConfig:
# Is the compiler dynamically linked?
self.ghc_dynamic = False
- # Do we have SMP support?
- self.have_smp = False
+ # Does the host RTS have SMP support?
+ self.ghc_has_smp = True
+
+ # Does the target have SMP support?
+ self.target_has_smp = True
# Is gdb available?
self.have_gdb = False
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index aa738e96e2..bc83038d2b 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -296,8 +296,20 @@ def req_th( name, opts ):
if ghc_dynamic():
return _omit_ways(name, opts, ['profasm', 'profthreaded'])
-def req_smp( name, opts ):
- if not config.have_smp:
+def req_ghc_smp( name, opts ):
+ """
+ Mark a test as requiring GHC to be linked with an RTS that supports smp.
+ """
+ if not config.ghc_has_smp:
+ opts.skip = True
+
+def req_target_smp( name, opts ):
+ """
+ Mark a test as requiring smp when run on the target. If the target does
+ not support smp, then mark the test as an expected fail. Use this when the
+ test needs to run with smp support.
+ """
+ if not config.target_has_smp:
opts.expect = 'fail'
def ignore_stdout(name, opts):