diff options
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 4a5af71061..c19180aaf5 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -2302,6 +2302,18 @@ class GitShallowTest(FetcherTest): | |||
| 2302 | self.assertIn("No up to date source found", context.exception.msg) | 2302 | self.assertIn("No up to date source found", context.exception.msg) |
| 2303 | self.assertIn("clone directory not available or not up to date", context.exception.msg) | 2303 | self.assertIn("clone directory not available or not up to date", context.exception.msg) |
| 2304 | 2304 | ||
| 2305 | def test_shallow_check_is_shallow(self): | ||
| 2306 | self.add_empty_file('a') | ||
| 2307 | self.add_empty_file('b') | ||
| 2308 | |||
| 2309 | # Fetch and unpack without the clonedir and *only* shallow tarball available | ||
| 2310 | bb.utils.remove(self.gitdir, recurse=True) | ||
| 2311 | fetcher, ud = self.fetch_and_unpack() | ||
| 2312 | |||
| 2313 | # The unpacked tree *should* be shallow | ||
| 2314 | self.assertRevCount(1) | ||
| 2315 | assert os.path.exists(os.path.join(self.gitdir, '.git', 'shallow')) | ||
| 2316 | |||
| 2305 | class GitLfsTest(FetcherTest): | 2317 | class GitLfsTest(FetcherTest): |
| 2306 | def skipIfNoGitLFS(): | 2318 | def skipIfNoGitLFS(): |
| 2307 | import shutil | 2319 | import shutil |
