Reputation: 346
I want to define an "expect_failure" boolean attribute for a bazel rule set that I'm devising, so I can properly write tests for my tool chain. However:
ERROR: /blah/blah.bzl:7:26: cannot add attribute: There is already a built-in attribute 'expect_failure' which cannot be overridden.
I can't find documentation for this "built-in attribute" anywhere. When I attempt to make use of this built in attribute, I find that it is of type "string" rather than "bool" which maybe implies some nuance to its implementation. When I attempt to naively use it by defining "expect_failure" to be the string "True", I see an unexpected error message:
ERROR: /blah/blah/BUILD:159:21: in _verilog_test rule //blah/blah:blah-test: Expected failure not found: True
Can anyone illuminate correct use of the built-in "expect_failure" attribute for me?
Upvotes: 0
Views: 250