Skip to content

Commit

Permalink
Improve display of parallel jobs in rustdoc-gui tester script
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 16, 2023
1 parent 09eff44 commit 78f5269
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tools/rustdoc-gui/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,17 @@ async function main(argv) {
opts["jobs"] = 1;
console.log("`--no-headless` option is active, disabling concurrency for running tests.");
}

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

if (opts["jobs"] < 1) {
jobs = files.length;
process.setMaxListeners(files.length + 1);
} else if (headless) {
process.setMaxListeners(opts["jobs"] + 1);
}

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

// We catch this "event" to display a nicer message in case of unexpected exit (because of a
// missing `--no-sandbox`).
const exitHandling = () => {
Expand Down

0 comments on commit 78f5269

Please sign in to comment.