From ba7650d4a950d092c1f8beb0a5e1e0a932243814 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Wed, 3 Apr 2024 12:17:48 -0700 Subject: [PATCH] ANDROID: Move test_mappings_zip from //kernel/tests/test_mappings to //common. This is to remove the hard-coded //common package in //kernel/tests/test_mappings, because the kernel tree may be specified elsewhere. Test: TH Bug: 327493370 Change-Id: Ib792be425a96b369eab6fb3d001fb1a519ec648b Signed-off-by: Yifan Hong --- BUILD.bazel | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/BUILD.bazel b/BUILD.bazel index 1c054aab628c..fdd9dc09a3e5 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -109,15 +109,18 @@ define_common_kernels(target_configs = { "kernel_aarch64": { "module_implicit_outs": get_gki_modules_list("arm64"), "make_goals": _GKI_AARCH64_MAKE_GOALS, + "extra_dist": [":test_mappings_zip"], }, "kernel_riscv64": { "module_implicit_outs": get_gki_modules_list("riscv64"), "make_goals": _GKI_RISCV64_MAKE_GOALS, + "extra_dist": [":test_mappings_zip"], }, "kernel_x86_64": { "kmi_symbol_list_strict_mode": False, "module_implicit_outs": get_gki_modules_list("x86_64"), "make_goals": _GKI_X86_64_MAKE_GOALS, + "extra_dist": [":test_mappings_zip"], }, }) @@ -2492,5 +2495,15 @@ pkg_files( srcs = _TEST_MAPPINGS, prefix = package_name(), renames = {file: file for file in _TEST_MAPPINGS}, - visibility = ["//kernel/tests/test_mappings:__pkg__"], + visibility = ["//visibility:private"], +) + +pkg_zip( + name = "test_mappings_zip", + srcs = [ + ":test_mappings", + "//kernel/tests/test_mappings:non_kernel_test_mappings", + ], + out = "test_mappings.zip", + visibility = ["//common-modules/virtual-device:__pkg__"], )