Improve display of parallel jobs in rustdoc-gui tester script

This commit is contained in:
Guillaume Gomez 2023-10-16 16:53:12 +02:00
parent 09eff44889
commit ad26a0b3dd

View file

@ -249,12 +249,17 @@ async function main(argv) {
console.log("`--no-headless` option is active, disabling concurrency for running tests."); 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) { 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); process.setMaxListeners(files.length + 1);
} else if (headless) { } else if (headless) {
console.log(`Running ${files.length} rustdoc-gui (${opts["jobs"]} concurrently) ...`);
process.setMaxListeners(opts["jobs"] + 1); 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 // We catch this "event" to display a nicer message in case of unexpected exit (because of a