diff options
author | Jürg Billeter <j@bitron.ch> | 2019-03-06 15:34:02 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-03-15 09:41:43 +0000 |
commit | e8bd069946294d915592ab4d37a86cb9f5a749d8 (patch) | |
tree | 162d3f513b66b66727af642897b53d0b2610fbae /tests/integration/shellbuildtrees.py | |
parent | e34f8f539f94e99c3b8781d6a62711bb8cf71c06 (diff) | |
download | buildstream-juerg/cache-buildtrees.tar.gz |
Change default of cache-buildtrees option to 'auto'juerg/cache-buildtrees
Caching buildtrees may significantly increase CAS disk usage. Change the
default to cache buildtrees only when required for core functionality.
Diffstat (limited to 'tests/integration/shellbuildtrees.py')
-rw-r--r-- | tests/integration/shellbuildtrees.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/integration/shellbuildtrees.py b/tests/integration/shellbuildtrees.py index 8c5411526..fed3c5167 100644 --- a/tests/integration/shellbuildtrees.py +++ b/tests/integration/shellbuildtrees.py @@ -26,7 +26,7 @@ def test_buildtree_staged(cli_integration, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) element_name = 'build-shell/buildtree.bst' - res = cli_integration.run(project=project, args=['build', element_name]) + res = cli_integration.run(project=project, args=['--cache-buildtrees', 'always', 'build', element_name]) res.assert_success() res = cli_integration.run(project=project, args=[ @@ -42,7 +42,7 @@ def test_buildtree_staged_forced_true(cli_integration, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) element_name = 'build-shell/buildtree.bst' - res = cli_integration.run(project=project, args=['build', element_name]) + res = cli_integration.run(project=project, args=['--cache-buildtrees', 'always', 'build', element_name]) res.assert_success() res = cli_integration.run(project=project, args=[ @@ -65,7 +65,7 @@ def test_buildtree_staged_warn_empty_cached(cli_integration, tmpdir, datafiles): 'cachedir': str(tmpdir) }) - res = cli_integration.run(project=project, args=['--cache-buildtrees', 'never', 'build', element_name]) + res = cli_integration.run(project=project, args=['build', element_name]) res.assert_success() res = cli_integration.run(project=project, args=[ @@ -82,7 +82,7 @@ def test_buildtree_staged_if_available(cli_integration, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) element_name = 'build-shell/buildtree.bst' - res = cli_integration.run(project=project, args=['build', element_name]) + res = cli_integration.run(project=project, args=['--cache-buildtrees', 'always', 'build', element_name]) res.assert_success() res = cli_integration.run(project=project, args=[ @@ -99,7 +99,7 @@ def test_buildtree_staged_forced_false(cli_integration, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) element_name = 'build-shell/buildtree.bst' - res = cli_integration.run(project=project, args=['build', element_name]) + res = cli_integration.run(project=project, args=['--cache-buildtrees', 'always', 'build', element_name]) res.assert_success() res = cli_integration.run(project=project, args=[ @@ -154,19 +154,19 @@ def test_buildtree_from_failure_option_never(cli_integration, tmpdir, datafiles) @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') -def test_buildtree_from_failure_option_auto(cli_integration, tmpdir, datafiles): +def test_buildtree_from_failure_option_always(cli_integration, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) element_name = 'build-shell/buildtree-fail.bst' - # build with --cache-buildtrees set to 'auto', behaviour should match + # build with --cache-buildtrees set to 'always', behaviour should match # default behaviour (which is always) as the buildtree will explicitly have been # cached with content. cli_integration.configure({ 'cachedir': str(tmpdir) }) - res = cli_integration.run(project=project, args=['--cache-buildtrees', 'auto', 'build', element_name]) + res = cli_integration.run(project=project, args=['--cache-buildtrees', 'always', 'build', element_name]) res.assert_main_error(ErrorDomain.STREAM, None) res = cli_integration.run(project=project, args=[ @@ -190,7 +190,7 @@ def test_buildtree_pulled(cli, tmpdir, datafiles): cli.configure({ 'artifacts': {'url': share.repo, 'push': True} }) - result = cli.run(project=project, args=['build', element_name]) + result = cli.run(project=project, args=['--cache-buildtrees', 'always', 'build', element_name]) result.assert_success() assert cli.get_element_state(project, element_name) == 'cached' @@ -222,7 +222,7 @@ def test_buildtree_options(cli, tmpdir, datafiles): cli.configure({ 'artifacts': {'url': share.repo, 'push': True} }) - result = cli.run(project=project, args=['build', element_name]) + result = cli.run(project=project, args=['--cache-buildtrees', 'always', 'build', element_name]) result.assert_success() assert cli.get_element_state(project, element_name) == 'cached' assert share.has_artifact('test', element_name, cli.get_element_key(project, element_name)) |