clayborg added a comment.
We could just teach the standard decorators to detect the type of the "archs"
variable and do the right thing based off of the type. In the handler code you
could have:
retype = type(re.compile('hello, world'))
if isinstance(archs, list):
# Do what we do now and check if the arch is in the list
elif isinstance(arg, basestring):
# "archs" is a single architecture, just check it
elif (isinstance(archs, retype):
# Handle regex correctly
We could also add support for passing a function in "archs" that takes a single
argument that is the architecture name so we can do things with lambdas, etc.
This should be detectable in the above check.
The basestring check might need to be modified for python 3.
Then the decorator usage can be:
@skipIf(archs=re.compile('mips.*'))
or
@skipIf(archs='mips64r2'))
I like the idea of adding a getMipsArchitectures() function as previously
suggested:
> add a getMipsArchitectures() function and then write
> archs=not_in(getMipsArchitectures())
Repository:
rL LLVM
http://reviews.llvm.org/D16049
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits