[Lldb-commits] [PATCH] D15451: Make test categories composable
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 11 07:35:46 PST 2015
labath created this revision.
labath added reviewers: zturner, tfiala, tberghammer.
labath added a subscriber: lldb-commits.
Previously the add_test_categories would simply overwrite the current set of categories for a
method. This change makes the decorator truly "add" categories, by extending the current set of
categories instead of replacing it.
To do this, I have:
- replaced the getCategories() property on a method (which was itself a method), with a simple
list property "categories". This makes add_test_categories easier to implement, and test
categories isn't something which should change between calls anyway.
- rewritten the getCategoriesForTest function to merge method categories with the categories of
the test case. Previously, it would just use the method categories if they were present. I have
also greatly simplified this method. Originally, it would use a lot of introspection to enable
it being called on various types of objects. Based on my tests, it was only ever being called
on a test case. The new function uses much less introspection then the preivous one, so we
should easily catch any stray uses, if there are any, as they will generate exceptions now.
http://reviews.llvm.org/D15451
Files:
packages/Python/lldbsuite/test/lldbtest.py
packages/Python/lldbsuite/test/test_categories.py
packages/Python/lldbsuite/test/test_result.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15451.42521.patch
Type: text/x-patch
Size: 3879 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151211/5a2c4d72/attachment.bin>
More information about the lldb-commits
mailing list