Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 57fec1a

Browse files
author
Joe Fradley
committed
ANDROID: Remove 32bit test config and clean up zip
Removed 32bit test configs from packaging (x86 and arm) in tests.zip, leaving the appropriate 64bit config in the `selftests` as the primary config. Removed unneeded directory nesting. Used newly available rules_pkg functionality. Example tests.zip layout for x86_64: Archive: bazel-bin/common/x86_64/tests.zip Length Date Time Name --------- ---------- ----- ---- 0 1980-01-01 00:00 testcases/ 0 1980-01-01 00:00 testcases/selftests/ 9528 1980-01-01 00:00 testcases/selftests/selftests.config 0 1980-01-01 00:00 testcases/selftests/x86/ 13648 1980-01-01 00:00 testcases/selftests/x86/futex_requeue 21536 1980-01-01 00:00 testcases/selftests/x86/futex_requeue_pi <truncated> 0 1980-01-01 00:00 testcases/selftests/x86_64/ 13648 1980-01-01 00:00 testcases/selftests/x86_64/futex_requeue <truncated> Bug: 291147200 Test run: https://android-build.corp.google.com/builds/abtd/run/L61900030001467849 Signed-off-by: Joe Fradley <joefradley@google.com> (cherry picked from https://android-review.googlesource.com/q/commit:c4a0b52f7850ef406a83e9f9691140d6eff35ee0) Merged-In: I4f657c79128c37c809e2e3957df64f85baaca2d9 Change-Id: I4f657c79128c37c809e2e3957df64f85baaca2d9
1 parent 37e90c8 commit 57fec1a

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

BUILD.bazel

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33

44
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
55
load("@bazel_skylib//rules:write_file.bzl", "write_file")
6+
load(
7+
"@rules_pkg//pkg:mappings.bzl",
8+
"pkg_files",
9+
"strip_prefix",
10+
)
11+
load("@rules_pkg//pkg:pkg.bzl", "pkg_zip")
612
load("//build/bazel_common_rules/dist:dist.bzl", "copy_to_dist_dir")
7-
load("//build/bazel_common_rules/zip:zip.bzl", "zip_archive")
813
load("//build/kernel/kleaf:common_kernels.bzl", "define_common_kernels")
914
load("//build/kernel/kleaf:constants.bzl", "X86_64_OUTS")
1015
load(
@@ -2165,7 +2170,6 @@ android_filegroup(
21652170
":kselftest_futex_futex_wait_uninitialized_heap_x86",
21662171
":kselftest_futex_futex_wait_wouldblock_x86",
21672172
":kselftest_futex_futex_wait_x86",
2168-
":kselftest_gen_config",
21692173
":kselftest_kcmp_kcmp_test_x86",
21702174
":kselftest_mm_compaction_test_x86",
21712175
":kselftest_mm_hugepage_mmap_x86",
@@ -2235,7 +2239,6 @@ android_filegroup(
22352239
":kselftest_futex_futex_wait_timeout_arm",
22362240
":kselftest_futex_futex_wait_uninitialized_heap_arm",
22372241
":kselftest_futex_futex_wait_wouldblock_arm",
2238-
":kselftest_gen_config",
22392242
":kselftest_kcmp_kcmp_test_arm",
22402243
":kselftest_mm_compaction_test_arm",
22412244
":kselftest_mm_hugepage_mmap_arm",
@@ -2349,22 +2352,36 @@ android_filegroup(
23492352
visibility = ["//visibility:private"],
23502353
)
23512354

2352-
zip_archive(
2353-
name = "tests_zip_x86_64",
2355+
pkg_files(
2356+
name = "kselftest_tests_x86_64_pkg_files",
23542357
srcs = [
23552358
":kselftest_tests_x86",
23562359
":kselftest_tests_x86_64",
23572360
],
2358-
out = "tests.zip",
2361+
strip_prefix = strip_prefix.from_pkg(),
2362+
visibility = ["//visibility:private"],
23592363
)
23602364

2361-
zip_archive(
2362-
name = "tests_zip_arm64",
2365+
pkg_files(
2366+
name = "kselftest_tests_arm64_pkg_files",
23632367
srcs = [
23642368
":kselftest_tests_arm",
23652369
":kselftest_tests_arm64",
23662370
],
2367-
out = "tests.zip",
2371+
strip_prefix = strip_prefix.from_pkg(),
2372+
visibility = ["//visibility:private"],
2373+
)
2374+
2375+
pkg_zip(
2376+
name = "tests_zip_x86_64",
2377+
srcs = [":kselftest_tests_x86_64_pkg_files"],
2378+
out = "x86_64/tests.zip",
2379+
)
2380+
2381+
pkg_zip(
2382+
name = "tests_zip_arm64",
2383+
srcs = [":kselftest_tests_arm64_pkg_files"],
2384+
out = "arm64/tests.zip",
23682385
)
23692386

23702387
copy_to_dist_dir(

0 commit comments

Comments
 (0)