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
@ -245,6 +245,7 @@ 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)
|
||||||
|
try:
|
||||||
session.run(
|
session.run(
|
||||||
*test_cmd,
|
*test_cmd,
|
||||||
env={
|
env={
|
||||||
@ -252,6 +253,8 @@ def _run_with_coverage(session, *test_cmd):
|
|||||||
'COVERAGE_PROCESS_START': os.path.join(REPO_ROOT, '.coveragerc')
|
'COVERAGE_PROCESS_START': os.path.join(REPO_ROOT, '.coveragerc')
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
finally:
|
||||||
|
# Always combine and generate the XML coverage report
|
||||||
session.run('coverage', 'combine')
|
session.run('coverage', 'combine')
|
||||||
session.run('coverage', 'xml', '-o', os.path.join(REPO_ROOT, 'artifacts', 'coverage', 'coverage.xml'))
|
session.run('coverage', 'xml', '-o', os.path.join(REPO_ROOT, 'artifacts', 'coverage', 'coverage.xml'))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user