diff options
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 871c174e82..8ca7e6c155 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -429,9 +429,15 @@ class FetcherTest(unittest.TestCase): | |||
| 429 | # a common setup is to use other default | 429 | # a common setup is to use other default |
| 430 | # branch than master. | 430 | # branch than master. |
| 431 | self.git(['checkout', '-b', 'master'], cwd=cwd) | 431 | self.git(['checkout', '-b', 'master'], cwd=cwd) |
| 432 | if not self.git(['config', 'user.email'], cwd=cwd): | 432 | |
| 433 | try: | ||
| 434 | self.git(['config', 'user.email'], cwd=cwd) | ||
| 435 | except bb.process.ExecutionError: | ||
| 433 | self.git(['config', 'user.email', 'you@example.com'], cwd=cwd) | 436 | self.git(['config', 'user.email', 'you@example.com'], cwd=cwd) |
| 434 | if not self.git(['config', 'user.name'], cwd=cwd): | 437 | |
| 438 | try: | ||
| 439 | self.git(['config', 'user.name'], cwd=cwd) | ||
| 440 | except bb.process.ExecutionError: | ||
| 435 | self.git(['config', 'user.name', 'Your Name'], cwd=cwd) | 441 | self.git(['config', 'user.name', 'Your Name'], cwd=cwd) |
| 436 | 442 | ||
| 437 | class MirrorUriTest(FetcherTest): | 443 | class MirrorUriTest(FetcherTest): |
| @@ -3038,7 +3044,7 @@ class FetchPremirroronlyLocalTest(FetcherTest): | |||
| 3038 | self.mirrorname = "git2_git.fake.repo.bitbake.tar.gz" | 3044 | self.mirrorname = "git2_git.fake.repo.bitbake.tar.gz" |
| 3039 | recipeurl = "git:/git.fake.repo/bitbake" | 3045 | recipeurl = "git:/git.fake.repo/bitbake" |
| 3040 | os.makedirs(self.gitdir) | 3046 | os.makedirs(self.gitdir) |
| 3041 | self.git("init", self.gitdir) | 3047 | self.git_init(cwd=self.gitdir) |
| 3042 | for i in range(0): | 3048 | for i in range(0): |
| 3043 | self.git_new_commit() | 3049 | self.git_new_commit() |
| 3044 | bb.process.run('tar -czvf {} .'.format(os.path.join(self.mirrordir, self.mirrorname)), cwd = self.gitdir) | 3050 | bb.process.run('tar -czvf {} .'.format(os.path.join(self.mirrordir, self.mirrorname)), cwd = self.gitdir) |
