summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/README3
-rw-r--r--bitbake/lib/bb/tests/fetch.py12
2 files changed, 10 insertions, 5 deletions
diff --git a/bitbake/README b/bitbake/README
index a5f5c1b64f..bdb1e81dc1 100644
--- a/bitbake/README
+++ b/bitbake/README
@@ -45,8 +45,7 @@ it has so many corner cases. The datastore has many tests too. Testing with the
45recommended before submitting patches, particularly to the fetcher and datastore. We also 45recommended before submitting patches, particularly to the fetcher and datastore. We also
46appreciate new test cases and may require them for more obscure issues. 46appreciate new test cases and may require them for more obscure issues.
47 47
48To run the tests "zstd" and "git" must be installed. Git must be correctly configured, in 48To run the tests "zstd" and "git" must be installed.
49particular the user.email and user.name values must be set.
50 49
51The assumption is made that this testsuite is run from an initialized OpenEmbedded build 50The assumption is made that this testsuite is run from an initialized OpenEmbedded build
52environment (i.e. `source oe-init-build-env` is used). If this is not the case, run the 51environment (i.e. `source oe-init-build-env` is used). If this is not the case, run the
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
437class MirrorUriTest(FetcherTest): 443class 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)