bazel-lib/lib/private/fail_with_message_test.bzl

13 lines
291 B
Python
Raw Normal View History

2022-01-28 02:15:28 +00:00
"Test rule that always fails and prints a message"
def _fail_with_message_test_impl(ctx):
fail(ctx.attr.message)
fail_with_message_test = rule(
attrs = {
"message": attr.string(mandatory = True),
},
implementation = _fail_with_message_test_impl,
test = True,
)