[Lldb-commits] [PATCH] D16936: Remove expectedFailureWindows decorator
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 9 09:54:19 PST 2016
zturner added a comment.
In http://reviews.llvm.org/D16936#347186, @tberghammer wrote:
> My main concern is that we have a lot of named argument for skipIf/expectFailure and I expect it to increase even further as we support more and more configuration. In my opinion we can have some functional style solution as readable as the current solution with greater flexibility.
> What do you think about having the skipIf decorator taking a list of functions as argument with *argc and it's meaning is that the test is skipped if all function returns true (skipIfAll)? To make it readable we can then write simple helper functions such as: archMatches, compilerMatches, hostMatches, etc....
> In this case we can have decorators like this: @skipIf(archMatches("arm"), compilerMatches("clang", "3.7"))
> If we need some more complicated condition then we can either introduce logical operators what can be used to negate functions, or/xor functions or do even more complicated things based on the existing basic functions or we can introduce new free standing functions what can be passed in to the decorator (they can be specified either locally or globally)
> A few complicated function I think we will need: androidDeviceMatches, linuxDistributionMatches, deviceSupportsHardwareBreakpoints, etc...
> I think this solution keeps the common decorators very readable while making the system easily extensible for extreme situations.
Something like that might be ok. I do agree that we can't support every use case through keyword arguments, that would be a little crazy. So we have to decide whether we want to use functional style for everything, or keep keyword style for some very common use cases and functional style for everything else. Maybe functional style for everything is better, I'll have to think about it some though.
More information about the lldb-commits