diff options
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index ddf6e97439..c156168151 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -679,6 +679,8 @@ class FetcherLocalTest(FetcherTest): | |||
| 679 | prefix='gitfetch_localusehead_') | 679 | prefix='gitfetch_localusehead_') |
| 680 | src_dir = os.path.abspath(src_dir) | 680 | src_dir = os.path.abspath(src_dir) |
| 681 | bb.process.run("git init", cwd=src_dir) | 681 | bb.process.run("git init", cwd=src_dir) |
| 682 | bb.process.run("git config user.email 'you@example.com'", cwd=src_dir) | ||
| 683 | bb.process.run("git config user.name 'Your Name'", cwd=src_dir) | ||
| 682 | bb.process.run("git commit --allow-empty -m'Dummy commit'", | 684 | bb.process.run("git commit --allow-empty -m'Dummy commit'", |
| 683 | cwd=src_dir) | 685 | cwd=src_dir) |
| 684 | # Use other branch than master | 686 | # Use other branch than master |
| @@ -705,6 +707,8 @@ class FetcherLocalTest(FetcherTest): | |||
| 705 | prefix='gitfetch_localusehead_') | 707 | prefix='gitfetch_localusehead_') |
| 706 | src_dir = os.path.abspath(src_dir) | 708 | src_dir = os.path.abspath(src_dir) |
| 707 | bb.process.run("git init", cwd=src_dir) | 709 | bb.process.run("git init", cwd=src_dir) |
| 710 | bb.process.run("git config user.email 'you@example.com'", cwd=src_dir) | ||
| 711 | bb.process.run("git config user.name 'Your Name'", cwd=src_dir) | ||
| 708 | bb.process.run("git commit --allow-empty -m'Dummy commit'", | 712 | bb.process.run("git commit --allow-empty -m'Dummy commit'", |
| 709 | cwd=src_dir) | 713 | cwd=src_dir) |
| 710 | # Use other branch than master | 714 | # Use other branch than master |
| @@ -1390,6 +1394,8 @@ class GitMakeShallowTest(FetcherTest): | |||
| 1390 | self.gitdir = os.path.join(self.tempdir, 'gitshallow') | 1394 | self.gitdir = os.path.join(self.tempdir, 'gitshallow') |
| 1391 | bb.utils.mkdirhier(self.gitdir) | 1395 | bb.utils.mkdirhier(self.gitdir) |
| 1392 | bb.process.run('git init', cwd=self.gitdir) | 1396 | bb.process.run('git init', cwd=self.gitdir) |
| 1397 | bb.process.run('git config user.email "you@example.com"', cwd=self.gitdir) | ||
| 1398 | bb.process.run('git config user.name "Your Name"', cwd=self.gitdir) | ||
| 1393 | 1399 | ||
| 1394 | def assertRefs(self, expected_refs): | 1400 | def assertRefs(self, expected_refs): |
| 1395 | actual_refs = self.git(['for-each-ref', '--format=%(refname)']).splitlines() | 1401 | actual_refs = self.git(['for-each-ref', '--format=%(refname)']).splitlines() |
| @@ -1513,6 +1519,8 @@ class GitShallowTest(FetcherTest): | |||
| 1513 | 1519 | ||
| 1514 | bb.utils.mkdirhier(self.srcdir) | 1520 | bb.utils.mkdirhier(self.srcdir) |
| 1515 | self.git('init', cwd=self.srcdir) | 1521 | self.git('init', cwd=self.srcdir) |
| 1522 | self.git('config user.email "you@example.com"', cwd=self.srcdir) | ||
| 1523 | self.git('config user.name "Your Name"', cwd=self.srcdir) | ||
| 1516 | self.d.setVar('WORKDIR', self.tempdir) | 1524 | self.d.setVar('WORKDIR', self.tempdir) |
| 1517 | self.d.setVar('S', self.gitdir) | 1525 | self.d.setVar('S', self.gitdir) |
| 1518 | self.d.delVar('PREMIRRORS') | 1526 | self.d.delVar('PREMIRRORS') |
| @@ -1746,6 +1754,8 @@ class GitShallowTest(FetcherTest): | |||
| 1746 | smdir = os.path.join(self.tempdir, 'gitsubmodule') | 1754 | smdir = os.path.join(self.tempdir, 'gitsubmodule') |
| 1747 | bb.utils.mkdirhier(smdir) | 1755 | bb.utils.mkdirhier(smdir) |
| 1748 | self.git('init', cwd=smdir) | 1756 | self.git('init', cwd=smdir) |
| 1757 | self.git('config user.email "you@example.com"', cwd=smdir) | ||
| 1758 | self.git('config user.name "Your Name"', cwd=smdir) | ||
| 1749 | # Make this look like it was cloned from a remote... | 1759 | # Make this look like it was cloned from a remote... |
| 1750 | self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir) | 1760 | self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir) |
| 1751 | self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir) | 1761 | self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir) |
| @@ -1776,6 +1786,8 @@ class GitShallowTest(FetcherTest): | |||
| 1776 | smdir = os.path.join(self.tempdir, 'gitsubmodule') | 1786 | smdir = os.path.join(self.tempdir, 'gitsubmodule') |
| 1777 | bb.utils.mkdirhier(smdir) | 1787 | bb.utils.mkdirhier(smdir) |
| 1778 | self.git('init', cwd=smdir) | 1788 | self.git('init', cwd=smdir) |
| 1789 | self.git('config user.email "you@example.com"', cwd=smdir) | ||
| 1790 | self.git('config user.name "Your Name"', cwd=smdir) | ||
| 1779 | # Make this look like it was cloned from a remote... | 1791 | # Make this look like it was cloned from a remote... |
| 1780 | self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir) | 1792 | self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir) |
| 1781 | self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir) | 1793 | self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir) |
| @@ -1818,7 +1830,7 @@ class GitShallowTest(FetcherTest): | |||
| 1818 | self.git('annex init', cwd=self.srcdir) | 1830 | self.git('annex init', cwd=self.srcdir) |
| 1819 | open(os.path.join(self.srcdir, 'c'), 'w').close() | 1831 | open(os.path.join(self.srcdir, 'c'), 'w').close() |
| 1820 | self.git('annex add c', cwd=self.srcdir) | 1832 | self.git('annex add c', cwd=self.srcdir) |
| 1821 | self.git('commit -m annex-c -a', cwd=self.srcdir) | 1833 | self.git('commit --author "Foo Bar <foo@bar>" -m annex-c -a', cwd=self.srcdir) |
| 1822 | bb.process.run('chmod u+w -R %s' % os.path.join(self.srcdir, '.git', 'annex')) | 1834 | bb.process.run('chmod u+w -R %s' % os.path.join(self.srcdir, '.git', 'annex')) |
| 1823 | 1835 | ||
| 1824 | uri = 'gitannex://%s;protocol=file;subdir=${S}' % self.srcdir | 1836 | uri = 'gitannex://%s;protocol=file;subdir=${S}' % self.srcdir |
| @@ -2094,6 +2106,8 @@ class GitLfsTest(FetcherTest): | |||
| 2094 | 2106 | ||
| 2095 | bb.utils.mkdirhier(self.srcdir) | 2107 | bb.utils.mkdirhier(self.srcdir) |
| 2096 | self.git('init', cwd=self.srcdir) | 2108 | self.git('init', cwd=self.srcdir) |
| 2109 | self.git('config user.email "you@example.com"', cwd=self.srcdir) | ||
| 2110 | self.git('config user.name "Your Name"', cwd=self.srcdir) | ||
| 2097 | with open(os.path.join(self.srcdir, '.gitattributes'), 'wt') as attrs: | 2111 | with open(os.path.join(self.srcdir, '.gitattributes'), 'wt') as attrs: |
| 2098 | attrs.write('*.mp3 filter=lfs -text') | 2112 | attrs.write('*.mp3 filter=lfs -text') |
| 2099 | self.git(['add', '.gitattributes'], cwd=self.srcdir) | 2113 | self.git(['add', '.gitattributes'], cwd=self.srcdir) |
