diff options
author | Davide Italiano <davide@freebsd.org> | 2018-07-10 20:37:24 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2018-07-10 20:37:24 +0000 |
commit | 87951b6693bf061108fed2f2f95374905e4e60c7 (patch) | |
tree | e0962874280e8295c061495ccf17bf7c7f9d3eba /lldb/packages/Python/lldbsuite/test/dotest.py | |
parent | 3a0e12700bc775be452cf40f9226e535683864b7 (diff) | |
download | llvm-87951b6693bf061108fed2f2f95374905e4e60c7.zip llvm-87951b6693bf061108fed2f2f95374905e4e60c7.tar.gz llvm-87951b6693bf061108fed2f2f95374905e4e60c7.tar.bz2 |
[testsuite] Implement a category to skip libstdcxx tests
On systems where it's not supported.
As far as I understand Linux is the only systems which now ships
with libstdcxx (maybe NetBSD?, but I'm not entirely sure of the
state of lldb on the platform).
We could make this more fine grained looking for the header as
we do for libcxx. This is a little tricky as there's no such
thing as /usr/include/c++/v1, but libstdcxx encodes the version
number in the path (i.e. /usr/include/c++/5.4). I guess we might
match a regex, but it seems fragile to me.
Differential Revision: https://reviews.llvm.org/D49110
llvm-svn: 336724
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index de3e698..d28c5ef 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -1104,6 +1104,23 @@ def checkLibcxxSupport(): print("Libc++ tests will not be run because: " + reason) configuration.skipCategories.append("libc++") +def canRunLibstdcxxTests(): + from lldbsuite.test import lldbplatformutil + + platform = lldbplatformutil.getPlatform() + if platform == "linux": + return True, "libstdcxx always present" + return False, "Don't know how to build with libstdcxx on %s" % platform + +def checkLibstdcxxSupport(): + result, reason = canRunLibstdcxxTests() + if result: + return # libstdcxx supported + if "libstdcxx" in configuration.categoriesList: + return # libstdcxx category explicitly requested, let it run. + print("libstdcxx tests will not be run because: " + reason) + configuration.skipCategories.append("libstdcxx") + def checkDebugInfoSupport(): import lldb @@ -1228,6 +1245,7 @@ def run_suite(): target_platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2] checkLibcxxSupport() + checkLibstdcxxSupport() checkDebugInfoSupport() # Don't do debugserver tests on anything except OS X. |