Skip to content

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

feat(ci): add rust coverage script

Steven Enamakel2f863702d3cd
diff --git a/scripts/ci/rust-coverage.sh b/scripts/ci/rust-coverage.sh
index a3feba3000..2955546fa7 100755
--- a/scripts/ci/rust-coverage.sh
+++ b/scripts/ci/rust-coverage.sh
@@ -353,12 +353,21 @@ if [ "${OH_COV_RUNNER:-cargo}" = "nextest" ]; then
if [ -s "${expected_targets}" ]; then
expected_inventory="${PWD}/ci-out/nextest/cli-inventory.json"
# Listing executes no tests. cargo-llvm-cov supplies the same wrapper and
- # instrumentation environment, so Cargo can reuse this CLI test build.
+ # instrumentation environment, but show-env leaves Cargo on the plain
+ # target dir while `cargo llvm-cov nextest` builds in its llvm-cov-target
+ # subdir. Without the explicit --target-dir the listing re-instrumented
+ # the whole graph a second time (578 crates, +53 GB on the EX63 scratch
+ # disk in run 39315551099, which then filled it). Listing also launches
+ # each instrumented binary; keep those profiles out of the report.
cli_inventory() (
inventory_env="$(bash scripts/ci-cancel-aware.sh cargo llvm-cov show-env --sh)" || exit $?
eval "${inventory_env}"
+ inventory_profiles="${PWD}/ci-out/nextest/cli-inventory-profraw"
+ export LLVM_PROFILE_FILE="${inventory_profiles}/list-%p.profraw"
bash scripts/ci-cancel-aware.sh cargo nextest list --message-format json --features "${CORE_PRODUCT_FEATURES}" \
+ --target-dir "${CARGO_LLVM_COV_TARGET_DIR}/llvm-cov-target" \
"${UNIFIED_PRODUCT_ARGS[@]}" -E "${FILTER_CLI_TESTS}" >"${expected_inventory}"
+ rm -rf "${inventory_profiles}"
)
suite "openhuman-cli test inventory" cli_inventory
fi