test, integration: add diff support (#26296)

This commit is contained in:
René Moser 2017-06-30 20:43:34 +02:00 committed by GitHub
parent 4361659bee
commit 77d0542985
2 changed files with 8 additions and 0 deletions

View file

@ -671,6 +671,9 @@ def command_integration_role(args, target, start_at_task):
if args.skip_tags:
cmd += ['--skip-tags', args.skip_tags]
if args.diff:
cmd += ['--diff']
if args.verbosity:
cmd.append('-' + ('v' * args.verbosity))
@ -1317,6 +1320,7 @@ class IntegrationConfig(TestConfig):
self.retry_on_error = args.retry_on_error # type: bool
self.tags = args.tags
self.skip_tags = args.skip_tags
self.diff = args.diff
class PosixIntegrationConfig(IntegrationConfig):

View file

@ -201,6 +201,10 @@ def parse_args():
metavar='TAGS',
help='only run plays and tasks whose tags do not match these values')
integration.add_argument('--diff',
action='store_true',
help='show diff output')
integration.add_argument('--allow-destructive',
action='store_true',
help='allow destructive tests (--local and --tox only)')