mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
## What changed Add `unit_test_srcs` to `codex_rust_crate` to exclude test-only modules from library and binary sources while making them available to unit tests through `compile_data`. Configure `codex-core` and `codex-tui` to use this option for their test modules and support files. GitOrigin-RevId: 437b5ddb75e66a96f3c5cb9b309cb0e2608ba169
35 lines
1015 B
Python
35 lines
1015 B
Python
load("//:defs.bzl", "MACOS_WEBRTC_RUSTC_LINK_FLAGS", "codex_rust_crate")
|
|
|
|
codex_rust_crate(
|
|
name = "tui",
|
|
binaries_with_build_commit = ["codex-tui"],
|
|
compile_data = glob([
|
|
"assets/**",
|
|
]),
|
|
crate_name = "codex_tui",
|
|
extra_binaries = [
|
|
"//codex-rs/cli:codex",
|
|
],
|
|
integration_compile_data_extra = ["src/test_backend.rs"],
|
|
rustc_flags_extra = MACOS_WEBRTC_RUSTC_LINK_FLAGS,
|
|
test_data_extra = glob([
|
|
"src/**/*.rs",
|
|
"src/**/snapshots/**",
|
|
"tests/fixtures/**",
|
|
]),
|
|
test_shard_counts = {
|
|
"tui-unit-tests": 8,
|
|
},
|
|
# The startup symlink test applies its own Seatbelt policy, which cannot be nested.
|
|
test_tags = ["no-sandbox"],
|
|
unit_test_srcs = glob([
|
|
"src/**/*_test_support.rs",
|
|
"src/**/*_tests.rs",
|
|
"src/**/*_tests/**/*.rs",
|
|
"src/**/test_fixtures.rs",
|
|
"src/**/test_support.rs",
|
|
"src/**/tests.rs",
|
|
"src/**/tests/**/*.rs",
|
|
]) + ["src/test_backend.rs"],
|
|
)
|