[Lldb-commits] [PATCH] D16615: Refactor some of the skip / xfail decorators to reuse more code.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 27 08:41:03 PST 2016


Yea so basically what it does is allow you to use the same decorator with
arguments or without arguments.  Like this:

@expectedFailureWindows   # Python actually calls
expectedFailureWindows(func)
@expectedFailureWindows(debug_info='dwarf') # Python calls
expectedFailureWindows(debug_info='dwarf')(func)

If the goal is to delete all the highly specialized decorators (after all,
expectedFailureWindows is just expectedFailureAll(oslist=['windows'])) then
this problem goes away  by itself once everything is using
expectedFailureAll, since that will always be called with arguments.

On Wed, Jan 27, 2016 at 8:31 AM Todd Fiala <todd.fiala at gmail.com> wrote:

> On Tue, Jan 26, 2016 at 5:43 PM, Zachary Turner <zturner at google.com>
> wrote:
>
>> zturner updated this revision to Diff 46086.
>> zturner added a comment.
>>
>> Add back the check for `six.callable`.  Also added a detailed comment
>> explaining what this atrocity actually does.
>>
>
> Yeah - I was thinking that actually caught some ugliness that accepted
> either passing or not passing in the bug number, or something like that.
> If that's what it is for, I wouldn't be against requiring bug number
> arguments, or making them optional with a named arg.
>
>
>>
>> Note that this problem will go away by design once we reduce some of the
>> more superfluous decorators.
>>
>>
>> http://reviews.llvm.org/D16615
>>
>> Files:
>>
>> packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
>>   packages/Python/lldbsuite/test/lldbtest.py
>>
>>
>
>
> --
> -Todd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160127/c667fae1/attachment-0001.html>


More information about the lldb-commits mailing list