mirror of
https://git.yoctoproject.org/poky
synced 2026-04-22 06:32:12 +02:00
bitbake: tests/fetch: Add an additional test case to check whether the fast fetch is shallow
(Bitbake rev: 16f1961e077c525ccfc12496a3deca944df89fc6) Signed-off-by: Stefan Koch <stefan-koch@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
db267f2c94
commit
543b1e6ffb
@@ -2302,6 +2302,18 @@ class GitShallowTest(FetcherTest):
|
||||
self.assertIn("No up to date source found", context.exception.msg)
|
||||
self.assertIn("clone directory not available or not up to date", context.exception.msg)
|
||||
|
||||
def test_shallow_check_is_shallow(self):
|
||||
self.add_empty_file('a')
|
||||
self.add_empty_file('b')
|
||||
|
||||
# Fetch and unpack without the clonedir and *only* shallow tarball available
|
||||
bb.utils.remove(self.gitdir, recurse=True)
|
||||
fetcher, ud = self.fetch_and_unpack()
|
||||
|
||||
# The unpacked tree *should* be shallow
|
||||
self.assertRevCount(1)
|
||||
assert os.path.exists(os.path.join(self.gitdir, '.git', 'shallow'))
|
||||
|
||||
class GitLfsTest(FetcherTest):
|
||||
def skipIfNoGitLFS():
|
||||
import shutil
|
||||
|
||||
Reference in New Issue
Block a user