diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /packages/Python/lldbsuite/test/test_categories.py | |
parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) | |
download | src-f3fbd1c0586ff6ec7895991e6c28f61a503c36a8.tar.gz src-f3fbd1c0586ff6ec7895991e6c28f61a503c36a8.zip |
Vendor import of lldb release_39 branch r276489:vendor/lldb/lldb-release_39-r276489
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=303241
svn path=/vendor/lldb/lldb-release_39-r276489/; revision=303242; tag=vendor/lldb/lldb-release_39-r276489
Diffstat (limited to 'packages/Python/lldbsuite/test/test_categories.py')
-rw-r--r-- | packages/Python/lldbsuite/test/test_categories.py | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/packages/Python/lldbsuite/test/test_categories.py b/packages/Python/lldbsuite/test/test_categories.py index 72b7afdf7241..0a85293109e7 100644 --- a/packages/Python/lldbsuite/test/test_categories.py +++ b/packages/Python/lldbsuite/test/test_categories.py @@ -11,9 +11,11 @@ import sys # Third-party modules # LLDB modules +from lldbsuite.support import gmodules + debug_info_categories = [ - 'dwarf', 'dwo', 'dsym' + 'dwarf', 'dwo', 'dsym', 'gmodules' ] all_categories = { @@ -21,6 +23,7 @@ all_categories = { 'dwarf' : 'Tests that can be run with DWARF debug information', 'dwo' : 'Tests that can be run with DWO debug information', 'dsym' : 'Tests that can be run with DSYM debug information', + 'gmodules' : 'Tests that can be run with -gmodules debug information', 'expression' : 'Tests related to the expression parser', 'objc' : 'Tests related to the Objective-C programming language support', 'pyapi' : 'Tests related to the Python API', @@ -42,12 +45,27 @@ def unique_string_match(yourentry, list): candidate = item return candidate -def is_supported_on_platform(category, platform): + +def is_supported_on_platform(category, platform, compiler_paths): if category == "dwo": # -gsplit-dwarf is not implemented by clang on Windows. return platform in ["linux", "freebsd"] elif category == "dsym": return platform in ["darwin", "macosx", "ios"] + elif category == "gmodules": + # First, check to see if the platform can even support gmodules. + if platform not in ["linux", "freebsd", "darwin", "macosx", "ios"]: + return False + # If all compilers specified support gmodules, we'll enable it. + for compiler_path in compiler_paths: + if not gmodules.is_compiler_clang_with_gmodules(compiler_path): + # Ideally in a multi-compiler scenario during a single test run, this would + # allow gmodules on compilers that support it and not on ones that don't. + # However, I didn't see an easy way for all the callers of this to know + # the compiler being used for a test invocation. As we tend to run with + # a single compiler per test run, this shouldn't be a major issue. + return False + return True return True def validate(categories, exact_match): |