diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-08-18 06:43:06 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-08-18 06:43:06 +0000 |
commit | 339bdc3be924e5db1e727f4dc6b474bb2fcc26b7 (patch) | |
tree | acde0da8d49224b172dc09a6232f045002d765d8 | |
parent | cd6ac3a3a75b1a97b92f8e16385c725cc60818a1 (diff) | |
download | bcm5719-llvm-339bdc3be924e5db1e727f4dc6b474bb2fcc26b7.tar.gz bcm5719-llvm-339bdc3be924e5db1e727f4dc6b474bb2fcc26b7.zip |
[libcxx] Add UNSUPPORTED tag to lit. It mirrors REQUIRES.
Summary:
This patch adds support for // UNSUPPORTED: feature. If an excluded feature is found in the list of available features then the test is marked unsupported.
I hope to use this to mark test unsupported if the fail with msan on asan. As well as tests that fail in particular standard modes.
Reviewers: mclow.lists, danalbert
Reviewed By: danalbert
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4950
llvm-svn: 215883
-rw-r--r-- | libcxx/test/lit.cfg | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg index f41187b86a0..ae884342803 100644 --- a/libcxx/test/lit.cfg +++ b/libcxx/test/lit.cfg @@ -64,6 +64,7 @@ class LibcxxTestFormat(lit.formats.FileBasedTest): def _execute(self, test, lit_config): # Extract test metadata from the test file. requires = [] + unsupported = [] with open(test.getSourcePath()) as f: for ln in f: if 'XFAIL:' in ln: @@ -72,6 +73,9 @@ class LibcxxTestFormat(lit.formats.FileBasedTest): elif 'REQUIRES:' in ln: items = ln[ln.index('REQUIRES:') + 9:].split(',') requires.extend([s.strip() for s in items]) + elif 'UNSUPPORTED:' in ln: + items = ln[ln.index('UNSUPPORTED:') + 12:].split(',') + unsupported.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 @@ class LibcxxTestFormat(lit.formats.FileBasedTest): "Test requires the following features: %s" % ( ', '.join(missing_required_features),)) + unsupported_features = [f for f in unsupported + if f in test.config.available_features] + if unsupported_features: + return (lit.Test.UNSUPPORTED, + "Test is unsupported with the following features: %s" % ( + ', '.join(unsupported_features),)) + # Evaluate the test. return self._evaluate_test(test, lit_config) |