Fix 'cover' tox job fails for option --coverage not recognized

When running command tox -ecover, tox job will fail. the error message is

======================================================================
FAIL: process-returncode
tags: worker-0
----------------------------------------------------------------------
returncode 1
Ran 733 (+17) tests in 856.852s (+164.804s)
FAILED (id=6, failures=2, skips=7)
error: testr failed (1)
ERROR: InvocationError: '/home/github/mistral/.tox/py27/bin/python setup.py test
_____________________________________________________ summary __________________
ERROR:   py27: commands failed

Change-Id: I21a335992683aa94d2cf47c4a4fc0f43849dec9a
Closes-bug: #1724121
This commit is contained in:
junboli 2017-10-17 10:38:04 +08:00
parent a7502caefd
commit eaa667d4df
1 changed files with 8 additions and 1 deletions

View File

@ -31,7 +31,14 @@ setenv = PYTHONHASHSEED=0
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
setenv =
{[testenv]setenv}
PYTHON=coverage run --source qinling --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
whitelist_externals = rm