-
Notifications
You must be signed in to change notification settings - Fork 109
Support marking a test as an expected failure #2378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Bumping the priority of this as it's quite useful. For performance tests, it'd be useful to mark a specific performance variable as an expected failure. Also we should be able to attach a reason for the expected failure (e.g., "known bug X") similar to the various |
For this I was thinking the following API: At the low-level there should an The This
In the first form, we can support some pseudo variables that we expect to be used often, such as In the second form, the Often performance variables are defined explicitly by setting the builtins.xfail("message", when={'var': 1})(self.perf_variables['foo']) This essentially applies explicitly the decorator to the performance function stored in a specific "perf variable". When using the if self.var == 1:
builtins.xfail("message", when=lambda _: True)(self.perf_variables('foo']) |
I have some second thoughts on the above proposal. Decorating the |
Here is a second iteration. For failing performance, the best way is to encode it in the reference tuple, something like this: reference = {
'tresa:gnu': {
'triad_bw': (10, -0.1, 0.1, 'GB/s', xfail('bug 123'))
}
} As for sanity, we could either use a class-level decorator taking optionally a callable to determine the condition: @rfm.xfail('bug 123', when=lambda test: test.num_nodes == 3)
@rfm.simple_test
class my_test(my_library_test): Or use a custom protocol function that the framework will call when sanity failure occurs to determine if it's expected or not: def __rfm_xfail_sanity__(self):
return self.num_nodes == 3, 'bug 123' My idea is that the protocol level method will be the actual implementation of what the decorator will translate into, so both will be equivalent. The @xfail is simply syntactic sugar. As for how the expected failures will be handled, my original proposal is still valid. |
No description provided.
The text was updated successfully, but these errors were encountered: