diff options
author | Yifan Hong <elsk@google.com> | 2024-03-28 20:37:13 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-03-28 20:37:13 +0000 |
commit | 33d7219e616b98f1e5999307c60197c6eb60c7c3 (patch) | |
tree | e3db725750c9eca272e9f0541f2d27b6ce0c073d | |
parent | 95b2cbcaedbe3657b4c328b4259d825b3c99c8cf (diff) | |
parent | 66c26d2080caab3af93bb53a913772211f5299bd (diff) | |
download | bazel_common_rules-33d7219e616b98f1e5999307c60197c6eb60c7c3.tar.gz |
Merge "Mark test_mappings_dist deprecated." into main
-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/" |