2021-09-24 15:24:43 +00:00
|
|
|
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
|
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
native_binary() and native_test() rule implementations.
|
|
|
|
|
|
|
|
These rules let you wrap a pre-built binary or script in a conventional binary
|
|
|
|
and test rule respectively. They fulfill the same goal as sh_binary and sh_test
|
|
|
|
do, but they run the wrapped binary directly, instead of through Bash, so they
|
2022-05-17 11:26:16 +00:00
|
|
|
don't depend on Bash and work with --shell_executable="".
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
|
2022-08-30 18:57:34 +00:00
|
|
|
<a id="native_binary"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-05-14 11:33:01 +00:00
|
|
|
## native_binary
|
|
|
|
|
|
|
|
<pre>
|
2022-05-17 11:26:16 +00:00
|
|
|
native_binary(<a href="#native_binary-name">name</a>, <a href="#native_binary-data">data</a>, <a href="#native_binary-out">out</a>, <a href="#native_binary-src">src</a>)
|
2019-05-14 11:33:01 +00:00
|
|
|
</pre>
|
|
|
|
|
2022-05-17 11:26:16 +00:00
|
|
|
|
2019-05-14 11:33:01 +00:00
|
|
|
Wraps a pre-built binary or script with a binary rule.
|
|
|
|
|
2022-05-17 11:26:16 +00:00
|
|
|
You can "bazel run" this rule like any other binary rule, and use it as a tool
|
|
|
|
in genrule.tools for example. You can also augment the binary with runfiles.
|
2019-05-14 11:33:01 +00:00
|
|
|
|
|
|
|
|
2022-05-17 11:26:16 +00:00
|
|
|
**ATTRIBUTES**
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-05-14 11:33:01 +00:00
|
|
|
|
2022-05-17 11:26:16 +00:00
|
|
|
| Name | Description | Type | Mandatory | Default |
|
|
|
|
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
|
|
|
| <a id="native_binary-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
|
2022-09-01 12:19:43 +00:00
|
|
|
| <a id="native_binary-data"></a>data | data dependencies. See https://bazel.build/reference/be/common-definitions#typical.data | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
|
2022-05-17 11:26:16 +00:00
|
|
|
| <a id="native_binary-out"></a>out | An output name for the copy of the binary | String | required | |
|
|
|
|
| <a id="native_binary-src"></a>src | path of the pre-built executable | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
|
2021-09-24 15:24:43 +00:00
|
|
|
|
|
|
|
|
2022-08-30 18:57:34 +00:00
|
|
|
<a id="native_test"></a>
|
2019-05-14 11:33:01 +00:00
|
|
|
|
|
|
|
## native_test
|
|
|
|
|
|
|
|
<pre>
|
2022-05-17 11:26:16 +00:00
|
|
|
native_test(<a href="#native_test-name">name</a>, <a href="#native_test-data">data</a>, <a href="#native_test-out">out</a>, <a href="#native_test-src">src</a>)
|
2019-05-14 11:33:01 +00:00
|
|
|
</pre>
|
|
|
|
|
2022-05-17 11:26:16 +00:00
|
|
|
|
2019-05-14 11:33:01 +00:00
|
|
|
Wraps a pre-built binary or script with a test rule.
|
|
|
|
|
2022-05-17 11:26:16 +00:00
|
|
|
You can "bazel test" this rule like any other test rule. You can also augment
|
|
|
|
the binary with runfiles.
|
2019-05-14 11:33:01 +00:00
|
|
|
|
|
|
|
|
2022-05-17 11:26:16 +00:00
|
|
|
**ATTRIBUTES**
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-05-14 11:33:01 +00:00
|
|
|
|
2022-05-17 11:26:16 +00:00
|
|
|
| Name | Description | Type | Mandatory | Default |
|
|
|
|
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
|
|
|
| <a id="native_test-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
|
2022-09-01 12:19:43 +00:00
|
|
|
| <a id="native_test-data"></a>data | data dependencies. See https://bazel.build/reference/be/common-definitions#typical.data | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
|
2022-05-17 11:26:16 +00:00
|
|
|
| <a id="native_test-out"></a>out | An output name for the copy of the binary | String | required | |
|
|
|
|
| <a id="native_test-src"></a>src | path of the pre-built executable | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
|
2019-05-14 11:33:01 +00:00
|
|
|
|
2021-10-04 16:03:48 +00:00
|
|
|
|