[PATCH] [libcxx] Add UNSUPPORTED tag to lit. It mirrors REQUIRES.

Eric Fiselier eric at efcs.ca
Sun Aug 17 23:49:33 PDT 2014


Change name of EXCLUDES to UNSUPPORTED.

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 = []
+        unsupported = []
         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 '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 @@
                     "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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4950.12608.patch
Type: text/x-patch
Size: 1533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140818/5aeefb84/attachment.bin>


More information about the cfe-commits mailing list