Skip to content

Commit

Permalink
gate: add special tag that is always implicitly included
Browse files Browse the repository at this point in the history
  • Loading branch information
rschatz committed Feb 11, 2016
1 parent 07737ae commit 6049285
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mx_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
Predefined Task tags.
"""
class Tags:
always = 'always'
style = 'style'
build = 'build'

Expand Down Expand Up @@ -223,18 +224,21 @@ def gate(args):
elif args.tags:
Task.tags = args.tags.split(',')
Task.tagsExclude = args.x
if not Task.tagsExclude:
# implicitly include 'always'
Task.tags += [Tags.always]
elif args.x:
mx.abort('-x option cannot be used without --task-filter or the --tags option')

tasks = []
total = Task('Gate')
try:
with Task('Versions', tasks) as t:
with Task('Versions', tasks, tags=[Tags.always]) as t:
if t:
mx.command_function('version')(['--oneline'])
mx.command_function('sversions')([])

with Task('JDKReleaseInfo', tasks) as t:
with Task('JDKReleaseInfo', tasks, tags=[Tags.always]) as t:
if t:
jdkDirs = os.pathsep.join([mx.get_env('JAVA_HOME', ''), mx.get_env('EXTRA_JAVA_HOMES', '')])
for jdkDir in jdkDirs.split(os.pathsep):
Expand Down

0 comments on commit 6049285

Please sign in to comment.