aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/test_categories.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/test_categories.py')
-rw-r--r--packages/Python/lldbsuite/test/test_categories.py42
1 files changed, 24 insertions, 18 deletions
diff --git a/packages/Python/lldbsuite/test/test_categories.py b/packages/Python/lldbsuite/test/test_categories.py
index 0a85293109e7..e2bec304832f 100644
--- a/packages/Python/lldbsuite/test/test_categories.py
+++ b/packages/Python/lldbsuite/test/test_categories.py
@@ -20,20 +20,20 @@ debug_info_categories = [
all_categories = {
'dataformatters': 'Tests related to the type command and the data formatters subsystem',
- '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',
- 'basic_process' : 'Basic process execution sniff tests.',
- 'cmdline' : 'Tests related to the LLDB command-line interface',
- 'dyntype' : 'Tests related to dynamic type support',
- 'stresstest' : 'Tests related to stressing lldb limits',
- 'flakey' : 'Flakey test cases, i.e. tests that do not reliably pass at each execution',
- 'lldb-mi' : 'lldb-mi tests'
-}
+ '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',
+ 'basic_process': 'Basic process execution sniff tests.',
+ 'cmdline': 'Tests related to the LLDB command-line interface',
+ 'dyntype': 'Tests related to dynamic type support',
+ 'stresstest': 'Tests related to stressing lldb limits',
+ 'flakey': 'Flakey test cases, i.e. tests that do not reliably pass at each execution',
+ 'lldb-mi': 'lldb-mi tests'}
+
def unique_string_match(yourentry, list):
candidate = None
@@ -63,11 +63,13 @@ def is_supported_on_platform(category, platform, compiler_paths):
# 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.
+ # a single compiler per test run, this shouldn't be a major
+ # issue.
return False
return True
return True
+
def validate(categories, exact_match):
"""
For each category in categories, ensure that it's a valid category (if exact_match is false,
@@ -80,10 +82,14 @@ def validate(categories, exact_match):
origCategory = category
if category not in all_categories and not exact_match:
category = unique_string_match(category, all_categories)
- if (category not in all_categories) or category == None:
- print("fatal error: category '" + origCategory + "' is not a valid category")
+ if (category not in all_categories) or category is None:
+ print(
+ "fatal error: category '" +
+ origCategory +
+ "' is not a valid category")
print("if you have added a new category, please edit test_categories.py, adding your new category to all_categories")
- print("else, please specify one or more of the following: " + str(list(all_categories.keys())))
+ print("else, please specify one or more of the following: " +
+ str(list(all_categories.keys())))
sys.exit(1)
result.append(category)
return result