summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoan Touzet <wohali@apache.org>2017-03-17 19:08:33 -0400
committerJoan Touzet <wohali@apache.org>2017-03-17 19:08:33 -0400
commitfe16873de170f08beae90116fc5e0126eb22cf43 (patch)
tree92bead867e647048816b5a54a8f508b3acb4ab31
parentd9ab78e109a9c4b98e33eceef2f6bb1886d749d7 (diff)
downloadcouchdb-fe16873de170f08beae90116fc5e0126eb22cf43.tar.gz
Count JS test pass/fails; return proper exit code
-rwxr-xr-xtest/javascript/run16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/javascript/run b/test/javascript/run
index 458f75b0a..ada4db5b4 100755
--- a/test/javascript/run
+++ b/test/javascript/run
@@ -92,6 +92,7 @@ def run_couchjs(test, fmt):
sys.stderr.write(line)
p.wait()
fmt(p.returncode == 0)
+ return p.returncode
def options():
@@ -132,8 +133,21 @@ def main():
tests = tmp
fmt = mkformatter(tests)
+ passed = 0
+ failed = 0
for test in tests:
- run_couchjs(test, fmt)
+ result = run_couchjs(test, fmt)
+ if result == 0:
+ passed += 1
+ else:
+ failed += 1
+
+ sys.stderr.write("======================================================="
+ + os.linesep)
+ sys.stderr.write("JavaScript tests complete." + os.linesep)
+ sys.stderr.write(" Failed: {}. Skipped or passed: {}.".format(
+ failed, passed) + os.linesep)
+ exit(failed > 0)
if __name__ == "__main__":