summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk>2019-06-28 11:26:48 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-09-12 09:40:37 +0000
commit3a263bb8b36d77912a411c25b0bfb020be518f82 (patch)
treeecd76ae49e2abb2a6e5726ecb882304e051ef4d6
parentf05be959e06925b88fd701b2d432902f418c38e3 (diff)
downloadbuildstream-build-all-option.tar.gz
tests/remoteexecution/partial.py: Test building all dependenciesbuild-all-option
-rw-r--r--tests/remoteexecution/partial.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/remoteexecution/partial.py b/tests/remoteexecution/partial.py
index bf5106f8d..a640f27d5 100644
--- a/tests/remoteexecution/partial.py
+++ b/tests/remoteexecution/partial.py
@@ -24,7 +24,8 @@ DATA_DIR = os.path.join(
# to the local cache.
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.parametrize('pull_artifact_files', [True, False])
-def test_build_dependency_partial_local_cas(cli, datafiles, pull_artifact_files):
+@pytest.mark.parametrize('build_all', [True, False])
+def test_build_dependency_partial_local_cas(cli, datafiles, pull_artifact_files, build_all):
project = str(datafiles)
element_name = 'no-runtime-deps.bst'
builddep_element_name = 'autotools/amhello.bst'
@@ -35,6 +36,12 @@ def test_build_dependency_partial_local_cas(cli, datafiles, pull_artifact_files)
assert set(services) == set(['action-cache', 'execution', 'storage'])
# configure pull blobs
+ if build_all:
+ cli.configure({
+ 'build': {
+ 'dependencies': 'all'
+ }
+ })
cli.config['remote-execution']['pull-artifact-files'] = pull_artifact_files
result = cli.run(project=project, args=['build', element_name])
@@ -52,7 +59,10 @@ def test_build_dependency_partial_local_cas(cli, datafiles, pull_artifact_files)
# Verify build dependencies is pulled for ALL and BUILD
result = cli.run(project=project, args=['artifact', 'checkout', builddep_element_name,
'--directory', builddep_checkout])
- result.assert_main_error(ErrorDomain.STREAM, 'uncached-checkout-attempt')
+ if build_all and pull_artifact_files:
+ result.assert_success()
+ else:
+ result.assert_main_error(ErrorDomain.STREAM, 'uncached-checkout-attempt')
@pytest.mark.datafiles(DATA_DIR)