Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

[codex] Speed up local nextest runs (#26479)

Adam Perry @ OpenAI6e7ab529297a
diff --git a/codex-rs/.config/nextest.toml b/codex-rs/.config/nextest.toml
index 01f4a98dc8..f3f3ca2607 100644
--- a/codex-rs/.config/nextest.toml
+++ b/codex-rs/.config/nextest.toml
@@ -8,12 +8,20 @@ retries = 1
[profile.default.junit]
path = "junit.xml"
+[profile.local]
+inherits = "default"
+
[test-groups.app_server_protocol_codegen]
max-threads = 1
[test-groups.app_server_integration]
max-threads = 1
+# Higher concurrency causes integration test timeouts under resource contention
+# on common developer machines.
+[test-groups.app_server_integration_local]
+max-threads = 4
+
[test-groups.core_apply_patch_cli_integration]
max-threads = 1
@@ -42,6 +50,12 @@ test-group = 'app_server_protocol_codegen'
filter = 'package(codex-app-server) & kind(test)'
test-group = 'app_server_integration'
+[[profile.local.overrides]]
+# Use up to four app-server subprocesses locally. The global nextest pool still
+# limits this to the machine's logical CPU count.
+filter = 'package(codex-app-server) & kind(test)'
+test-group = 'app_server_integration_local'
+
[[profile.default.overrides]]
# These tests exercise full Codex turns and apply_patch execution, and they are
# sensitive to Windows runner process-startup stalls when many cases launch at once.
diff --git a/justfile b/justfile
index 3b993b767d..fa32a19e7d 100644
--- a/justfile
+++ b/justfile
@@ -75,11 +75,11 @@ install:
# there should be no need to add `--all-features`.
[unix]
test *args:
- RUST_MIN_STACK={{ rust_min_stack }} cargo nextest run --no-fail-fast "$@"
+ RUST_MIN_STACK={{ rust_min_stack }} NEXTEST_PROFILE=local cargo nextest run --no-fail-fast "$@"
[windows]
test *args:
- $env:RUST_MIN_STACK = "{{ rust_min_stack }}"; cargo nextest run --no-fail-fast @($args | Select-Object -Skip 1)
+ $env:RUST_MIN_STACK = "{{ rust_min_stack }}"; $env:NEXTEST_PROFILE = "local"; cargo nextest run --no-fail-fast @($args | Select-Object -Skip 1)
# Run from the repository root so scripts that resolve paths from `cwd` see
# the same layout they use in GitHub Actions.