Fix coverage handling for non_local tests.

This commit is contained in:
Matt Clay 2019-03-06 15:33:03 -08:00
parent f47191674e
commit 156613f025
2 changed files with 11 additions and 5 deletions

View file

@ -1183,7 +1183,8 @@ def command_integration_script(args, target, test_dir, inventory_path):
if config_path:
cmd += ['-e', '@%s' % config_path]
intercept_command(args, cmd, target_name=target.name, env=env, cwd=cwd)
coverage = args.coverage and 'non_local/' not in target.aliases
intercept_command(args, cmd, target_name=target.name, env=env, cwd=cwd, coverage=coverage)
def command_integration_role(args, target, start_at_task, test_dir, inventory_path):
@ -1265,7 +1266,8 @@ def command_integration_role(args, target, start_at_task, test_dir, inventory_pa
env['ANSIBLE_ROLES_PATH'] = os.path.abspath(os.path.join(test_env.integration_dir, 'targets'))
intercept_command(args, cmd, target_name=target.name, env=env, cwd=cwd)
coverage = args.coverage and 'non_local/' not in target.aliases
intercept_command(args, cmd, target_name=target.name, env=env, cwd=cwd, coverage=coverage)
def command_units(args):