aboutsummaryrefslogtreecommitdiffstats
path: root/utils/lit/lit/TestingConfig.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-07-21 23:39:57 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-07-21 23:39:57 +0000
commitb937549e517fcb03032bab3441d6ced37fc4db8d (patch)
tree31e86924c4eb4aaba4e9e3412d4a3102f1a251f4 /utils/lit/lit/TestingConfig.py
parent17aa92c92a925b4a674440c7ef088c223990e854 (diff)
downloadexternal_llvm-b937549e517fcb03032bab3441d6ced37fc4db8d.zip
external_llvm-b937549e517fcb03032bab3441d6ced37fc4db8d.tar.gz
external_llvm-b937549e517fcb03032bab3441d6ced37fc4db8d.tar.bz2
lit: Add support for 'REQUIRES: feature-one, feature-two, ...' in the
integrated-test formats (sh and tcl style). The particular features which get recognized are up to the test suite itself to define. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit/lit/TestingConfig.py')
-rw-r--r--utils/lit/lit/TestingConfig.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/lit/lit/TestingConfig.py b/utils/lit/lit/TestingConfig.py
index dd905ef..5c1b273 100644
--- a/utils/lit/lit/TestingConfig.py
+++ b/utils/lit/lit/TestingConfig.py
@@ -28,7 +28,8 @@ class TestingConfig:
on_clone = None,
test_exec_root = None,
test_source_root = None,
- excludes = [])
+ excludes = [],
+ available_features = [])
if os.path.exists(path):
# FIXME: Improve detection and error reporting of errors in the
@@ -54,7 +55,8 @@ class TestingConfig:
def __init__(self, parent, name, suffixes, test_format,
environment, substitutions, unsupported, on_clone,
- test_exec_root, test_source_root, excludes):
+ test_exec_root, test_source_root, excludes,
+ available_features):
self.parent = parent
self.name = str(name)
self.suffixes = set(suffixes)
@@ -66,6 +68,7 @@ class TestingConfig:
self.test_exec_root = test_exec_root
self.test_source_root = test_source_root
self.excludes = set(excludes)
+ self.available_features = set(available_features)
def clone(self, path):
# FIXME: Chain implementations?
@@ -75,7 +78,7 @@ class TestingConfig:
self.environment, self.substitutions,
self.unsupported, self.on_clone,
self.test_exec_root, self.test_source_root,
- self.excludes)
+ self.excludes, self.available_features)
if cfg.on_clone:
cfg.on_clone(self, cfg, path)
return cfg