Skip to content

Commit b3ebba7

Browse files
committed
tests: manifest: add new test_project_path_is_topdir()
Test coverage for the previous commit that fixes #910. Will catch any regression like what happened in v1.3 commit 2b2d3f2.
1 parent b8b2650 commit b3ebba7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/test_manifest.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
add_tag,
2828
check_proj_consistency,
2929
checkout_branch,
30+
cmd,
3031
create_branch,
3132
create_repo,
3233
create_workspace,
@@ -492,6 +493,24 @@ def test_project_paths_with_repo_path():
492493
check_proj_consistency(m.projects[2], expected2)
493494

494495

496+
# Officially _not_ supported! Was actually broken from 1.3 to 1.5
497+
# See #910 and zephyr commit 7d40091fbfedfc
498+
# If this gets in the way of some great new feature then feel free to remove this test.
499+
def test_project_path_is_topdir(repos_tmpdir):
500+
mnft_dir = Path('zephyr')
501+
mnft_file = mnft_dir / 'west.yml'
502+
503+
with open(mnft_file, encoding='utf-8') as f:
504+
mnft = f.read()
505+
with open(mnft_file, 'w', encoding='utf-8') as f:
506+
f.write(mnft.replace('path: subdir/Kconfiglib', 'path: .', count=1))
507+
508+
cmd(['init', '-l', mnft_dir])
509+
for c in ['help', 'list', 'update', 'list']:
510+
outputs = cmd(c)
511+
assert 'WARNING:' in outputs
512+
513+
495514
def test_project_clone_depth():
496515
ps = M('''\
497516
projects:

0 commit comments

Comments
 (0)