From ddd5a323333bd95235b7137922aadb163acaee42 Mon Sep 17 00:00:00 2001 From: HONG Yifan Date: Tue, 3 Sep 2024 16:40:25 -0700 Subject: [PATCH] ANDROID: tests targets use pkg_install. copy_to_dist_dir is deprecated; we are switching to using pkg_install. The only visible UX change is that --dist_dir no longer works; one must specify --destdir instead. Bug: 331730853 Change-Id: Ieb15614c01107eb39a3529a6b9f74a76be43a054 Signed-off-by: HONG Yifan --- BUILD.bazel | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 489932332858..51b1b0efe9b8 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -2582,18 +2582,30 @@ pkg_zip( visibility = ["//visibility:public"], ) -copy_to_dist_dir( - name = "tests_zip_x86_64_dist", - data = [":tests_zip_x86_64"], - dist_dir = "out/tests_x86_64/dist", - flat = True, +pkg_files( + name = "tests_zip_x86_64_files", + srcs = [":tests_zip_x86_64"], + strip_prefix = strip_prefix.files_only(), + visibility = ["//visibility:private"], ) -copy_to_dist_dir( +pkg_install( + name = "tests_zip_x86_64_dist", + srcs = [":tests_zip_x86_64_files"], + destdir = "out/tests_x86_64/dist", +) + +pkg_files( + name = "tests_zip_arm64_files", + srcs = [":tests_zip_arm64"], + strip_prefix = strip_prefix.files_only(), + visibility = ["//visibility:private"], +) + +pkg_install( name = "tests_zip_arm64_dist", - data = [":tests_zip_arm64"], - dist_dir = "out/tests_arm64/dist", - flat = True, + srcs = [":tests_zip_arm64_files"], + destdir = "out/tests_arm64/dist", ) _TEST_MAPPINGS = glob(["**/TEST_MAPPING"])