diff options
author | Pavel Zhukov <pavel@zhukoff.net> | 2024-01-27 13:15:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-19 12:52:30 +0000 |
commit | de27ecd228e250a7b5a0b84f7d2096131c0110f1 (patch) | |
tree | 654c72f359414eaefd5a911d0c78b7149939b313 /bitbake/lib/bb/tests/fetch.py | |
parent | b2d0f31d248418f76cc8df8da9050b693d627776 (diff) | |
download | poky-de27ecd228e250a7b5a0b84f7d2096131c0110f1.tar.gz |
bitbake: tests/fetch.py: add multiple fetches test
Fetch from premirror few times to emulate multiple machines sharing same
clonedir or few rebuilds of the package from (pre)mirror
Regression test for [Yocto #15369]
(Bitbake rev: 7fcbac574c68f16b95ab7abb2874931d168d3c9e)
Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index bb30ed6513..fc94f4c02f 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -3083,6 +3083,24 @@ class FetchPremirroronlyLocalTest(FetcherTest): | |||
3083 | self.git("checkout {}".format(head), self.gitdir) | 3083 | self.git("checkout {}".format(head), self.gitdir) |
3084 | return newrev | 3084 | return newrev |
3085 | 3085 | ||
3086 | def test_mirror_multiple_fetches(self): | ||
3087 | self.make_git_repo() | ||
3088 | self.d.setVar("SRCREV", self.git_new_commit()) | ||
3089 | fetcher = bb.fetch.Fetch([self.recipe_url], self.d) | ||
3090 | fetcher.download() | ||
3091 | fetcher.unpack(self.unpackdir) | ||
3092 | ## New commit in premirror. it's not in the download_dir | ||
3093 | self.d.setVar("SRCREV", self.git_new_commit()) | ||
3094 | fetcher2 = bb.fetch.Fetch([self.recipe_url], self.d) | ||
3095 | fetcher2.download() | ||
3096 | fetcher2.unpack(self.unpackdir) | ||
3097 | ## New commit in premirror. it's not in the download_dir | ||
3098 | self.d.setVar("SRCREV", self.git_new_commit()) | ||
3099 | fetcher3 = bb.fetch.Fetch([self.recipe_url], self.d) | ||
3100 | fetcher3.download() | ||
3101 | fetcher3.unpack(self.unpackdir) | ||
3102 | |||
3103 | |||
3086 | def test_mirror_commit_nonexistent(self): | 3104 | def test_mirror_commit_nonexistent(self): |
3087 | self.make_git_repo() | 3105 | self.make_git_repo() |
3088 | self.d.setVar("SRCREV", "0"*40) | 3106 | self.d.setVar("SRCREV", "0"*40) |