summaryrefslogtreecommitdiff
path: root/tests/integration/shellbuildtrees.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-03-06 15:34:02 +0100
committerJürg Billeter <j@bitron.ch>2019-03-16 07:24:58 +0100
commit6a5940148078ea08991bf15736283fdd978258ea (patch)
tree7aa20f2e91fd79092ec5be77b14f77c79b684d46 /tests/integration/shellbuildtrees.py
parent3951eb56ceb810bc1279927efd836c833759823a (diff)
downloadbuildstream-6a5940148078ea08991bf15736283fdd978258ea.tar.gz
Change default of cache-buildtrees option to 'auto'
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.py20
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))