west icon indicating copy to clipboard operation
west copied to clipboard

Regression test for submodules with relative paths

Open mbolivar-nordic opened this issue 3 years ago • 6 comments

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: and path:
  • 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.

mbolivar-nordic avatar Nov 12 '21 21:11 mbolivar-nordic

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)

marc-hb avatar Nov 13 '21 23:11 marc-hb

I really recommend getting the test merged test first

Very well, let's go that way then. Removed wip and addressed comments.

mbolivar-nordic avatar Nov 19 '21 00:11 mbolivar-nordic

I am cordially inviting @tejlmand to the party :)

mbolivar-nordic avatar Nov 19 '21 00:11 mbolivar-nordic

Ping on this one

mbolivar-nordic avatar Dec 02 '21 21:12 mbolivar-nordic

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.

marc-hb avatar Dec 04 '21 16:12 marc-hb

Any progress on this?

Mierunski avatar Feb 18 '22 13:02 Mierunski