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

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 8 06:27:46 PST 2016


tberghammer added a subscriber: tberghammer.
tberghammer added a comment.

In http://reviews.llvm.org/D16936#346182, @labath wrote:

> I agree with the idea in general, but I wanted to ask what is your plan with the android decorators: For them we use the additional `api_levels` flag, which does not exist on other platforms/decorators. I suppose we could add that flag to `expectedFailureAll`, but I am not sure if that would be a good idea...
>
> Also, since we are doing all this refactoring, one more improvement I can think of is renaming `expectedFailureAll` to `expectedFailure`. It was named `All` because we already have an `expectedFailure` function, but I think that one is now more of an implementation detail and could be renamed to something else. Up to you...


My suggestion for the android API level is to add an argument to expectedFailure where you can specify an arbitrary function and then we can write a function called android_device_matches(...) what will return a function checking for the API level. Then this can be used to create very specific xfail conditions what are checking some property of the target system (e.g. "@expectedFailure(fn=hardwareWatchpointsNotSupported)")

Something like this:

  def android_device_matches(apis):
      def impl(apis):
          return get_device_api() in apis
      return impl


http://reviews.llvm.org/D16936





More information about the lldb-commits mailing list