mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
Generate separate Bazel test labels for selected large Rust test targets so BuildBuddy can report timing and flakiness per shard. Keep the original aggregate target names as test_suites over the generated shard targets. For integration tests, compile one manual *-all-test-bin rust_test and make each shard label a lightweight wrapper around that binary. This preserves distinct BuildBuddy labels without compiling the same test crate once per shard. Patch the pinned rules_rust archive with the stable name-hash sharding, explicit RULES_RUST_TEST_* env support, Windows manifest fallback, Windows-safe PowerShell UInt32 masking, and isolated Windows shard temp files from hermeticbuild/rules_rust#14 until Codex can bump to a merged rules_rust commit that contains it. Co-authored-by: Codex <noreply@openai.com>
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
load("@apple_support//xcode:xcode_config.bzl", "xcode_config")
|
|
|
|
xcode_config(name = "disable_xcode")
|
|
|
|
# We mark the local platform as glibc-compatible so that rust can grab a toolchain for us.
|
|
# TODO(zbarsky): Upstream a better libc constraint into rules_rust.
|
|
# We only enable this on linux though for sanity, and because it breaks remote execution.
|
|
platform(
|
|
name = "local_linux",
|
|
constraint_values = [
|
|
# We mark the local platform as glibc-compatible because musl-built rust cannot dlopen proc macros.
|
|
"@llvm//constraints/libc:gnu.2.28",
|
|
],
|
|
parents = ["@platforms//host"],
|
|
)
|
|
|
|
platform(
|
|
name = "local_windows",
|
|
constraint_values = [
|
|
"@rules_rs//rs/experimental/platforms/constraints:windows_gnullvm",
|
|
],
|
|
parents = ["@platforms//host"],
|
|
)
|
|
|
|
platform(
|
|
name = "local_windows_msvc",
|
|
constraint_values = [
|
|
"@rules_rs//rs/experimental/platforms/constraints:windows_msvc",
|
|
],
|
|
parents = ["@platforms//host"],
|
|
)
|
|
|
|
alias(
|
|
name = "rbe",
|
|
actual = "@rbe_platform",
|
|
)
|
|
|
|
exports_files([
|
|
"AGENTS.md",
|
|
"test_binary_test_launcher.bat.tpl",
|
|
"test_binary_test_launcher.sh.tpl",
|
|
"workspace_root_test_launcher.bat.tpl",
|
|
"workspace_root_test_launcher.sh.tpl",
|
|
])
|