Skip to content

Commit

Permalink
Merge pull request #848 from pablochacin/prevent-duplicated-test-output
Browse files Browse the repository at this point in the history
CI: Remove duplicated output when test fails
  • Loading branch information
pablochacin authored Nov 22, 2019
2 parents 622bb5c + 5e0e045 commit 4db021f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ci/infra/testrunner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ optional arguments:
test file name
-t TEST, --test TEST test to execute
-l, --list only list tests to be executed
-v, --verbose show all output
-v, --verbose show all output from testrunner libraries
--skip-setup {provisioned,bootstrapped,deployed}
Skip the given setup step. 'provisioned' For when you
have already provisioned the nodes. 'bootstrapped' For
Expand Down
2 changes: 1 addition & 1 deletion ci/infra/testrunner/testrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def main():
test_args.add_argument("-l", "--list", dest="collect", action="store_true", default=False,
help="only list tests to be executed")
test_args.add_argument("-v", "--verbose", dest="verbose", action="store_true", default=False,
help="show all output")
help="show all output from testrunner libraries")
test_args.add_argument("--skip-setup",
choices=['provisioned', 'bootstrapped', 'deployed'],
help="Skip the given setup step.\n"
Expand Down
10 changes: 9 additions & 1 deletion ci/infra/testrunner/tests/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@


class PyTestOpts:

NO_CAPTURE_LOGS = "--show-capture=no"

SHOW_OUTPUT = "-s"

VERBOSE = "-v"
Expand All @@ -32,7 +35,12 @@ def run(self, module=None, test_suite=None,

if verbose:
opts.append(PyTestOpts.SHOW_OUTPUT)
opts.append(PyTestOpts.VERBOSE)

# Dont capture logs
opts.append(PyTestOpts.NO_CAPTURE_LOGS)

# generete detailed test results
opts.append(PyTestOpts.VERBOSE)

if collect:
opts.append(PyTestOpts.COLLECT_TESTS)
Expand Down

0 comments on commit 4db021f

Please sign in to comment.