[Lldb-commits] [PATCH] D16938: A number of improvements to decorator conditionals

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 5 16:37:20 PST 2016


zturner created this revision.
zturner added reviewers: tfiala, labath, tberghammer.
zturner added a subscriber: lldb-commits.

The goal here is to try to improve consistency across the variety of decorators we support.  This patch makes the following changes:

* Change the `not_in` function to be a class object called `no_match`.  This indicates that it can be used for more than just checking list membership, and that instead it negates whatever condition is used to normally match.
* Change the name of `_check_list_or_lambda` to `match_decorator_property`.  This indicates that it could be more than a list or a lambda.
* Always use a regex match when matching strings in `match_decorator_property`.  This allows any string on any decoratory property to automatically support regex matching.
* Also support the use of compiled regexes on decorator properties.
* Fix a bug in the compiler check used by `_decorateTest`.  The two arguments were reversed, so that check was not matching when it should have matched.
* Change one test that uses `skipUnlessArch` to use `skipIf`.  Now that `skipIf` supports regex matching on the architecture property, this works, and as a followup `skipUnlessArch` will be removed entirely.

Note that you won't be able to apply this patch unless you apply it on top of my previous review D16936.

http://reviews.llvm.org/D16938

Files:
  packages/Python/lldbsuite/test/decorators.py
  packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py
  packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py
  packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16938.47063.patch
Type: text/x-patch
Size: 6688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160206/7c924d7b/attachment.bin>


More information about the lldb-commits mailing list