summaryrefslogtreecommitdiffstats
path: root/libcxx/utils
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-02-05 19:22:38 +0000
committerLouis Dionne <ldionne@apple.com>2019-02-05 19:22:38 +0000
commit51358e45e23ea0889d11a91c4077bb3af406be55 (patch)
tree32dcc743c3c83509bc9be77f0a6276bd8588ada4 /libcxx/utils
parent3fdb07258b941eb4f52d5a964f2a67f87d906222 (diff)
downloadbcm5719-llvm-51358e45e23ea0889d11a91c4077bb3af406be55.tar.gz
bcm5719-llvm-51358e45e23ea0889d11a91c4077bb3af406be55.zip
[libcxx] Start defining lit features for tests depending on availability
This patch removes some vendor-specific availability XFAILs from the test suite. In the future, when a new feature is introduced in the dylib, an availability macro should be created and a matching lit feature should be created. That way, the test suite can XFAIL whenever the implementation lacks the necessary feature instead of being cluttered by vendor-specific annotations. Right now, those vendor-specific annotations are still somewhat cluttering the test suite by being in `config.py`, but at least they are localized. In the future, we could design a way to define those less intrusively or even automatically based on the availability macros that already exist in <__config>. llvm-svn: 353201
Diffstat (limited to 'libcxx/utils')
-rw-r--r--libcxx/utils/libcxx/test/config.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index a16bbdef5c4..5c7f4c3670a 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -1143,6 +1143,18 @@ class Configuration(object):
self.lit_config.note(
"computed target_triple as: %r" % self.config.target_triple)
+ # Throwing bad_optional_access, bad_variant_access and bad_any_cast is
+ # supported starting in macosx10.14.
+ if name == 'macosx' and version in ('10.%s' % v for v in range(7, 14)):
+ self.config.available_features.add('dylib-has-no-bad_optional_access')
+ self.lit_config.note("throwing bad_optional_access is not supported by the deployment target")
+
+ self.config.available_features.add('dylib-has-no-bad_variant_access')
+ self.lit_config.note("throwing bad_variant_access is not supported by the deployment target")
+
+ self.config.available_features.add('dylib-has-no-bad_any_cast')
+ self.lit_config.note("throwing bad_any_cast is not supported by the deployment target")
+
def configure_env(self):
self.target_info.configure_env(self.exec_env)
OpenPOWER on IntegriCloud