Skip to content

Commit

Permalink
Unrolled build for rust-lang#116798
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#116798 - GuillaumeGomez:rustdoc-gui-tester-cleanup, r=notriddle

Improve display of parallel jobs in rustdoc-gui tester script

If no `-j` option is not passed to `x.py`, it would display `-1`, which isn't great.

r? `@notriddle`
  • Loading branch information
rust-timer authored Oct 17, 2023
2 parents 49691b1 + ad26a0b commit 06eddda
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/tools/rustdoc-gui/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,17 @@ async function main(argv) {
console.log("`--no-headless` option is active, disabling concurrency for running tests.");
}

console.log(`Running ${files.length} rustdoc-gui (${opts["jobs"]} concurrently) ...`);

if (opts["jobs"] < 1) {
const len = files.length;
console.log(
`Running ${len} rustdoc-gui (UNBOUNDED concurrency; use "-j#" for a limit) ...`,
);
process.setMaxListeners(files.length + 1);
} else if (headless) {
console.log(`Running ${files.length} rustdoc-gui (${opts["jobs"]} concurrently) ...`);
process.setMaxListeners(opts["jobs"] + 1);
} else {
console.log(`Running ${files.length} rustdoc-gui ...`);
}

// We catch this "event" to display a nicer message in case of unexpected exit (because of a
Expand Down

0 comments on commit 06eddda

Please sign in to comment.