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

Change-Id: I4f657c79128c37c809e2e3957df64f85baaca2d9
Signed-off-by: Joe Fradley <joefradley@google.com>
This commit is contained in:
Joe Fradley
2024-01-19 06:57:10 -08:00
committed by Betty Zhou
parent 0511623cc9
commit c4a0b52f78
+26 -9
View File
@@ -3,8 +3,13 @@
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load(
"@rules_pkg//pkg:mappings.bzl",
"pkg_files",
"strip_prefix",
)
load("@rules_pkg//pkg:pkg.bzl", "pkg_zip")
load("//build/bazel_common_rules/dist:dist.bzl", "copy_to_dist_dir")
load("//build/bazel_common_rules/zip:zip.bzl", "zip_archive")
load("//build/kernel/kleaf:common_kernels.bzl", "define_common_kernels")
load("//build/kernel/kleaf:constants.bzl", "X86_64_OUTS")
load(
@@ -2132,7 +2137,6 @@ android_filegroup(
":kselftest_futex_futex_wait_uninitialized_heap_x86",
":kselftest_futex_futex_wait_wouldblock_x86",
":kselftest_futex_futex_wait_x86",
":kselftest_gen_config",
":kselftest_kcmp_kcmp_test_x86",
":kselftest_mm_compaction_test_x86",
":kselftest_mm_hugepage_mmap_x86",
@@ -2202,7 +2206,6 @@ android_filegroup(
":kselftest_futex_futex_wait_timeout_arm",
":kselftest_futex_futex_wait_uninitialized_heap_arm",
":kselftest_futex_futex_wait_wouldblock_arm",
":kselftest_gen_config",
":kselftest_kcmp_kcmp_test_arm",
":kselftest_mm_compaction_test_arm",
":kselftest_mm_hugepage_mmap_arm",
@@ -2316,22 +2319,36 @@ android_filegroup(
visibility = ["//visibility:private"],
)
zip_archive(
name = "tests_zip_x86_64",
pkg_files(
name = "kselftest_tests_x86_64_pkg_files",
srcs = [
":kselftest_tests_x86",
":kselftest_tests_x86_64",
],
out = "tests.zip",
strip_prefix = strip_prefix.from_pkg(),
visibility = ["//visibility:private"],
)
zip_archive(
name = "tests_zip_arm64",
pkg_files(
name = "kselftest_tests_arm64_pkg_files",
srcs = [
":kselftest_tests_arm",
":kselftest_tests_arm64",
],
out = "tests.zip",
strip_prefix = strip_prefix.from_pkg(),
visibility = ["//visibility:private"],
)
pkg_zip(
name = "tests_zip_x86_64",
srcs = [":kselftest_tests_x86_64_pkg_files"],
out = "x86_64/tests.zip",
)
pkg_zip(
name = "tests_zip_arm64",
srcs = [":kselftest_tests_arm64_pkg_files"],
out = "arm64/tests.zip",
)
copy_to_dist_dir(