diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-12-06 10:40:38 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-12-06 10:40:38 +0100 |
| commit | 4c1e24beb7dcf9b838f3b4963b527747c8a4e682 (patch) | |
| tree | adc25fa44456a3ba5431e2f597036e8c569abec4 /src/tools/rustdoc-gui/tester.js | |
| parent | 87dce6e8dfdae605c9c2a713cf0133066a52022a (diff) | |
| download | rust-4c1e24beb7dcf9b838f3b4963b527747c8a4e682.tar.gz rust-4c1e24beb7dcf9b838f3b4963b527747c8a4e682.zip | |
Improve code for rustdoc-gui tester
Diffstat (limited to 'src/tools/rustdoc-gui/tester.js')
| -rw-r--r-- | src/tools/rustdoc-gui/tester.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/rustdoc-gui/tester.js b/src/tools/rustdoc-gui/tester.js index 3feb4940d87..32340ec7eec 100644 --- a/src/tools/rustdoc-gui/tester.js +++ b/src/tools/rustdoc-gui/tester.js @@ -133,7 +133,7 @@ async function main(argv) { // Print successful tests too let debug = false; // Run tests in sequentially - let no_headless = false; + let headless = true; const options = new Options(); try { // This is more convenient that setting fields one by one. @@ -150,7 +150,7 @@ async function main(argv) { } if (opts["no_headless"]) { args.push("--no-headless"); - no_headless = true; + headless = false; } options.parseArguments(args); } catch (error) { @@ -172,7 +172,7 @@ async function main(argv) { } files.sort(); - if (no_headless) { + if (!headless) { opts["jobs"] = 1; console.log("`--no-headless` option is active, disabling concurrency for running tests."); } @@ -181,7 +181,7 @@ async function main(argv) { if (opts["jobs"] < 1) { process.setMaxListeners(files.length + 1); - } else if (!no_headless) { + } else if (headless) { process.setMaxListeners(opts["jobs"] + 1); } @@ -226,7 +226,7 @@ async function main(argv) { await Promise.race(tests_queue); } } - if (!no_headless && tests_queue.length > 0) { + if (tests_queue.length > 0) { await Promise.all(tests_queue); } status_bar.finish(); |
