Cscott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/60370
Change subject: Fix runtests.sh, broken by commit 3af9e66c12d80.
......................................................................
Fix runtests.sh, broken by commit 3af9e66c12d80.
Exiting with non-zero status breaks runtests.sh. Add a new --exit-zero
option to parserTests so we still exit 1 for exceptions, but not for
ordinary test failures.
Change-Id: Ib5e9d093b0d29fd567df1acc8f74020275e61411
---
M js/tests/parserTests.js
M js/tests/runtests.sh
2 files changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid
refs/changes/70/60370/1
diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index 4d2b381..9c866e4 100755
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -292,6 +292,11 @@
'boolean': false,
'default': ""
},
+ 'exit-zero': {
+ description: "Don't exit with nonzero status if
failures are found.",
+ 'default': false,
+ 'boolean': true
+ },
xml: {
description: 'Print output in JUnit XML format.',
'default': false,
@@ -1584,6 +1589,9 @@
var failures = options.reportSummary( this.stats );
// we're done!
+ if ( booleanOption( options['exit-zero'] ) ) {
+ failures = false;
+ }
process.exit(failures ? 2 : 0); // exit status 1 == uncaught
exception
}
};
diff --git a/js/tests/runtests.sh b/js/tests/runtests.sh
index 66d05cd..380a732 100755
--- a/js/tests/runtests.sh
+++ b/js/tests/runtests.sh
@@ -12,7 +12,7 @@
}
cd $(dirname $0) # allow running this script from other dirs
-OPTS="--cache --color --no-blacklist"
+OPTS="--cache --color --no-blacklist --exit-zero"
CHANGES="--changesin selser.changes.json"
if [ ! -d results ];then
git init results
--
To view, visit https://gerrit.wikimedia.org/r/60370
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5e9d093b0d29fd567df1acc8f74020275e61411
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits