mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-09 18:51:29 -07:00
Add ansible-test finally block after tests run.
This will record data from passing tests even when tests fail.
This commit is contained in:
parent
8ef2e6da05
commit
8535c05b29
1 changed files with 93 additions and 91 deletions
|
@ -833,6 +833,7 @@ def command_integration_filtered(args, targets, all_targets, inventory_path, pre
|
||||||
|
|
||||||
current_environment = None # type: EnvironmentDescription | None
|
current_environment = None # type: EnvironmentDescription | None
|
||||||
|
|
||||||
|
try:
|
||||||
for target in targets_iter:
|
for target in targets_iter:
|
||||||
if args.start_at and not found:
|
if args.start_at and not found:
|
||||||
found = target.name == args.start_at
|
found = target.name == args.start_at
|
||||||
|
@ -942,6 +943,7 @@ def command_integration_filtered(args, targets, all_targets, inventory_path, pre
|
||||||
finally:
|
finally:
|
||||||
display.verbosity = args.verbosity = verbosity
|
display.verbosity = args.verbosity = verbosity
|
||||||
|
|
||||||
|
finally:
|
||||||
if not args.explain:
|
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))))
|
results_path = 'test/results/data/%s-%s.json' % (args.command, re.sub(r'[^0-9]', '-', str(datetime.datetime.utcnow().replace(microsecond=0))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue