Skip to content

Commit 5d722b5

Browse files
committed
tests/fetch: Avoid using git protocol in tests
Two of the tests were still using git protocol to access git services. For the submodule test, the upstream repo has been updated. In the other case, we need to pass the correct command to the manual git commandline, we can't use a recipe url that previously just happened to work. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 parent 7fd4d9d commit 5d722b5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎lib/bb/tests/fetch.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ def test_git_submodule(self):
11141114
# URL with ssh submodules
11151115
url = "gitsm://git.yoctoproject.org/git-submodule-test;branch=ssh-gitsm-tests;rev=049da4a6cb198d7c0302e9e8b243a1443cb809a7;branch=master;protocol=https"
11161116
# Original URL (comment this if you have ssh access to git.yoctoproject.org)
1117-
url = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master;rev=a2885dd7d25380d23627e7544b7bbb55014b16ee;branch=master;protocol=https"
1117+
url = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master;rev=38e61644af90dccd73c03ed3acaed98c8dda9294;branch=master;protocol=https"
11181118
fetcher = bb.fetch.Fetch([url], self.d)
11191119
fetcher.download()
11201120
# Previous cwd has been deleted
@@ -3482,6 +3482,7 @@ def setUp(self):
34823482
self.reponame = "fstests"
34833483
self.clonedir = os.path.join(self.tempdir, "git")
34843484
self.gitdir = os.path.join(self.tempdir, "git", "{}.git".format(self.reponame))
3485+
self.giturl = "https://git.yoctoproject.org/fstests"
34853486
self.recipe_url = "git://git.yoctoproject.org/fstests;protocol=https;branch=master"
34863487
self.d.setVar("BB_FETCH_PREMIRRORONLY", "1")
34873488
self.d.setVar("BB_NO_NETWORK", "0")
@@ -3490,7 +3491,7 @@ def setUp(self):
34903491
def make_git_repo(self):
34913492
self.mirrorname = "git2_git.yoctoproject.org.fstests.tar.gz"
34923493
os.makedirs(self.clonedir)
3493-
self.git("clone --bare {}".format(self.recipe_url), self.clonedir)
3494+
self.git("clone --bare {}".format(self.giturl), self.clonedir)
34943495
self.git("update-ref HEAD 15413486df1f5a5b5af699b6f3ba5f0984e52a9f", self.gitdir)
34953496
bb.process.run('tar -czvf {} .'.format(os.path.join(self.mirrordir, self.mirrorname)), cwd = self.gitdir)
34963497
shutil.rmtree(self.clonedir)

0 commit comments

Comments
 (0)