summaryrefslogtreecommitdiff
path: root/src/buildstream/_frontend/cli.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-07-14 19:14:05 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-07-16 12:18:13 +0900
commitc915c8b7c4f067346a03be597fd1451b2ceebc00 (patch)
tree1f0256fd8fce1270c5eeac92bbb421152d6a0f86 /src/buildstream/_frontend/cli.py
parentc068f54fc7fe694928239a6218fe6661a67a95a5 (diff)
downloadbuildstream-c915c8b7c4f067346a03be597fd1451b2ceebc00.tar.gz
_frontend: Added toplevel `--max-jobs` configuration
While this is currently only relevant for `bst build`, it is a current implementation detail that user configuration which gets overridden by command line options must use toplevel options. This patch allows invocations such as the following to override the max-jobs: bst --max-jobs 16 build target.bst This also updates the completions test to expect the new toplevel option. This is a part of #1033
Diffstat (limited to 'src/buildstream/_frontend/cli.py')
-rw-r--r--src/buildstream/_frontend/cli.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index fda81598d..1f5d500a8 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -241,6 +241,8 @@ def print_version(ctx, param, value):
help="Maximum simultaneous build tasks")
@click.option('--pushers', type=click.INT, default=None,
help="Maximum simultaneous upload tasks")
+@click.option('--max-jobs', type=click.INT, default=None,
+ help="Number of parallel jobs allowed for a given build task")
@click.option('--network-retries', type=click.INT, default=None,
help="Maximum retries for network tasks")
@click.option('--no-interactive', is_flag=True, default=False,