1## native_binary 2 3<pre> 4native_binary(<a href="#native_binary-name">name</a>, <a href="#native_binary-src">src</a>, <a href="#native_binary-out">out</a>, <a href="#native_binary-data">data</a>, <a href="#native_binary-kwargs">kwargs</a>) 5</pre> 6 7Wraps a pre-built binary or script with a binary rule. 8 9You 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. 10 11 12### Parameters 13 14<table class="params-table"> 15 <colgroup> 16 <col class="col-param" /> 17 <col class="col-description" /> 18 </colgroup> 19 <tbody> 20 <tr id="native_binary-name"> 21 <td><code>name</code></td> 22 <td> 23 required. 24 </td> 25 </tr> 26 <tr id="native_binary-src"> 27 <td><code>src</code></td> 28 <td> 29 required. 30 <p> 31 label; path of the pre-built executable 32 </p> 33 </td> 34 </tr> 35 <tr id="native_binary-out"> 36 <td><code>out</code></td> 37 <td> 38 required. 39 <p> 40 output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) 41 </p> 42 </td> 43 </tr> 44 <tr id="native_binary-data"> 45 <td><code>data</code></td> 46 <td> 47 optional. default is <code>None</code> 48 <p> 49 list of labels; data dependencies 50 </p> 51 </td> 52 </tr> 53 <tr id="native_binary-kwargs"> 54 <td><code>kwargs</code></td> 55 <td> 56 optional. 57 <p> 58 The <a href="https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-binaries">common attributes for binaries</a>. 59 </p> 60 </td> 61 </tr> 62 </tbody> 63</table> 64 65 66## native_test 67 68<pre> 69native_test(<a href="#native_test-name">name</a>, <a href="#native_test-src">src</a>, <a href="#native_test-out">out</a>, <a href="#native_test-data">data</a>, <a href="#native_test-kwargs">kwargs</a>) 70</pre> 71 72Wraps a pre-built binary or script with a test rule. 73 74You can "bazel test" this rule like any other test rule. You can also augment the binary with 75runfiles. 76 77 78### Parameters 79 80<table class="params-table"> 81 <colgroup> 82 <col class="col-param" /> 83 <col class="col-description" /> 84 </colgroup> 85 <tbody> 86 <tr id="native_test-name"> 87 <td><code>name</code></td> 88 <td> 89 required. 90 </td> 91 </tr> 92 <tr id="native_test-src"> 93 <td><code>src</code></td> 94 <td> 95 required. 96 <p> 97 label; path of the pre-built executable 98 </p> 99 </td> 100 </tr> 101 <tr id="native_test-out"> 102 <td><code>out</code></td> 103 <td> 104 required. 105 <p> 106 output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) 107 </p> 108 </td> 109 </tr> 110 <tr id="native_test-data"> 111 <td><code>data</code></td> 112 <td> 113 optional. default is <code>None</code> 114 <p> 115 list of labels; data dependencies 116 </p> 117 </td> 118 </tr> 119 <tr id="native_test-kwargs"> 120 <td><code>kwargs</code></td> 121 <td> 122 optional. 123 <p> 124 The <a href="https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>. 125 </p> 126 </td> 127 </tr> 128 </tbody> 129</table> 130 131 132