[Lldb-commits] [PATCH] D16936: Remove expectedFailureWindows decorator

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 9 02:28:43 PST 2016

tberghammer added a comment.

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.



More information about the lldb-commits mailing list