summaryrefslogtreecommitdiff
path: root/testsuite/driver/testglobals.py
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-10-17 23:09:25 -0400
committerCheng Shao <terrorjack@type.dance>2023-03-30 18:43:53 +0000
commit79d0cb3210e71bc5eca97af7e12a654134336d1f (patch)
treef9b9f88ef32dcfcc3d88bd2b20da8f915f89d72f /testsuite/driver/testglobals.py
parentcea56ccca154d477d858f3b25008df42b68a2b17 (diff)
downloadhaskell-79d0cb3210e71bc5eca97af7e12a654134336d1f.tar.gz
testsuite/driver: Add basic support for testing cross-compilers
Diffstat (limited to 'testsuite/driver/testglobals.py')
-rw-r--r--testsuite/driver/testglobals.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index 62643f2acc..eb72e5e202 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -178,6 +178,11 @@ class TestConfig:
# threads
self.threads = 1
+ # An optional executable used to wrap target code execution
+ # When set tests which aren't marked with TestConfig.cross_okay
+ # are skipped.
+ self.target_wrapper = None
+
# tests which should be considered to be broken during this testsuite
# run.
self.broken_tests = set() # type: Set[TestName]
@@ -448,6 +453,12 @@ class TestOptions:
# Should we copy the files of symlink the files for the test?
self.copy_files = False
+ # Should the test be run in a cross-compiled tree?
+ # None: infer from test function
+ # True: run when --target-wrapper is set
+ # False: do not run in cross-compiled trees
+ self.cross_okay = None # type: Optional[bool]
+
# The extra hadrian dependencies we need for this particular test
self.hadrian_deps = set(["test:ghc"]) # type: Set[str]