diff options
author | Joan Touzet <joant@atypical.net> | 2017-05-10 18:45:19 -0400 |
---|---|---|
committer | Joan Touzet <joant@atypical.net> | 2017-05-10 21:30:57 -0400 |
commit | 38ba05bae28be091202f2231bc95cf72fbdc6fb8 (patch) | |
tree | 47283762f8f4b366564b81fde16555f56091b3a4 /test | |
parent | 3691c2edbc6603963b1b5ad1bf97dfb69886c4a6 (diff) | |
download | couchdb-upload-failed-logfiles.tar.gz |
Add auto log uploader for CI workflowupload-failed-logfiles
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')
-rwxr-xr-x | test/javascript/run | 6 |
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) |