diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-11-06 15:26:20 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-11-06 15:26:20 +0000 |
commit | 4dfba103a7530c323d1fcc7f8b67edae44368fcf (patch) | |
tree | 0d8ed06c0e171f38c19af920f52cf953791e49c0 /libcxxabi/test | |
parent | 1c993441563f018f595f8c996e425ac399bc1d51 (diff) | |
download | bcm5719-llvm-4dfba103a7530c323d1fcc7f8b67edae44368fcf.tar.gz bcm5719-llvm-4dfba103a7530c323d1fcc7f8b67edae44368fcf.zip |
Add support for UNSUPPORTED tag to lit
llvm-svn: 221460
Diffstat (limited to 'libcxxabi/test')
-rw-r--r-- | libcxxabi/test/lit.cfg | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libcxxabi/test/lit.cfg b/libcxxabi/test/lit.cfg index f6efacfd957..7963ddd923b 100644 --- a/libcxxabi/test/lit.cfg +++ b/libcxxabi/test/lit.cfg @@ -58,6 +58,7 @@ class LibcxxabiTestFormat(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: @@ -66,7 +67,10 @@ class LibcxxabiTestFormat(lit.formats.FileBasedTest): elif 'REQUIRES:' in ln: items = ln[ln.index('REQUIRES:') + 9:].split(',') requires.extend([s.strip() for s in items]) - elif not ln.startswith("//") and ln.strip(): + 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. break @@ -83,6 +87,13 @@ class LibcxxabiTestFormat(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) |