[PATCH] [libcxx] Add EXCLUDES tag to lit. It mirrors REQUIRES.
Eric Fiselier
eric at efcs.ca
Sun Aug 17 22:32:43 PDT 2014
Removed checking triple target for REQUIRES and EXCLUDES. I though that LIT's TestRunner.py check the triple target but I was mistaken. YAGNI :P
http://reviews.llvm.org/D4950
Files:
test/lit.cfg
Index: test/lit.cfg
===================================================================
--- test/lit.cfg
+++ test/lit.cfg
@@ -64,6 +64,7 @@
def _execute(self, test, lit_config):
# Extract test metadata from the test file.
requires = []
+ excludes = []
with open(test.getSourcePath()) as f:
for ln in f:
if 'XFAIL:' in ln:
@@ -72,6 +73,9 @@
elif 'REQUIRES:' in ln:
items = ln[ln.index('REQUIRES:') + 9:].split(',')
requires.extend([s.strip() for s in items])
+ elif 'EXCLUDES:' in ln:
+ items = ln[ln.index('EXCLUDES:') + 9:].split(',')
+ excludes.extend([s.strip() for s in items])
elif not ln.strip().startswith("//") and ln.strip():
# Stop at the first non-empty line that is not a C++
# comment.
@@ -89,6 +93,13 @@
"Test requires the following features: %s" % (
', '.join(missing_required_features),))
+ excluded_features = [f for f in excludes
+ if f in test.config.available_features]
+ if excluded_features:
+ return (lit.Test.UNSUPPORTED,
+ "Test excludes the following features: %s" % (
+ ', '.join(excluded_features),))
+
# Evaluate the test.
return self._evaluate_test(test, lit_config)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4950.12606.patch
Type: text/x-patch
Size: 1497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140818/7e6cd112/attachment.bin>
More information about the cfe-commits
mailing list