mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Always combine and generate the XML coverage report
This commit is contained in:
parent
666ca9f7cd
commit
e52ab8762b
21
noxfile.py
21
noxfile.py
@ -245,15 +245,18 @@ def _run_with_coverage(session, *test_cmd):
|
|||||||
python_path_env_var = SITECUSTOMIZE_DIR
|
python_path_env_var = SITECUSTOMIZE_DIR
|
||||||
else:
|
else:
|
||||||
python_path_env_var = '{}:{}'.format(SITECUSTOMIZE_DIR, python_path_env_var)
|
python_path_env_var = '{}:{}'.format(SITECUSTOMIZE_DIR, python_path_env_var)
|
||||||
session.run(
|
try:
|
||||||
*test_cmd,
|
session.run(
|
||||||
env={
|
*test_cmd,
|
||||||
'PYTHONPATH': python_path_env_var,
|
env={
|
||||||
'COVERAGE_PROCESS_START': os.path.join(REPO_ROOT, '.coveragerc')
|
'PYTHONPATH': python_path_env_var,
|
||||||
}
|
'COVERAGE_PROCESS_START': os.path.join(REPO_ROOT, '.coveragerc')
|
||||||
)
|
}
|
||||||
session.run('coverage', 'combine')
|
)
|
||||||
session.run('coverage', 'xml', '-o', os.path.join(REPO_ROOT, 'artifacts', 'coverage', 'coverage.xml'))
|
finally:
|
||||||
|
# Always combine and generate the XML coverage report
|
||||||
|
session.run('coverage', 'combine')
|
||||||
|
session.run('coverage', 'xml', '-o', os.path.join(REPO_ROOT, 'artifacts', 'coverage', 'coverage.xml'))
|
||||||
|
|
||||||
|
|
||||||
def _runtests(session, coverage, cmd_args):
|
def _runtests(session, coverage, cmd_args):
|
||||||
|
Loading…
Reference in New Issue
Block a user