C. Scott Ananian has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/340664 )
Change subject: Clean up parserTests output. ...................................................................... Clean up parserTests output. The whitelist is deprecated. Warn when it's used, not when it's missing. Print out the name of the test file in the results summary, and colorize it so we know which test files resulted in errors. Only emit the node version and initialization message once at startup. Change-Id: I443f80102007cc5b542f48fdc091bc41a8e35f88 --- M bin/parserTests.js M tests/parserTests.utils.js 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/64/340664/1 diff --git a/bin/parserTests.js b/bin/parserTests.js index 5d7030c..681f2e1 100755 --- a/bin/parserTests.js +++ b/bin/parserTests.js @@ -51,8 +51,8 @@ this.whiteListPath = path.resolve(parseFilePath.dir, whiteListName); try { this.testWhiteList = require(this.whiteListPath).testWhiteList; + console.warn('Using whitelist from ' + this.whiteListPath); } catch (e) { - console.warn('No whitelist found at ' + this.whiteListPath); this.testWhiteList = {}; } @@ -1492,6 +1492,7 @@ var ptests = new ParserTests(testFilePath, options.modes); return ptests.main(options, mockURL) .then(function(s) { + options.reportStart = function() { }; // quiet startup message return status + s; // Add up the status codes }); }, 0); diff --git a/tests/parserTests.utils.js b/tests/parserTests.utils.js index 04834b0..f98379c 100644 --- a/tests/parserTests.utils.js +++ b/tests/parserTests.utils.js @@ -50,9 +50,12 @@ var reportSummary = function(modesRan, stats, file, loggedErrorCount, testFilter) { var curStr, mode, thisMode; var failTotalTests = stats.failedTests; + var happiness = ( + stats.passedTestsUnexpected === 0 && stats.failedTestsUnexpected === 0 + ); console.log("=========================================================="); - console.log("SUMMARY: "); + console.log("SUMMARY:", happiness ? file.green : file.red); if (console.time && console.timeEnd) { console.timeEnd('Execution time'); } -- To view, visit https://gerrit.wikimedia.org/r/340664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I443f80102007cc5b542f48fdc091bc41a8e35f88 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: C. Scott Ananian <canan...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits