Skip to content

Commit

Permalink
gate: print Task tags in verbose mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
zapster committed Feb 11, 2016
1 parent dc6f334 commit 07737ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -6548,6 +6548,7 @@ def _parse_cmd_line(self, opts, firstParse):
opts.ignored_projects += os.environ.get('IGNORED_PROJECTS', '').split(',')

mx_gate._jacoco = opts.jacoco
mx_gate.Task.verbose = opts.verbose
else:
parser = ArgParser(parents=[self])
parser.add_argument('commandAndArgs', nargs=REMAINDER, metavar='command args...')
Expand Down
4 changes: 3 additions & 1 deletion mx_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class Task:
tags = None
tagsExclude = False

verbose = False

def __init__(self, title, tasks=None, disableJacoco=False, tags=None):
self.tasks = tasks
self.title = title
Expand Down Expand Up @@ -328,7 +330,7 @@ def gate(args):

mx.log('Gate task times:')
for t in tasks:
mx.log(' ' + str(t.duration) + '\t' + t.title)
mx.log(' ' + str(t.duration) + '\t' + t.title + ("" if not (Task.verbose and t.tags) else (' [' + ','.join(t.tags) + ']')))
mx.log(' =======')
mx.log(' ' + str(total.duration))

Expand Down

0 comments on commit 07737ae

Please sign in to comment.