Tiago Gomes pushed to branch bst-1.2 at BuildStream / buildstream
Commits:
2 changed files:
Changes:
... | ... | @@ -467,7 +467,7 @@ def node_get_project_path(node, key, project_dir, *, |
467 | 467 |
"{}: Specified path '{}' does not exist"
|
468 | 468 |
.format(provenance, path_str))
|
469 | 469 |
|
470 |
- is_inside = project_dir_path in full_resolved_path.parents or (
|
|
470 |
+ is_inside = project_dir_path.resolve() in full_resolved_path.parents or (
|
|
471 | 471 |
full_resolved_path == project_dir_path)
|
472 | 472 |
|
473 | 473 |
if path.is_absolute() or not is_inside:
|
... | ... | @@ -181,3 +181,15 @@ def test_project_refs_options(cli, datafiles): |
181 | 181 |
|
182 | 182 |
# Assert that the cache keys are different
|
183 | 183 |
assert result1.output != result2.output
|
184 |
+ |
|
185 |
+ |
|
186 |
+@pytest.mark.datafiles(os.path.join(DATA_DIR, 'element-path'))
|
|
187 |
+def test_element_path_project_path_contains_symlinks(cli, datafiles, tmpdir):
|
|
188 |
+ real_project = str(datafiles)
|
|
189 |
+ linked_project = os.path.join(str(tmpdir), 'linked')
|
|
190 |
+ os.symlink(real_project, linked_project)
|
|
191 |
+ os.makedirs(os.path.join(real_project, 'elements'), exist_ok=True)
|
|
192 |
+ with open(os.path.join(real_project, 'elements', 'element.bst'), 'w') as f:
|
|
193 |
+ f.write("kind: manual\n")
|
|
194 |
+ result = cli.run(project=linked_project, args=['show', 'element.bst'])
|
|
195 |
+ result.assert_success()
|