Jonathan Maw pushed to branch master at BuildStream / buildstream
Commits:
2 changed files:
Changes:
... | ... | @@ -1199,7 +1199,7 @@ class Stream(): |
1199 | 1199 |
element_source_dir = self._get_element_dirname(directory, element)
|
1200 | 1200 |
if list(element.sources()):
|
1201 | 1201 |
os.makedirs(element_source_dir)
|
1202 |
- element._stage_sources_at(element_source_dir)
|
|
1202 |
+ element._stage_sources_at(element_source_dir, mount_workspaces=False)
|
|
1203 | 1203 |
|
1204 | 1204 |
# Write a master build script to the sandbox
|
1205 | 1205 |
def _write_build_script(self, directory, elements):
|
... | ... | @@ -28,10 +28,17 @@ def generate_remote_import_element(input_path, output_path): |
28 | 28 |
|
29 | 29 |
|
30 | 30 |
@pytest.mark.datafiles(DATA_DIR)
|
31 |
-def test_source_checkout(datafiles, cli):
|
|
31 |
+@pytest.mark.parametrize('with_workspace', [('workspace'), ('no-workspace')])
|
|
32 |
+def test_source_checkout(datafiles, tmpdir_factory, cli, with_workspace):
|
|
33 |
+ tmpdir = tmpdir_factory.mktemp("")
|
|
32 | 34 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
33 | 35 |
checkout = os.path.join(cli.directory, 'source-checkout')
|
34 | 36 |
target = 'checkout-deps.bst'
|
37 |
+ workspace = os.path.join(str(tmpdir), 'workspace')
|
|
38 |
+ |
|
39 |
+ if with_workspace == "workspace":
|
|
40 |
+ result = cli.run(project=project, args=['workspace', 'open', '--directory', workspace, target])
|
|
41 |
+ result.assert_success()
|
|
35 | 42 |
|
36 | 43 |
result = cli.run(project=project, args=['source-checkout', target, '--deps', 'none', checkout])
|
37 | 44 |
result.assert_success()
|