Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .repository-projection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"projection": "deixic-code",
"projectionSchemaVersion": 1,
"sourceRepository": "dx-corp/mono",
"sourceSha": "286d0a37ebf99fa22738837904ad8e9f2b3b111b",
"sourceSha": "96e2e00c3b5a535cc34dd60bbf22b924ad0cc0ee",
"destinationRepository": "dx-corp/code",
"priorProjectedBase": "286f11a74b63db13a1acd5b4734a431f224e002c",
"priorProjectedBase": "2ff7d9a69b373c2a5e89899f6a66a2b07b512e9f",
"definitionDigest": "82936441c776e3e8edb5d215a75007ec9714a233f489d460075d79d5ef5ba32f",
"toolDigest": "f8cb071b0f27267120ccf45a00d0982f45113bd23535bef6a1555b4933f99f13",
"contentDigest": "5d1b37000892e79eded38fcd977ec4da312724f0f21f5c1aedf39ac65a3b440b",
"contentDigest": "5d25cf149401790bbe192852c5372b94847eaabb338898798e44243874233f03",
"publicationEligible": true
}
41 changes: 41 additions & 0 deletions scripts/check-ci-concurrency.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,47 @@ const setupRust = readFileSync(
"utf8",
);

test("coverage sends the CI profile to Nextest rather than test binaries", () => {
const root = mkdtempSync(join(tmpdir(), "maestro-coverage-routing-"));
try {
const bin = join(root, "bin");
mkdirSync(bin);
const calls = join(root, "calls.jsonl");
writeFileSync(join(bin, "cargo"), `#!/usr/bin/env node
const fs = require('node:fs');
const args = process.argv.slice(2);
if (args.join(' ') === 'llvm-cov --version') { console.log('cargo-llvm-cov 0.9.0'); process.exit(0); }
if (args.join(' ') === 'nextest --version') { console.log('cargo-nextest 0.9.143'); process.exit(0); }
fs.appendFileSync(process.env.COVERAGE_CALLS, JSON.stringify({args, target:process.env.CARGO_TARGET_DIR}) + '\\n');
if (args[1] === 'nextest' && args.includes('--')) { console.error('Nextest received unsupported test-binary arguments'); process.exit(96); }
`, { mode: 0o755 });
for (const tool of ["cargo-llvm-cov", "cargo-nextest"]) {
writeFileSync(join(bin, tool), "#!/bin/sh\nexit 0\n", { mode: 0o755 });
}
writeFileSync(join(bin, "timeout"), "#!/bin/sh\nshift\nshift\nshift\nexec \"$@\"\n", { mode: 0o755 });
const result = spawnSync("bash", [fileURLToPath(new URL("./run-ci-coverage.sh", import.meta.url))], {
cwd: root,
encoding: "utf8",
env: { ...process.env, PATH: `${bin}:${process.env.PATH}`, MAESTRO_CI_CACHE_ROOT: join(root, "cache"), COVERAGE_CALLS: calls },
});
assert.equal(result.status, 0, result.stderr);
const recorded = readFileSync(calls, "utf8").trim().split("\n").map(JSON.parse);
const run = recorded[0];
assert.deepEqual(run.args.slice(0, 2), ["llvm-cov", "nextest"]);
assert.equal(run.args[run.args.indexOf("--profile") + 1], "ci");
for (const flag of ["--workspace", "--lib", "--locked", "--no-clean", "--ignore-run-fail", "--no-fail-fast"]) {
assert.ok(run.args.includes(flag), `missing coverage option ${flag}`);
}
assert.equal(run.target, join(root, "cache", "cargo-target-cov"));
assert.deepEqual(recorded.slice(1).map(call => call.args), [
["llvm-cov", "report", "--summary-only"],
["llvm-cov", "report", "--lcov", "--output-path", "coverage-report/lcov.info"],
]);
} finally {
rmSync(root, { recursive: true, force: true });
}
});

test("maestro-ci concurrency is per ref and cancels in-progress PR runs", () => {
assert.match(
workflow,
Expand Down
1 change: 0 additions & 1 deletion scripts/run-ci-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@
--locked \
--no-clean \
--ignore-run-fail \
-- \
--profile ci \
--no-fail-fast

Check failure on line 66 in scripts/run-ci-coverage.sh

View workflow job for this annotation

GitHub Actions / unresolved-review-threads / unresolved-review-threads

unresolved P1 review thread

Check failure on line 66 in scripts/run-ci-coverage.sh

View workflow job for this annotation

GitHub Actions / unresolved-review-threads / unresolved-review-threads

unresolved P1 review thread

Comment on lines 64 to 66

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove the duplicate Nextest failure-mode flag

With -- gone, --no-fail-fast is parsed as a Nextest option. In cargo-llvm-cov 0.9.0, --ignore-run-fail first invokes cargo nextest run --no-run and then appends --no-fail-fast; forwarding another one produces --no-run --no-fail-fast on the first call, which cargo-nextest declares conflicting, so every scheduled or manually dispatched coverage job exits before generating a report. Drop the explicit flag while retaining direct --profile ci. cargo-llvm-cov implementation, cargo-nextest option definition

Useful? React with 👍 / 👎.


cargo llvm-cov report --summary-only
mkdir -p coverage-report
Expand Down
Loading