summaryrefslogtreecommitdiff
path: root/test/javascript/run
diff options
context:
space:
mode:
authorJoan Touzet <joant@atypical.net>2017-05-10 18:45:19 -0400
committerJoan Touzet <wohali@users.noreply.github.com>2017-05-15 17:40:44 -0400
commitd583a463704baaa497f0d1d15917a3a0a3ed4c4c (patch)
tree72e12f32477a3386ddcb1d35c8487fcbff22b96a /test/javascript/run
parent153f40fb6ad4c33aa5cbdf12b12944929a4cf1ab (diff)
downloadcouchdb-d583a463704baaa497f0d1d15917a3a0a3ed4c4c.tar.gz
Add auto log uploader for CI workflow
This commit is intended to improve failure analysis in Travis and Jenkins runs by uploading couch log files after failed test runs. A new script has been added that, upon invocation from the top-level directory, tars up all EUnit logfiles and the dev/logs/node1.log file. It then constructs a document based on the running environment (Travis, Jenkins, manual). The document is posted to a CouchDB instance running on couchdb-vm.apache.org with credentials passed in the COUCHAUTH environment variable. The .travis.yml file has been updated to install the script's prerequisites (python-requests) and with the secret credentials, and to instruct travis to run the log uploader after any test failure. Similar steps will be taken to reconfigure Jenkins after these changes are merged to master. The test/javascript/run harness had to be modified to terminate after the first failure. This is because each new test wipes the logfile of the previous run. All tests can still be run, regardless of failure, by specifing the -a/--all flag, however it is expected that the reduction in test suite execution time when a test fails will be appreciated by many.
Diffstat (limited to 'test/javascript/run')
-rwxr-xr-xtest/javascript/run6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/javascript/run b/test/javascript/run
index 10d00d83b..7f366ebed 100755
--- a/test/javascript/run
+++ b/test/javascript/run
@@ -99,7 +99,9 @@ def options():
return [
op.make_option("-s", "--start", metavar="FILENAME", default=None,
help="Start from the given filename if multiple files "
- "are passed")
+ "are passed"),
+ op.make_option("-a", "--all", action="store_true", dest="all",
+ help="Run all tests, even if one or more fail")
]
@@ -141,6 +143,8 @@ def main():
passed += 1
else:
failed += 1
+ if not opts.all:
+ break
sys.stderr.write("======================================================="
+ os.linesep)