mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why Daemon package tests copy full debug CLI packages. Running these I/O-heavy cases alongside other tests can increase shared-disk writeback pressure. ## What changed - Move package installation and replacement coverage into the `app_server_daemon_package` test binary, sharing daemon fixtures with the lifecycle tests. - Reserve all nextest test threads for each package test and add an exclusive Bazel target that runs the cases serially on Linux and macOS. - Hard-link the prepared fixture executable during package setup, while retaining real independent package copies in the installer. GitOrigin-RevId: 255ac8caf75d9eb61bafe68f1f9bcfa99ee72484
61 lines
1.8 KiB
Python
61 lines
1.8 KiB
Python
load("@crates//:data.bzl", "DEP_DATA")
|
|
load("@crates//:defs.bzl", "all_crate_deps")
|
|
load("@rules_rust//rust:defs.bzl", "rust_test")
|
|
load("//:defs.bzl", "MACOS_WEBRTC_RUSTC_LINK_FLAGS", "codex_rust_crate")
|
|
load("//bazel/platforms:release_binaries.bzl", "multiplatform_binaries")
|
|
load("//bazel/rules:e2e_benchmark.bzl", "codex_e2e_benchmark")
|
|
load("//bazel/rules:runtime_package.bzl", "release_binary")
|
|
|
|
codex_rust_crate(
|
|
name = "cli",
|
|
binaries_with_build_commit = ["codex"],
|
|
crate_name = "codex_cli",
|
|
extra_binaries = [
|
|
"//codex-rs/bwrap:bwrap",
|
|
],
|
|
rustc_flags_extra = MACOS_WEBRTC_RUSTC_LINK_FLAGS,
|
|
test_data_extra = glob(["src/**/snapshots/**"]),
|
|
)
|
|
|
|
# Real installation copies a full debug package. Run after other Bazel tests
|
|
# on the CI runner so remote executors do not amplify shared-disk writeback.
|
|
rust_test(
|
|
name = "cli-app_server_daemon_package-test",
|
|
timeout = "long",
|
|
srcs = [
|
|
"tests/app_server_daemon/package.rs",
|
|
"tests/app_server_daemon/support.rs",
|
|
],
|
|
args = ["--test-threads=1"],
|
|
crate_name = "app_server_daemon_package",
|
|
crate_root = "tests/app_server_daemon/package.rs",
|
|
data = [":codex"],
|
|
env = {"CARGO_BIN_EXE_codex": "$(rlocationpath :codex)"},
|
|
rustc_env = {"BAZEL_PACKAGE": "codex-rs/cli"},
|
|
rustc_flags = MACOS_WEBRTC_RUSTC_LINK_FLAGS,
|
|
tags = ["exclusive"],
|
|
target_compatible_with = select({
|
|
"@platforms//os:linux": [],
|
|
"@platforms//os:macos": [],
|
|
"//conditions:default": ["@platforms//:incompatible"],
|
|
}),
|
|
version = DEP_DATA["codex-rs/cli"]["version"],
|
|
deps = all_crate_deps(
|
|
normal = True,
|
|
normal_dev = True,
|
|
),
|
|
)
|
|
|
|
release_binary(
|
|
binary = ":codex",
|
|
)
|
|
|
|
multiplatform_binaries(
|
|
name = "codex",
|
|
)
|
|
|
|
codex_e2e_benchmark(
|
|
name = "codex-help",
|
|
binaries = [":codex"],
|
|
)
|