diff options
author | Andrew Trick <atrick@apple.com> | 2011-06-22 23:23:19 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-06-22 23:23:19 +0000 |
commit | f2a58425cd2a288b1d9fc3d2484ac774d361a0d7 (patch) | |
tree | 886dadc60c20d9c05fae3d279a63608e10ba32f1 /utils | |
parent | 1a3ab63cb59d7f7726b47cdda3b9509e999d1653 (diff) | |
download | llvm-f2a58425cd2a288b1d9fc3d2484ac774d361a0d7.tar.gz llvm-f2a58425cd2a288b1d9fc3d2484ac774d361a0d7.tar.bz2 llvm-f2a58425cd2a288b1d9fc3d2484ac774d361a0d7.tar.xz |
lit support for REQUIRES: asserts.
Take #2. Don't piggyback on the existing config.build_mode. Instead,
define a new lit feature for each build feature we need (currently
just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define
this feature within test/lit.site.cfg. This doesn't require any lit
harness changes and should be more robust across build systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lit/lit/TestRunner.py | 6 | ||||
-rw-r--r-- | utils/lit/lit/TestingConfig.py | 7 |
2 files changed, 2 insertions, 11 deletions
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py index 83603cc798..80d0ba1183 100644 --- a/utils/lit/lit/TestRunner.py +++ b/utils/lit/lit/TestRunner.py @@ -473,11 +473,9 @@ def parseIntegratedTestScript(test, normalize_slashes=False): if script[-1][-1] == '\\': return (Test.UNRESOLVED, "Test has unterminated run lines (with '\\')") - # Check that we have the required features or build modes: + # Check that we have the required features: missing_required_features = [f for f in requires - if f not in test.config.available_features - and f not in test.config.llvm_build_modes] - + if f not in test.config.available_features] if missing_required_features: msg = ', '.join(missing_required_features) return (Test.UNSUPPORTED, diff --git a/utils/lit/lit/TestingConfig.py b/utils/lit/lit/TestingConfig.py index 2d8d3d0165..25bb3417de 100644 --- a/utils/lit/lit/TestingConfig.py +++ b/utils/lit/lit/TestingConfig.py @@ -74,7 +74,6 @@ class TestingConfig: def clone(self, path): # FIXME: Chain implementations? - # See attribute chaining in finish() # # FIXME: Allow extra parameters? cfg = TestingConfig(self, self.name, self.suffixes, self.test_format, @@ -102,9 +101,3 @@ class TestingConfig: # files. Should we distinguish them? self.test_source_root = str(self.test_source_root) self.excludes = set(self.excludes) - - # chain attributes by copying them - if self.parent: - for k,v in vars(self.parent).items(): - if not hasattr(self, k): - setattr(self, k, v) |