2021-09-24 15:24:43 +00:00
|
|
|
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
|
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
A test verifying other targets build as part of a `bazel test`
|
|
|
|
|
2022-08-30 18:57:34 +00:00
|
|
|
<a id="build_test"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
## build_test
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
build_test(<a href="#build_test-name">name</a>, <a href="#build_test-targets">targets</a>, <a href="#build_test-kwargs">kwargs</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Test rule checking that other targets build.
|
|
|
|
|
|
|
|
This works not by an instance of this test failing, but instead by
|
|
|
|
the targets it depends on failing to build, and hence failing
|
|
|
|
the attempt to run this test.
|
|
|
|
|
|
|
|
Typical usage:
|
|
|
|
|
|
|
|
```
|
|
|
|
load("@bazel_skylib//rules:build_test.bzl", "build_test")
|
|
|
|
build_test(
|
|
|
|
name = "my_build_test",
|
|
|
|
targets = [
|
|
|
|
"//some/package:rule",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="build_test-name"></a>name | The name of the test rule. | none |
|
|
|
|
| <a id="build_test-targets"></a>targets | A list of targets to ensure build. | none |
|
2022-10-03 09:13:46 +00:00
|
|
|
| <a id="build_test-kwargs"></a>kwargs | The [common attributes for tests](https://bazel.build/reference/be/common-definitions#common-attributes-tests). | none |
|
2019-02-28 22:43:57 +00:00
|
|
|
|
2021-10-04 16:03:48 +00:00
|
|
|
|