diff options
author | Jürg Billeter <j@bitron.ch> | 2018-11-02 08:41:52 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-11-05 17:18:12 +0000 |
commit | f69b1117c22e4808e64d5dd9891d45cb6e6932b9 (patch) | |
tree | c128432aae5a5c660b311fd89f031532057c657b | |
parent | 0085d2aae8c669a597fc4f1a74eff38340d107ee (diff) | |
download | buildstream-f69b1117c22e4808e64d5dd9891d45cb6e6932b9.tar.gz |
_project.py: Remove unused artifacts parameter from load_elements()
-rw-r--r-- | buildstream/_pipeline.py | 2 | ||||
-rw-r--r-- | buildstream/_project.py | 3 | ||||
-rw-r--r-- | tests/artifactcache/pull.py | 6 | ||||
-rw-r--r-- | tests/artifactcache/push.py | 6 |
4 files changed, 8 insertions, 9 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py index 1f75b2e9e..3baeaa107 100644 --- a/buildstream/_pipeline.py +++ b/buildstream/_pipeline.py @@ -106,7 +106,7 @@ class Pipeline(): profile_start(Topics.LOAD_PIPELINE, "_".join(t.replace(os.sep, '-') for t in targets)) - elements = self._project.load_elements(targets, self._artifacts, + elements = self._project.load_elements(targets, rewritable=rewritable, fetch_subprojects=fetch_subprojects) diff --git a/buildstream/_project.py b/buildstream/_project.py index c43510b71..5280cf667 100644 --- a/buildstream/_project.py +++ b/buildstream/_project.py @@ -304,7 +304,6 @@ class Project(): # # Args: # targets (list): Target names - # artifacts (ArtifactCache): Artifact cache # rewritable (bool): Whether the loaded files should be rewritable # this is a bit more expensive due to deep copies # fetch_subprojects (bool): Whether we should fetch subprojects as a part of the @@ -313,7 +312,7 @@ class Project(): # Returns: # (list): A list of loaded Element # - def load_elements(self, targets, artifacts, *, + def load_elements(self, targets, *, rewritable=False, fetch_subprojects=False): with self._context.timed_activity("Loading elements", silent_nested=True): meta_elements = self.loader.load(targets, rewritable=rewritable, diff --git a/tests/artifactcache/pull.py b/tests/artifactcache/pull.py index e76dc5ca7..3e936fc70 100644 --- a/tests/artifactcache/pull.py +++ b/tests/artifactcache/pull.py @@ -90,7 +90,7 @@ def test_pull(cli, tmpdir, datafiles): cas = context.artifactcache # Assert that the element's artifact is **not** cached - element = project.load_elements(['target.bst'], cas)[0] + element = project.load_elements(['target.bst'])[0] element_key = cli.get_element_key(project_dir, 'target.bst') assert not cas.contains(element, element_key) @@ -132,7 +132,7 @@ def _test_pull(user_config_file, project_dir, artifact_dir, cas = context.artifactcache # Load the target element - element = project.load_elements([element_name], cas)[0] + element = project.load_elements([element_name])[0] # Manually setup the CAS remote cas.setup_remotes(use_config=True) @@ -193,7 +193,7 @@ def test_pull_tree(cli, tmpdir, datafiles): cas = context.artifactcache # Assert that the element's artifact is cached - element = project.load_elements(['target.bst'], cas)[0] + element = project.load_elements(['target.bst'])[0] element_key = cli.get_element_key(project_dir, 'target.bst') assert cas.contains(element, element_key) diff --git a/tests/artifactcache/push.py b/tests/artifactcache/push.py index c95aac3ef..ca8cbd241 100644 --- a/tests/artifactcache/push.py +++ b/tests/artifactcache/push.py @@ -69,7 +69,7 @@ def test_push(cli, tmpdir, datafiles): cas = context.artifactcache # Assert that the element's artifact is cached - element = project.load_elements(['target.bst'], cas)[0] + element = project.load_elements(['target.bst'])[0] element_key = cli.get_element_key(project_dir, 'target.bst') assert cas.contains(element, element_key) @@ -111,7 +111,7 @@ def _test_push(user_config_file, project_dir, artifact_dir, cas = context.artifactcache # Load the target element - element = project.load_elements([element_name], cas)[0] + element = project.load_elements([element_name])[0] # Manually setup the CAS remote cas.setup_remotes(use_config=True) @@ -168,7 +168,7 @@ def test_push_directory(cli, tmpdir, datafiles): cas = context.artifactcache # Assert that the element's artifact is cached - element = project.load_elements(['target.bst'], cas)[0] + element = project.load_elements(['target.bst'])[0] element_key = cli.get_element_key(project_dir, 'target.bst') assert cas.contains(element, element_key) |