summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/tests/fetch.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 9453c90d2b..9a4f5f11e2 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -845,6 +845,8 @@ class FetcherNetworkTest(FetcherTest):
845 prefix='gitfetch_localusehead_') 845 prefix='gitfetch_localusehead_')
846 src_dir = os.path.abspath(src_dir) 846 src_dir = os.path.abspath(src_dir)
847 bb.process.run("git init", cwd=src_dir) 847 bb.process.run("git init", cwd=src_dir)
848 bb.process.run("git config user.email 'you@example.com'", cwd=src_dir)
849 bb.process.run("git config user.name 'Your Name'", cwd=src_dir)
848 bb.process.run("git commit --allow-empty -m'Dummy commit'", 850 bb.process.run("git commit --allow-empty -m'Dummy commit'",
849 cwd=src_dir) 851 cwd=src_dir)
850 # Use other branch than master 852 # Use other branch than master
@@ -1328,6 +1330,8 @@ class GitMakeShallowTest(FetcherTest):
1328 self.gitdir = os.path.join(self.tempdir, 'gitshallow') 1330 self.gitdir = os.path.join(self.tempdir, 'gitshallow')
1329 bb.utils.mkdirhier(self.gitdir) 1331 bb.utils.mkdirhier(self.gitdir)
1330 bb.process.run('git init', cwd=self.gitdir) 1332 bb.process.run('git init', cwd=self.gitdir)
1333 bb.process.run('git config user.email "you@example.com"', cwd=self.gitdir)
1334 bb.process.run('git config user.name "Your Name"', cwd=self.gitdir)
1331 1335
1332 def assertRefs(self, expected_refs): 1336 def assertRefs(self, expected_refs):
1333 actual_refs = self.git(['for-each-ref', '--format=%(refname)']).splitlines() 1337 actual_refs = self.git(['for-each-ref', '--format=%(refname)']).splitlines()
@@ -1451,6 +1455,8 @@ class GitShallowTest(FetcherTest):
1451 1455
1452 bb.utils.mkdirhier(self.srcdir) 1456 bb.utils.mkdirhier(self.srcdir)
1453 self.git('init', cwd=self.srcdir) 1457 self.git('init', cwd=self.srcdir)
1458 self.git('config user.email "you@example.com"', cwd=self.srcdir)
1459 self.git('config user.name "Your Name"', cwd=self.srcdir)
1454 self.d.setVar('WORKDIR', self.tempdir) 1460 self.d.setVar('WORKDIR', self.tempdir)
1455 self.d.setVar('S', self.gitdir) 1461 self.d.setVar('S', self.gitdir)
1456 self.d.delVar('PREMIRRORS') 1462 self.d.delVar('PREMIRRORS')
@@ -1684,6 +1690,8 @@ class GitShallowTest(FetcherTest):
1684 smdir = os.path.join(self.tempdir, 'gitsubmodule') 1690 smdir = os.path.join(self.tempdir, 'gitsubmodule')
1685 bb.utils.mkdirhier(smdir) 1691 bb.utils.mkdirhier(smdir)
1686 self.git('init', cwd=smdir) 1692 self.git('init', cwd=smdir)
1693 self.git('config user.email "you@example.com"', cwd=smdir)
1694 self.git('config user.name "Your Name"', cwd=smdir)
1687 # Make this look like it was cloned from a remote... 1695 # Make this look like it was cloned from a remote...
1688 self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir) 1696 self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir)
1689 self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir) 1697 self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir)
@@ -1714,6 +1722,8 @@ class GitShallowTest(FetcherTest):
1714 smdir = os.path.join(self.tempdir, 'gitsubmodule') 1722 smdir = os.path.join(self.tempdir, 'gitsubmodule')
1715 bb.utils.mkdirhier(smdir) 1723 bb.utils.mkdirhier(smdir)
1716 self.git('init', cwd=smdir) 1724 self.git('init', cwd=smdir)
1725 self.git('config user.email "you@example.com"', cwd=smdir)
1726 self.git('config user.name "Your Name"', cwd=smdir)
1717 # Make this look like it was cloned from a remote... 1727 # Make this look like it was cloned from a remote...
1718 self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir) 1728 self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir)
1719 self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir) 1729 self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir)
@@ -1756,7 +1766,7 @@ class GitShallowTest(FetcherTest):
1756 self.git('annex init', cwd=self.srcdir) 1766 self.git('annex init', cwd=self.srcdir)
1757 open(os.path.join(self.srcdir, 'c'), 'w').close() 1767 open(os.path.join(self.srcdir, 'c'), 'w').close()
1758 self.git('annex add c', cwd=self.srcdir) 1768 self.git('annex add c', cwd=self.srcdir)
1759 self.git('commit -m annex-c -a', cwd=self.srcdir) 1769 self.git('commit --author "Foo Bar <foo@bar>" -m annex-c -a', cwd=self.srcdir)
1760 bb.process.run('chmod u+w -R %s' % os.path.join(self.srcdir, '.git', 'annex')) 1770 bb.process.run('chmod u+w -R %s' % os.path.join(self.srcdir, '.git', 'annex'))
1761 1771
1762 uri = 'gitannex://%s;protocol=file;subdir=${S}' % self.srcdir 1772 uri = 'gitannex://%s;protocol=file;subdir=${S}' % self.srcdir
@@ -2032,6 +2042,8 @@ class GitLfsTest(FetcherTest):
2032 2042
2033 bb.utils.mkdirhier(self.srcdir) 2043 bb.utils.mkdirhier(self.srcdir)
2034 self.git('init', cwd=self.srcdir) 2044 self.git('init', cwd=self.srcdir)
2045 self.git('config user.email "you@example.com"', cwd=self.srcdir)
2046 self.git('config user.name "Your Name"', cwd=self.srcdir)
2035 with open(os.path.join(self.srcdir, '.gitattributes'), 'wt') as attrs: 2047 with open(os.path.join(self.srcdir, '.gitattributes'), 'wt') as attrs:
2036 attrs.write('*.mp3 filter=lfs -text') 2048 attrs.write('*.mp3 filter=lfs -text')
2037 self.git(['add', '.gitattributes'], cwd=self.srcdir) 2049 self.git(['add', '.gitattributes'], cwd=self.srcdir)