Skip to contentSkip to conversation

tests/fetch: fix GitShallowTest.test_bitbake

PATCH New Christopher Larson 1 participant 1 message Jul 28, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/fetch: fix GitShallowTest.test_bitbake

From: Christopher Larson <[email protected]>

git fetch --tags seems to interact badly with mirror=fetch, resulting in the regular branches not being fetched, so drop the unnecessary --tags. This fixes this unit test failure: bb.fetch2.FetchError: Fetcher failure: Unable to resolve 'master' in upstream git repository in git ls-remote output for /tmp/tmp4ag_mgmn/gitsource

[YOCTO #11698]

---
 lib/bb/tests/fetch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/tests/fetch.py +1 -1
index 343ae8f..faa5c74 100644
@@ -1440,7 +1440,7 @@ class GitShallowTest(FetcherTest):
         def test_bitbake(self):
             self.git('remote add --mirror=fetch origin git://github.com/openembedded/bitbake', cwd=self.srcdir)
             self.git('config core.bare true', cwd=self.srcdir)
-            self.git('fetch --tags', cwd=self.srcdir)
+            self.git('fetch', cwd=self.srcdir)
 
             self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0')
             # Note that the 1.10.0 tag is annotated, so this also tests
Signature · 1 line
2.7.4