Skip to content

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

fix(ci): use --tests instead of --all-targets for nextest coverage

Steven Enamakel6173fc95da26
diff --git a/scripts/__tests__/rust-coverage-status.test.mjs b/scripts/__tests__/rust-coverage-status.test.mjs
index aed5620aeb..725cf2f2f3 100644
--- a/scripts/__tests__/rust-coverage-status.test.mjs
+++ b/scripts/__tests__/rust-coverage-status.test.mjs
@@ -305,7 +305,7 @@ test("private coverage executes every package configuration once and reports aft
// resolves (and builds) the core and its dependencies once for all of them.
const unified = selections.filter((line) =>
line.includes(
- "--features channels --no-report --no-fail-fast -p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --all-targets -E ",
+ "--features channels --no-report --no-fail-fast -p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --tests -E ",
),
);
assert.equal(unified.length, 4);
@@ -377,7 +377,7 @@ test("CLI inventory sends product features only to nextest, preserving instrumen
done
printf '%s\\n' 'export INVENTORY_INSTRUMENTED=1' 'export CARGO_TARGET_DIR=instrumented-target'
elif [[ "$*" == *"nextest list"* ]]; then
- [[ "$*" == *"--features channels,modules -p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --all-targets -E package(=openhuman-cli) & kind(test)"* ]] || return 65
+ [[ "$*" == *"--features channels,modules -p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --tests -E package(=openhuman-cli) & kind(test)"* ]] || return 65
[[ "$INVENTORY_INSTRUMENTED" == 1 && "$CARGO_TARGET_DIR" == instrumented-target && "$CARGO_BUILD_TARGET_DIR" == preserved-target ]] || return 66
else return 67
fi
@@ -468,7 +468,13 @@ test("nextest product suites share one Cargo argument set and differ only in the
const args = source.match(/^UNIFIED_PRODUCT_ARGS=\((.*)\)$/m)[1];
assert.equal(
args,
- "-p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --all-targets",
+ '-p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli "${SUITE_TARGETS[@]}"',
+ );
+ // Under nextest only test targets are built: examples run nothing yet each
+ // links the whole instrumented core and stays on the scratch disk.
+ assert.match(
+ source,
+ /if \[ "\$\{OH_COV_RUNNER:-cargo\}" = "nextest" \]; then\n SUITE_TARGETS=\(--tests\)\nelse\n SUITE_TARGETS=\(--all-targets\)\nfi/,
);
// Exact package matches: `package(openhuman)` alone would be a glob of the name.
for (const value of [
@@ -482,7 +488,7 @@ test("nextest product suites share one Cargo argument set and differ only in the
// feature suites keep their own resolutions.
assert.doesNotMatch(source, /-p openhuman-cli --tests/);
- assert.match(source, /suite "openhuman-rpc" llvm_cov_package .*-p openhuman-rpc --all-targets/);
- assert.match(source, /suite "openhuman-tui" llvm_cov_package .*-p openhuman-tui --all-targets/);
- assert.match(source, /suite "openhuman-embed \(default\)" llvm_cov_package .*-p openhuman-embed --all-targets/);
+ assert.match(source, /suite "openhuman-rpc" llvm_cov_package .*-p openhuman-rpc "\\$\\{SUITE_TARGETS\\[@\\]\\}"/);
+ assert.match(source, /suite "openhuman-tui" llvm_cov_package .*-p openhuman-tui "\\$\\{SUITE_TARGETS\\[@\\]\\}"/);
+ assert.match(source, /suite "openhuman-embed \(default\)" llvm_cov_package .*-p openhuman-embed "\$\{SUITE_TARGETS\[@\]\}"/);
});
diff --git a/scripts/ci/rust-coverage.sh b/scripts/ci/rust-coverage.sh
index 3dfbda42ae..c1ff5dedff 100755
--- a/scripts/ci/rust-coverage.sh
+++ b/scripts/ci/rust-coverage.sh
@@ -325,7 +325,7 @@ fi
if [ "${OH_COV_RUNNER:-cargo}" = "nextest" ]; then
# Contributor/default features are distinct from product features. Keep both
# configurations instrumented rather than dropping the default-only surface.
- suite "openhuman-embed (default)" llvm_cov_package --no-report --no-fail-fast -p openhuman-embed --all-targets
+ suite "openhuman-embed (default)" llvm_cov_package --no-report --no-fail-fast -p openhuman-embed "${SUITE_TARGETS[@]}"
suite "openhuman-tinyhumans (default)" llvm_cov_package --no-report --no-fail-fast -p openhuman-tinyhumans "${SUITE_TARGETS[@]}"
fi
# The terminal frontend builds the core a third time (default features, not the