Skip to content

Commit

Permalink
test, integration: add diff support (ansible#26296)
Browse files Browse the repository at this point in the history
  • Loading branch information
resmo authored Jun 30, 2017
1 parent 4361659 commit 77d0542
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/runner/lib/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -1317,6 +1320,7 @@ def __init__(self, args, command):
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):
Expand Down
4 changes: 4 additions & 0 deletions test/runner/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down

0 comments on commit 77d0542

Please sign in to comment.