diff options
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 4b5439f525..196d93c414 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -3297,7 +3297,8 @@ class FetchPremirroronlyNetworkTest(FetcherTest): | |||
| 3297 | import shutil | 3297 | import shutil |
| 3298 | self.mirrorname = "git2_git.yoctoproject.org.fstests.tar.gz" | 3298 | self.mirrorname = "git2_git.yoctoproject.org.fstests.tar.gz" |
| 3299 | os.makedirs(self.clonedir) | 3299 | os.makedirs(self.clonedir) |
| 3300 | self.git("clone --bare --shallow-since=\"01.01.2013\" {}".format(self.recipe_url), self.clonedir) | 3300 | self.git("clone --bare {}".format(self.recipe_url), self.clonedir) |
| 3301 | self.git("update-ref HEAD 15413486df1f5a5b5af699b6f3ba5f0984e52a9f", self.gitdir) | ||
| 3301 | bb.process.run('tar -czvf {} .'.format(os.path.join(self.mirrordir, self.mirrorname)), cwd = self.gitdir) | 3302 | bb.process.run('tar -czvf {} .'.format(os.path.join(self.mirrordir, self.mirrorname)), cwd = self.gitdir) |
| 3302 | shutil.rmtree(self.clonedir) | 3303 | shutil.rmtree(self.clonedir) |
| 3303 | 3304 | ||
| @@ -3305,7 +3306,7 @@ class FetchPremirroronlyNetworkTest(FetcherTest): | |||
| 3305 | def test_mirror_tarball_updated(self): | 3306 | def test_mirror_tarball_updated(self): |
| 3306 | self.make_git_repo() | 3307 | self.make_git_repo() |
| 3307 | ## Upstream commit is in the mirror | 3308 | ## Upstream commit is in the mirror |
| 3308 | self.d.setVar("SRCREV", "49d65d53c2bf558ae6e9185af0f3af7b79d255ec") | 3309 | self.d.setVar("SRCREV", "15413486df1f5a5b5af699b6f3ba5f0984e52a9f") |
| 3309 | fetcher = bb.fetch.Fetch([self.recipe_url], self.d) | 3310 | fetcher = bb.fetch.Fetch([self.recipe_url], self.d) |
| 3310 | fetcher.download() | 3311 | fetcher.download() |
| 3311 | 3312 | ||
| @@ -3313,7 +3314,7 @@ class FetchPremirroronlyNetworkTest(FetcherTest): | |||
| 3313 | def test_mirror_tarball_outdated(self): | 3314 | def test_mirror_tarball_outdated(self): |
| 3314 | self.make_git_repo() | 3315 | self.make_git_repo() |
| 3315 | ## Upstream commit not in the mirror | 3316 | ## Upstream commit not in the mirror |
| 3316 | self.d.setVar("SRCREV", "15413486df1f5a5b5af699b6f3ba5f0984e52a9f") | 3317 | self.d.setVar("SRCREV", "49d65d53c2bf558ae6e9185af0f3af7b79d255ec") |
| 3317 | fetcher = bb.fetch.Fetch([self.recipe_url], self.d) | 3318 | fetcher = bb.fetch.Fetch([self.recipe_url], self.d) |
| 3318 | with self.assertRaises(bb.fetch2.NetworkAccess): | 3319 | with self.assertRaises(bb.fetch2.NetworkAccess): |
| 3319 | fetcher.download() | 3320 | fetcher.download() |
