From e540aa08b4ed2a44b07c911287d392a9f3a068a2 Mon Sep 17 00:00:00 2001 From: Stefan Schindler Date: Thu, 1 Jul 2021 16:30:28 +0200 Subject: [PATCH] Review by @GuillaumeGomez Co-authored-by: Guillaume Gomez --- src/tools/rustdoc-gui/tester.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/tools/rustdoc-gui/tester.js b/src/tools/rustdoc-gui/tester.js index 69665693104..3f83aa425df 100644 --- a/src/tools/rustdoc-gui/tester.js +++ b/src/tools/rustdoc-gui/tester.js @@ -121,12 +121,12 @@ async function main(argv) { } files = files.filter(file => path.extname(file) == ".goml"); if (files.length === 0) { - console.log("rustdoc-gui: No test selected"); + console.error("rustdoc-gui: No test selected"); process.exit(2); } files.sort(); - console.log(`running ${files.length} rustdoc-gui tests`); + console.log(`Running ${files.length} rustdoc-gui tests...`); process.setMaxListeners(files.length + 1); let tests = []; let results = new Array(files.length); @@ -137,7 +137,6 @@ async function main(argv) { tests.push( runTest(testPath, options) .then(out => { - //console.log(i); const [output, nb_failures] = out; results[i] = { status: nb_failures === 0 ? RUN_SUCCESS : RUN_FAILED, @@ -186,14 +185,8 @@ async function main(argv) { }); // print run errors on the bottom so developers see them better results.forEach(r => { - switch (r.status) { - case RUN_SUCCESS: - case RUN_FAILED: - // skip - break; - case RUN_ERRORED: - console.error(r.output); - break; + if (r.status === RUN_ERRORED) { + console.error(r.output); } });