windows tests: move tests, get rid of wine-binfmt
This removes all other Bazel test commands, so all tests can be again tested with `bazel test ...`. Also, fixes linux-arm64 glibc tests. Until now they've worked only in CI. Now they work everywhere I tried.
This commit is contained in:
40
test/c/BUILD
40
test/c/BUILD
@@ -1,4 +1,4 @@
|
||||
load("@bazel-zig-cc//rules:platform.bzl", "platform_binary", "platform_test")
|
||||
load("@bazel-zig-cc//rules:platform.bzl", "platform_binary")
|
||||
|
||||
cc_binary(
|
||||
name = "which_libc",
|
||||
@@ -13,7 +13,9 @@ cc_binary(
|
||||
platform_binary(
|
||||
name = "which_libc_{}".format(name),
|
||||
src = "which_libc",
|
||||
env = {"QEMU_LD_PREFIX": "/usr/aarch64-linux-gnu"} if is_arm64 else {},
|
||||
platform = platform,
|
||||
run_under = "qemu-aarch64-static" if is_arm64 else "",
|
||||
),
|
||||
sh_test(
|
||||
name = "test_libc_{}".format(name),
|
||||
@@ -25,34 +27,12 @@ cc_binary(
|
||||
},
|
||||
),
|
||||
)
|
||||
for name, platform, want in [
|
||||
("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"),
|
||||
("linux_amd64_gnu.2.28", "//libc_aware/platform:linux_amd64_gnu.2.28", "glibc_2.28"),
|
||||
("linux_amd64_gnu.2.31", "//libc_aware/platform:linux_amd64_gnu.2.31", "glibc_2.31"),
|
||||
("linux_amd64", "//platform:linux_amd64", "glibc_2.19"),
|
||||
("linux_arm64", "//platform:linux_arm64", "glibc_2.28"),
|
||||
for name, platform, want, is_arm64 in [
|
||||
("linux_amd64_musl", "//libc_aware/platform:linux_amd64_musl", "non-glibc", False),
|
||||
("linux_amd64_gnu.2.19", "//libc_aware/platform:linux_amd64_gnu.2.19", "glibc_2.19", False),
|
||||
("linux_amd64_gnu.2.28", "//libc_aware/platform:linux_amd64_gnu.2.28", "glibc_2.28", False),
|
||||
("linux_amd64_gnu.2.31", "//libc_aware/platform:linux_amd64_gnu.2.31", "glibc_2.31", False),
|
||||
("linux_amd64", "//platform:linux_amd64", "glibc_2.19", False),
|
||||
("linux_arm64", "//platform:linux_arm64", "glibc_2.28", True),
|
||||
]
|
||||
]
|
||||
|
||||
cc_binary(
|
||||
name = "winver",
|
||||
srcs = ["main_winver.c"],
|
||||
target_compatible_with = [
|
||||
"@platforms//os:windows",
|
||||
],
|
||||
)
|
||||
|
||||
platform_test(
|
||||
name = "winver_windows_amd64",
|
||||
src = "winver",
|
||||
platform = "//platform:windows_amd64",
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
||||
platform_binary(
|
||||
name = "winver_windows_arm64",
|
||||
src = "winver",
|
||||
platform = "//platform:windows_arm64",
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user