Bug 1413928 - [tryselect] Create a new argument group for 'task' arguments
This simply groups arguments related to generating the list of
tasks from taskgraph into their own argument group.
MozReview-Commit-ID: IHRXXi5mB4G
--- a/tools/tryselect/cli.py
+++ b/tools/tryselect/cli.py
@@ -53,16 +53,29 @@ COMMON_ARGUMENT_GROUPS = {
[['--edit-presets'],
{'action': 'store_const',
'const': 'edit_presets',
'dest': 'mod_presets',
'default': None,
'help': 'Edit the preset file.',
}],
],
+ 'task': [
+ [['--full'],
+ {'action': 'store_true',
+ 'default': False,
+ 'help': "Use the full set of tasks as input to fzf (instead of "
+ "target tasks).",
+ }],
+ [['-p', '--parameters'],
+ {'default': None,
+ 'help': "Use the given parameters.yml to generate tasks, "
+ "defaults to latest parameters.yml from mozilla-central",
+ }],
+ ],
}
class BaseTryParser(ArgumentParser):
name = 'try'
common_groups = ['push', 'preset']
arguments = []
templates = []
--- a/tools/tryselect/selectors/fuzzy.py
+++ b/tools/tryselect/selectors/fuzzy.py
@@ -81,28 +81,18 @@ class FuzzyParser(BaseTryParser):
"interface. Equivalent to typing <query><ctrl-a><enter> "
"from the interface.",
}],
[['-u', '--update'],
{'action': 'store_true',
'default': False,
'help': "Update fzf before running.",
}],
- [['--full'],
- {'action': 'store_true',
- 'default': False,
- 'help': "Use the full set of tasks as input to fzf (instead of "
- "target tasks).",
- }],
- [['-p', '--parameters'],
- {'default': None,
- 'help': "Use the given parameters.yml to generate tasks, "
- "defaults to latest parameters.yml from mozilla-central",
- }],
]
+ common_groups = ['push', 'task', 'preset']
templates = ['artifact', 'env', 'rebuild']
def run(cmd, cwd=None):
is_win = platform.system() == 'Windows'
return subprocess.call(cmd, cwd=cwd, shell=True if is_win else False)