Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

ci: resolve selected Rust binaries for confined tool tests

Toyo Saga8b61f8165b53
diff --git a/scripts/ci/rust-coverage.sh b/scripts/ci/rust-coverage.sh
index c7399fe25c..068946b776 100755
--- a/scripts/ci/rust-coverage.sh
+++ b/scripts/ci/rust-coverage.sh
@@ -9,6 +9,16 @@ set -euo pipefail
OUT="${OUT:-lcov-core.info}"
PRODUCT_FEATURES="$(bash scripts/ci/product-features.sh)"
+# Sandboxed acting-tool tests deliberately do not forward RUSTUP_HOME. The
+# container installs Rust outside HOME, so its rustup proxy otherwise tries
+# to create ~/.rustup inside the write-confined jail. Put the already selected
+# toolchain binaries first; cargo --version then needs no rustup home writes.
+# Keep cargo-installed subcommands on PATH after the toolchain directory.
+if command -v rustup >/dev/null 2>&1; then
+ COV_TOOLCHAIN_CARGO="$(rustup which cargo)"
+ export PATH="$(dirname "$COV_TOOLCHAIN_CARGO"):$PATH"
+fi
+
log() { echo "[ci][rust-cov] $*"; }
# cargo-llvm-cov owns RUSTFLAGS while it instruments crates. Keeping the