diff options
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 0091723601..3f42332588 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -2281,6 +2281,19 @@ class GitShallowTest(FetcherTest): | |||
| 2281 | self.assertRevCount(1) | 2281 | self.assertRevCount(1) |
| 2282 | assert os.path.exists(os.path.join(self.gitdir, '.git', 'shallow')) | 2282 | assert os.path.exists(os.path.join(self.gitdir, '.git', 'shallow')) |
| 2283 | 2283 | ||
| 2284 | def test_shallow_succeeds_with_tag_containing_slash(self): | ||
| 2285 | self.add_empty_file('a') | ||
| 2286 | self.add_empty_file('b') | ||
| 2287 | self.git('tag t1/t2/t3', cwd=self.srcdir) | ||
| 2288 | self.assertRevCount(2, cwd=self.srcdir) | ||
| 2289 | |||
| 2290 | srcrev = self.git('rev-parse HEAD', cwd=self.srcdir).strip() | ||
| 2291 | self.d.setVar('SRCREV', srcrev) | ||
| 2292 | uri = self.d.getVar('SRC_URI').split()[0] | ||
| 2293 | uri = '%s;tag=t1/t2/t3' % uri | ||
| 2294 | self.fetch_shallow(uri) | ||
| 2295 | self.assertRevCount(1) | ||
| 2296 | |||
| 2284 | class GitLfsTest(FetcherTest): | 2297 | class GitLfsTest(FetcherTest): |
| 2285 | def skipIfNoGitLFS(): | 2298 | def skipIfNoGitLFS(): |
| 2286 | if not shutil.which('git-lfs'): | 2299 | if not shutil.which('git-lfs'): |
