1

tests: add linux_arm64_musl, simplify BUILD

This commit is contained in:
Motiejus Jakštys 2022-10-03 07:22:23 +03:00
parent c9d2442143
commit c5e3c25015

View File

@ -13,9 +13,9 @@ cc_binary(
platform_binary( platform_binary(
name = "which_libc_{}".format(name), name = "which_libc_{}".format(name),
src = "which_libc", src = "which_libc",
env = {"QEMU_LD_PREFIX": "/usr/aarch64-linux-gnu"} if is_arm64 else {}, env = {"QEMU_LD_PREFIX": "/usr/aarch64-linux-gnu"} if "arm64" in name else {},
platform = platform, platform = platform,
run_under = "qemu-aarch64-static" if is_arm64 else "", run_under = "qemu-aarch64-static" if "arm64" in name else "",
), ),
sh_test( sh_test(
name = "test_libc_{}".format(name), name = "test_libc_{}".format(name),
@ -27,11 +27,12 @@ cc_binary(
}, },
), ),
) )
for name, platform, want, is_arm64 in [ for name, platform, want in [
("linux_amd64_musl", "//libc_aware/platform:linux_amd64_musl", "non-glibc", False), ("linux_amd64_musl", "//libc_aware/platform:linux_amd64_musl", "non-glibc"),
("linux_amd64_gnu.2.19", "//libc_aware/platform:linux_amd64_gnu.2.19", "glibc_2.19", False), ("linux_amd64_gnu.2.19", "//libc_aware/platform:linux_amd64_gnu.2.19", "glibc_2.19"),
("linux_amd64_gnu.2.28", "//libc_aware/platform:linux_amd64_gnu.2.28", "glibc_2.28", False), ("linux_amd64_gnu.2.28", "//libc_aware/platform:linux_amd64_gnu.2.28", "glibc_2.28"),
("linux_amd64", "//platform:linux_amd64", "glibc_2.19", False), ("linux_arm64_musl", "//libc_aware/platform:linux_arm64_musl", "non-glibc"),
("linux_arm64", "//platform:linux_arm64", "glibc_2.28", True), ("linux_amd64", "//platform:linux_amd64", "glibc_2.19"),
("linux_arm64", "//platform:linux_arm64", "glibc_2.28"),
] ]
] ]