Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions lldb/packages/Python/lldbsuite/test/lldbtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1778,16 +1778,15 @@ def no_reason(_):
attrvalue, "__no_debug_info_test__", False
):
# If any debug info categories were explicitly tagged, assume that list to be
# authoritative. If none were specified, try with all debug
# info formats.
# authoritative. If none were specified, try with all debug info formats.
test_method_categories = set(getattr(attrvalue, "categories", []))
all_dbginfo_categories = set(
test_categories.debug_info_categories.keys()
)
categories = (
set(getattr(attrvalue, "categories", [])) & all_dbginfo_categories
)
if not categories:
categories = [
dbginfo_categories = test_method_categories & all_dbginfo_categories
other_categories = list(test_method_categories - all_dbginfo_categories)
if not dbginfo_categories:
dbginfo_categories = [
category
for category, can_replicate in test_categories.debug_info_categories.items()
if can_replicate
Expand All @@ -1799,16 +1798,16 @@ def no_reason(_):
skip_for_debug_info_cat_fn = getattr(
attrvalue, "__skip_for_debug_info_cat_fn__", no_reason
)
for cat in categories:
for cat in dbginfo_categories:

@decorators.add_test_categories([cat])
@wraps(attrvalue)
def test_method(self, attrvalue=attrvalue):
return attrvalue(self)

method_name = attrname + "_" + cat
test_method.__name__ = method_name
test_method.debug_info = cat
test_method.categories = other_categories + [cat]

xfail_reason = xfail_for_debug_info_cat_fn(cat)
if xfail_reason:
Expand Down
Loading