Lightweight coding agent that runs in your terminal
Rust
test: set Rust test thread stack size (#19067)
Michael Boline8ba912fcc99
diff --git a/.bazelrc b/.bazelrcindex 112c2301e2..30d9ad9d34 100644--- a/.bazelrc+++ b/.bazelrc@@ -33,6 +33,10 @@ common:windows --test_env=PATHcommon:windows --test_env=SYSTEMROOTcommon:windows --test_env=COMSPECcommon:windows --test_env=WINDIR+# Rust's libtest harness runs test bodies on std-spawned threads. The default+# 2 MiB stack can be too small for large async test futures on Windows CI; see+# https://github.com/openai/codex/pull/19067 for the motivating failure.+common --test_env=RUST_MIN_STACK=8388608 # 8 MiBcommon --test_output=errorscommon --bes_results_url=https://app.buildbuddy.io/invocation/diff --git a/.github/workflows/rust-ci-full.yml b/.github/workflows/rust-ci-full.ymlindex 7cda682952..eb690a9bad 100644--- a/.github/workflows/rust-ci-full.yml+++ b/.github/workflows/rust-ci-full.yml@@ -76,6 +76,8 @@ jobs:- name: Test argument comment lint packageworking-directory: tools/argument-comment-lintrun: cargo test+ env:+ RUST_MIN_STACK: "8388608" # 8 MiBargument_comment_lint_prebuilt:name: Argument comment lint - ${{ matrix.name }}@@ -671,6 +673,7 @@ jobs:run: cargo nextest run --no-fail-fast --target ${{ matrix.target }} --cargo-profile ci-test --timingsenv:RUST_BACKTRACE: 1+ RUST_MIN_STACK: "8388608" # 8 MiBNEXTEST_STATUS_LEVEL: leak- name: Upload Cargo timings (nextest)diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.ymlindex f62e5458a3..42a3ca8764 100644--- a/.github/workflows/rust-ci.yml+++ b/.github/workflows/rust-ci.yml@@ -131,6 +131,8 @@ jobs:- name: Test argument comment lint packageworking-directory: tools/argument-comment-lintrun: cargo test+ env:+ RUST_MIN_STACK: "8388608" # 8 MiBargument_comment_lint_prebuilt:name: Argument comment lint - ${{ matrix.name }}diff --git a/defs.bzl b/defs.bzlindex d1e38ea91b..71a3138418 100644--- a/defs.bzl+++ b/defs.bzl@@ -18,11 +18,11 @@ PLATFORMS = [WINDOWS_RUSTC_LINK_FLAGS = select({"@rules_rs//rs/experimental/platforms/constraints:windows_gnullvm": ["-C",- "link-arg=-Wl,--stack,8388608",+ "link-arg=-Wl,--stack,8388608", # 8 MiB],"@rules_rs//rs/experimental/platforms/constraints:windows_msvc": ["-C",- "link-arg=/STACK:8388608",+ "link-arg=/STACK:8388608", # 8 MiB"-C","link-arg=/NODEFAULTLIB:libucrt.lib","-C",diff --git a/justfile b/justfileindex d44bbda21d..ca74c2e5c6 100644--- a/justfile+++ b/justfile@@ -1,6 +1,8 @@set working-directory := "codex-rs"set positional-arguments+rust_min_stack := "8388608" # 8 MiB+# Display helphelp:just -l@@ -49,7 +51,7 @@ install:# Prefer this for routine local runs. Workspace crate features are banned, so# there should be no need to add `--all-features`.test:- cargo nextest run --no-fail-fast+ RUST_MIN_STACK={{ rust_min_stack }} cargo nextest run --no-fail-fast# Build and run Codex from source using Bazel.# Note we have to use the combination of `[no-cd]` and `--run_under="cd $PWD &&"`