summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-04-24 10:51:44 +0000
committerPavel Labath <labath@google.com>2018-04-24 10:51:44 +0000
commitfdfeefd6c29b2f26b69c63bd0a90a9915b94d956 (patch)
tree31e5c468d8eea7586972c776beeaa21682682a69 /lldb/packages/Python/lldbsuite/test/dotest.py
parent43acdb35bc94ed63b2ebd264aebfa2a757d5d545 (diff)
downloadbcm5719-llvm-fdfeefd6c29b2f26b69c63bd0a90a9915b94d956.tar.gz
bcm5719-llvm-fdfeefd6c29b2f26b69c63bd0a90a9915b94d956.zip
[dotest] Make the set of tests independent of the test configuration
Summary: In the magic test duplicator, we were making the decision whether to create a test variant based on the compiler and the target platform. This meant that the set of known tests was different for each test configuration. This patch makes the set of generated test variants static and handles the skipping via runtime checks instead. This is more consistent with how we do other test-skipping decision (e.g. for libc++ tests), and makes it easier to expose the full set of tests to lit, which now does not need to know anything about what things can potentially cause tests to appear or disappear. Reviewers: JDevlieghere, aprantl Subscribers: eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D45949 llvm-svn: 330708
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 506f5c4b036..bb103084d9b 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -1104,6 +1104,22 @@ def checkLibcxxSupport():
print("Libc++ tests will not be run because: " + reason)
configuration.skipCategories.append("libc++")
+def checkDebugInfoSupport():
+ import lldb
+
+ platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
+ compiler = configuration.compiler
+ skipped = []
+ for cat in test_categories.debug_info_categories:
+ if cat in configuration.categoriesList:
+ continue # Category explicitly requested, let it run.
+ if test_categories.is_supported_on_platform(cat, platform, compiler):
+ continue
+ configuration.skipCategories.append(cat)
+ skipped.append(cat)
+ if skipped:
+ print("Skipping following debug info categories:", skipped)
+
def run_suite():
# On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults
# does not exist before proceeding to running the test suite.
@@ -1212,6 +1228,7 @@ def run_suite():
target_platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
checkLibcxxSupport()
+ checkDebugInfoSupport()
# Don't do debugserver tests on everything except OS X.
configuration.dont_do_debugserver_test = "linux" in target_platform or "freebsd" in target_platform or "windows" in target_platform
OpenPOWER on IntegriCloud