diff options
author | Yifan Hong <elsk@google.com> | 2024-03-26 14:18:37 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2024-03-27 13:24:33 -0700 |
commit | 66c26d2080caab3af93bb53a913772211f5299bd (patch) | |
tree | 928181ece4387a771a255898ea001ac5d17d609d | |
parent | 9c6d27060d6808fc1f2a203ff311319641285ec7 (diff) | |
download | bazel_common_rules-66c26d2080caab3af93bb53a913772211f5299bd.tar.gz |
Mark test_mappings_dist deprecated.
test_mappings_dist is no longer relevant in Roboleaf.
Kleaf has its own test_mappings zip in
//kernel/tests/test_mappings:test_mappings_zip.
Mark the macro deprecated so we can delete it later.
Bug: 329305827
Bug: 330775243
Test: TH
Change-Id: I00dc7ae5a999addb0a7c3712496f88c2d3fa52ac
-rw-r--r-- | test_mappings/test_mappings.bzl | 20 | ||||
-rwxr-xr-x | test_mappings/test_mappings.sh | 2 |
2 files changed, 19 insertions, 3 deletions
diff --git a/test_mappings/test_mappings.bzl b/test_mappings/test_mappings.bzl index fca527e..cef9fc3 100644 --- a/test_mappings/test_mappings.bzl +++ b/test_mappings/test_mappings.bzl @@ -12,13 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. +"""**DEPRECATED.** Declares an executable with test mapping archive.""" + load("//build/bazel_common_rules/exec:embedded_exec.bzl", "embedded_exec") +# TODO(b/330775243): Delete the whole package. def test_mappings_dist( name, dist_dir = None, **kwargs): - """Run this target to generate test mapping archive to the location given + """**DEPRECATED.** Declares an executable with test mapping archive. + + Run this target to generate test mapping archive to the location given by `--dist_dir` command-line argument. If `--dist_dir` command-line argument is not specified, default to the `dist_dir` argument of this rule. @@ -27,7 +32,7 @@ def test_mappings_dist( ``` test_mappings( name = "my_test_mappings", - args = ["--dist_dir", "out/dist"], + dist_dir = "out/dist", ) ``` @@ -44,9 +49,18 @@ def test_mappings_dist( Args: name: name of this target. - kwargs: Additional arguments to the internal rule, e.g. `visibility`. + dist_dir: distribution directory + **kwargs: Additional arguments to the internal rule, e.g. `visibility`. + + Deprecated: + Use `//kernel/tests/test_mappings:test_mappings_zip` instead. """ + # buildifier: disable=print + print("""\ +WARNING: //build/bazel_common_rules/test_mappings is deprecated. + Use //kernel/tests/test_mappings:test_mappings_zip instead.""") + native.sh_binary( name = name + "_internal", srcs = ["//build/bazel_common_rules/test_mappings:test_mappings.sh"], diff --git a/test_mappings/test_mappings.sh b/test_mappings/test_mappings.sh index 8a8ca5a..dad3828 100755 --- a/test_mappings/test_mappings.sh +++ b/test_mappings/test_mappings.sh @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +echo "**DEPRECATED.** Use //kernel/tests/test_mappings:test_mappings_zip instead." >&2 + # Ensure hermeticity. PATH="$PWD/prebuilts/build-tools/path/linux-x86/:$PWD/prebuilts/build-tools/linux-x86/bin/" |