Bug 1109365: Default try graph platforms to all.
authorWander Lairson Costa <wcosta@mozilla.com>
Wed, 18 Feb 2015 08:10:13 -0200
changeset 229570 94af57d6d3a04cb0132418f5c9b41b0d2bd34512
parent 229569 ac1ad74bcfd1f4591e0ac8c6bb1bd193a36b3fb0
child 229571 62a62e6277d0ee6598b879db3c49a68fbbd14cef
push id13959
push userwcosta@mozilla.com
push dateWed, 18 Feb 2015 10:10:29 +0000
treeherderb2g-inbound@94af57d6d3a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1109365
milestone38.0a1
Bug 1109365: Default try graph platforms to all. When the platfoms list is not supplied by cli, default to all platforms.
testing/taskcluster/taskcluster_graph/commit_parser.py
--- a/testing/taskcluster/taskcluster_graph/commit_parser.py
+++ b/testing/taskcluster/taskcluster_graph/commit_parser.py
@@ -170,24 +170,20 @@ def parse_commit(message, jobs):
 
     if parts[0] != TRY_DELIMITER:
         raise InvalidCommitException('Invalid commit format must start with' +
                 TRY_DELIMITER)
 
     # Argument parser based on try flag flags
     parser = argparse.ArgumentParser()
     parser.add_argument('-b', dest='build_types')
-    parser.add_argument('-p', dest='platforms')
-    parser.add_argument('-u', dest='tests')
+    parser.add_argument('-p', nargs='?', dest='platforms', const='all', default='all')
+    parser.add_argument('-u', nargs='?', dest='tests', const='all', default='all')
     args, unknown = parser.parse_known_args(parts[1:])
 
-    # Sanity check platforms...
-    if args.platforms is None:
-        return []
-
     # Then builds...
     if args.build_types is None:
         return []
 
     build_types = [ BUILD_TYPE_ALIASES.get(build_type, build_type) for
             build_type in args.build_types ]
 
     platforms = normalize_platform_list(jobs['flags']['builds'], args.platforms)