Add ansible-test finally block after tests run.

This will record data from passing tests even when tests fail.
pull/4420/head
Matt Clay 2019-03-07 16:44:26 -08:00
parent 8ef2e6da05
commit 8535c05b29
1 changed files with 93 additions and 91 deletions

View File

@ -833,6 +833,7 @@ def command_integration_filtered(args, targets, all_targets, inventory_path, pre
current_environment = None # type: EnvironmentDescription | None
try:
for target in targets_iter:
if args.start_at and not found:
found = target.name == args.start_at
@ -942,6 +943,7 @@ def command_integration_filtered(args, targets, all_targets, inventory_path, pre
finally:
display.verbosity = args.verbosity = verbosity
finally:
if not args.explain:
results_path = 'test/results/data/%s-%s.json' % (args.command, re.sub(r'[^0-9]', '-', str(datetime.datetime.utcnow().replace(microsecond=0))))