west
west copied to clipboard
Regression test for submodules with relative paths
The goal of this PR is to add a regression test for #545.
I'm starting with a regression test that I think captures all the cases:
- a project with
submodules: true
- a project with
submodules: <list-of-mappings>
- a submodule with both
name:
andpath:
- a submodule with only
path:
- a submodule with submodules of its own
All submodule paths are relative. The test is currently failing as expected and is marked xfail as such.
I'm hoping to get some confirmation that this addresses the problem and I haven't missed any use cases as the discussion in the issue is quite long at this point.
I'm working on a fix in parallel along the lines of what we've been discussing, and will update the PR when I have it.
I really recommend getting the test merged test first before any tentative fix: much lower risk of controversy and will help anyone suggesting anything actually test their suggestions (and even submit test fixes if needed)
I really recommend getting the test merged test first
Very well, let's go that way then. Removed wip and addressed comments.
I am cordially inviting @tejlmand to the party :)
Ping on this one
Another problem I just noticed is that submodule-1-1, submodule-2-1 etc. all have the same initial commit with the same SHA1. Probably because they're created in the same second. This is a risk of false negatives where a test fetches from the wrong place and passes anyway. Adding ~a few random characters~ in the commit message should be enough to address this. EDIT: adding the name of the submodule would probably be better: more useful information and would keep the tests deterministic.
Any progress on this?