summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-rw-r--r--bitbake/lib/bb/tests/fetch.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 2a9019b05f..73f7b3f78e 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -1234,6 +1234,23 @@ class GitShallowTest(FetcherTest):
1234 assert './.git/modules/' in bb.process.run('tar -tzf %s' % os.path.join(self.dldir, ud.mirrortarballs[0]))[0] 1234 assert './.git/modules/' in bb.process.run('tar -tzf %s' % os.path.join(self.dldir, ud.mirrortarballs[0]))[0]
1235 assert os.listdir(os.path.join(self.gitdir, 'gitsubmodule')) 1235 assert os.listdir(os.path.join(self.gitdir, 'gitsubmodule'))
1236 1236
1237 if any(os.path.exists(os.path.join(p, 'git-annex')) for p in os.environ.get('PATH').split(':')):
1238 def test_shallow_annex(self):
1239 self.add_empty_file('a')
1240 self.add_empty_file('b')
1241 self.git('annex init', cwd=self.srcdir)
1242 open(os.path.join(self.srcdir, 'c'), 'w').close()
1243 self.git('annex add c', cwd=self.srcdir)
1244 self.git('commit -m annex-c -a', cwd=self.srcdir)
1245 bb.process.run('chmod u+w -R %s' % os.path.join(self.srcdir, '.git', 'annex'))
1246
1247 uri = 'gitannex://%s;protocol=file;subdir=${S}' % self.srcdir
1248 fetcher, ud = self.fetch_shallow(uri)
1249
1250 self.assertRevCount(1)
1251 assert './.git/annex/' in bb.process.run('tar -tzf %s' % os.path.join(self.dldir, ud.mirrortarballs[0]))[0]
1252 assert os.path.exists(os.path.join(self.gitdir, 'c'))
1253
1237 def test_shallow_multi_one_uri(self): 1254 def test_shallow_multi_one_uri(self):
1238 # Create initial git repo 1255 # Create initial git repo
1239 self.add_empty_file('a') 1256 self.add_empty_file('a')