Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/60999


Change subject: Be a little more obvious with outdated parserTests.txt warning.
......................................................................

Be a little more obvious with outdated parserTests.txt warning.

It's easy to lose the "out of date parserTests" warning at the top
of the scrollback when you get lots of errors and warnings.  Repeat
it at the bottom to be sure it's not missed.

Change-Id: I256f7d2fea491c5b773d6cca8bae336edfc5b279
---
M js/tests/parserTests.js
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/99/60999/1

diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index 9fde2f5..7ca38f7 100755
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -40,6 +40,7 @@
 
 // track files imported / required
 var fileDependencies = [];
+var parserTestsUpToDate = true;
 
 // Fetch up some of our wacky parser bits...
 
@@ -315,6 +316,7 @@
        // double check that test file is up-to-date with upstream
        var fetcher = require(__dirname+"/fetch-parserTests.txt.js");
        if (!fetcher.isUpToDate()) {
+               parserTestsUpToDate = false;
                console.warn("WARNING: parserTests.txt not up-to-date with 
upstream.");
        }
 
@@ -1223,6 +1225,14 @@
                                        " tests... " + "ALL TESTS 
PASSED!".green );
                }
        }
+       // repeat warning about out-of-date parser tests (we might have missed
+       // in at the top) and describe what to do about it.
+       if (!parserTestsUpToDate) {
+               console.log( 
"==========================================================");
+               console.warn( "WARNING:".red +
+                             " parserTests.txt not up-to-date with upstream." 
);
+               console.warn ("         Run fetch-parserTests.txt.js to 
update." );
+       }
        console.log( 
"==========================================================");
 
        return (stats.passedTestsUnexpected + stats.failedTestsUnexpected);

-- 
To view, visit https://gerrit.wikimedia.org/r/60999
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I256f7d2fea491c5b773d6cca8bae336edfc5b279
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <wikime...@cscott.net>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to