Skip to content

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

chore: files changed scripts/__tests__/rust-coverage-status.test.mjs

Steven Enamakelaf6feec96c4f
diff --git a/scripts/__tests__/rust-coverage-status.test.mjs b/scripts/__tests__/rust-coverage-status.test.mjs
index f1d9ce2771..8594c5f3cf 100644
--- a/scripts/__tests__/rust-coverage-status.test.mjs
+++ b/scripts/__tests__/rust-coverage-status.test.mjs
@@ -442,10 +442,11 @@ test("coverage inventory exceptions match the source gates and remain required a
});
test("nextest product suites share one Cargo argument set and differ only in their filter", () => {
- const source = fs.readFileSync(runner, "utf8");
+ // Join line continuations so each suite call reads as one command.
+ const source = fs.readFileSync(runner, "utf8").replace(/\\\n\s*/g, "");
const nextestOnly = (name) => {
const pattern = new RegExp(
- `suite "${name}" llvm_cov \\\\\\n?\\s*--no-report --no-fail-fast \\\\\\n?\\s*"\\$\\{UNIFIED_PRODUCT_ARGS\\[@\\]\\}" -E "\\$\\{(FILTER_[A-Z_]+)\\}"`,
+ `suite "${name}" llvm_cov --no-report --no-fail-fast "\\$\\{UNIFIED_PRODUCT_ARGS\\[@\\]\\}" -E "\\$\\{(FILTER_[A-Z_]+)\\}"`,
);
const match = source.match(pattern);
assert.ok(match, `${name} must use the unified product arguments`);
@@ -461,7 +462,7 @@ test("nextest product suites share one Cargo argument set and differ only in the
// The cli inventory is listed with the same arguments so it reuses the build.
assert.match(
source,
- /cargo nextest list .*\n\s*"\$\{UNIFIED_PRODUCT_ARGS\[@\]\}" -E "\$\{FILTER_CLI_TESTS\}"/,
+ /cargo nextest list .*"\$\{UNIFIED_PRODUCT_ARGS\[@\]\}" -E "\$\{FILTER_CLI_TESTS\}"/,
);
// One package set, whose cargo resolution unifies the core's features once.
const args = source.match(/^UNIFIED_PRODUCT_ARGS=\((.*)\)$/m)[1];
@@ -480,7 +481,7 @@ test("nextest product suites share one Cargo argument set and differ only in the
// The old per-package nextest selections are gone; rpc, tui and the default
// feature suites keep their own resolutions.
assert.doesNotMatch(source, /-p openhuman-cli --tests/);
- assert.doesNotMatch(source, /-p openhuman --lib --bins\n\s*else/);
+
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/);