diff mbox series

oeqa/selftest/devtool: fix test_devtool_add_git_style2

Message ID 20240404122555.34934-1-alexandre.truong@smile.fr
State Accepted, archived
Commit 9ac737fbe05c85ec8333b396ce2f89de6654916f
Headers show
Series oeqa/selftest/devtool: fix test_devtool_add_git_style2 | expand

Commit Message

Alexandre Truong April 4, 2024, 12:25 p.m. UTC
The problem is the following:
AssertionError: 'gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master' != 'git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master'

Mbedlts made changes to their repository, adding a sub-module, thus the
assert triggers an error with the url:
git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master

To fix the issue, the url has been changed to:
gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master

Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
---
 meta/lib/oeqa/selftest/cases/devtool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Purdie April 4, 2024, 1:16 p.m. UTC | #1
On Thu, 2024-04-04 at 14:25 +0200, Alexandre Truong wrote:
> The problem is the following:
> AssertionError: 'gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master' != 'git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master'
> 
> Mbedlts made changes to their repository, adding a sub-module, thus the
> assert triggers an error with the url:
> git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master
> 
> To fix the issue, the url has been changed to:
> gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master
> 
> Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr>
> Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
> ---
>  meta/lib/oeqa/selftest/cases/devtool.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks! I think this is fine to merge and avoid the current test
failures but it is a workaround since there is a version being passed
in this test and that version doesn't include the submodules commit. It
seems as if devtool/recipetool's submodule detection is checking HEAD
for submodules and not the specific revision/version we're passing.

Could you file a bug please in our bugzilla so we don't forget this
issue and can come back to fixing it properly?

FWIW, this is the problematic change upstream:
https://github.com/Mbed-TLS/mbedtls/commit/456a54da8ef44c8b725b524567c08cffec6a7214
which we should mention in the commit message too.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index a1cccc39eb..bc1e40ef83 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -482,7 +482,7 @@  class DevtoolAddTests(DevtoolBase):
         pn = 'mbedtls'
         # this will trigger reformat_git_uri with branch parameter in url
         git_url = "'git://git@github.com/ARMmbed/mbedtls.git;protocol=https'"
-        resulting_src_uri = "git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master"
+        resulting_src_uri = "gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master"
         self._test_devtool_add_git_url(git_url, version, pn, resulting_src_uri)
 
     def test_devtool_add_library(self):