From 118644b22b01a7849a9f8e8e9637e817ed8c443d Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Fri, 8 Feb 2019 10:44:29 +0000 Subject: Add cli main & user conf option for 'cache-buildtrees' context _context.py: Add cache_buildtrees global user context, the default of which is set to by default to 'always' via the addition of cache-buildtrees to userconfig.yaml cache group. 'failure' & 'never' can be given as valid options. app.py & cli.py: Add --cache-buildtrees as a bst main option, which when passed with a valid option can override the default or user defined context for cache_buildtrees. tests/completions/completions.py: Update for the added flag. --- tests/frontend/completions.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/frontend') diff --git a/tests/frontend/completions.py b/tests/frontend/completions.py index cb151c284..c374df2a0 100644 --- a/tests/frontend/completions.py +++ b/tests/frontend/completions.py @@ -23,6 +23,7 @@ MAIN_OPTIONS = [ "--builders ", "-c ", "-C ", + "--cache-buildtrees ", "--colors ", "--config ", "--debug ", @@ -156,6 +157,7 @@ def test_options(cli, cmd, word_idx, expected): @pytest.mark.parametrize("cmd,word_idx,expected", [ ('bst --on-error ', 2, ['continue ', 'quit ', 'terminate ']), + ('bst --cache-buildtrees ', 2, ['always ', 'failure ', 'never ']), ('bst show --deps ', 3, ['all ', 'build ', 'none ', 'plan ', 'run ']), ('bst show --deps=', 2, ['all ', 'build ', 'none ', 'plan ', 'run ']), ('bst show --deps b', 3, ['build ']), -- cgit v1.2.1