Add support for ansible-test --coverage-check. (#53573)

This commit is contained in:
Matt Clay 2019-03-11 15:13:09 -07:00 committed by GitHub
parent 9ff25c0167
commit 887ab35656
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 49 additions and 13 deletions

View file

@ -211,6 +211,9 @@ def intercept_command(args, cmd, target_name, capture=False, env=None, data=None
coverage_file = os.path.abspath(os.path.join(inject_path, '..', 'output', '%s=%s=%s=%s=coverage' % (
args.command, target_name, args.coverage_label or 'local-%s' % version, 'python-%s' % version)))
if args.coverage_check:
coverage_file = ''
env['PATH'] = inject_path + os.path.pathsep + env['PATH']
env['ANSIBLE_TEST_PYTHON_VERSION'] = version
env['ANSIBLE_TEST_PYTHON_INTERPRETER'] = interpreter