@@ -2243,13 +2243,12 @@ class GitLfsTest(FetcherTest):
# we know whether git-lfs is installed.
fetcher, ud = self.fetch(uri=None, download=False)
self.assertIsNotNone(ud.method._find_git_lfs)
+ self.assertTrue(ud.method._find_git_lfs(self.d),
+ msg="git-lfs not found. Cannot test git-lfs without git-lfs in the PATH")
- # If git-lfs can be found, the unpack should be successful. Only
- # attempt this with the real live copy of git-lfs installed.
- if ud.method._find_git_lfs(self.d):
- fetcher.download()
- shutil.rmtree(self.gitdir, ignore_errors=True)
- fetcher.unpack(self.d.getVar('WORKDIR'))
+ fetcher.download()
+ shutil.rmtree(self.gitdir, ignore_errors=True)
+ fetcher.unpack(self.d.getVar('WORKDIR'))
# If git-lfs cannot be found, the unpack should throw an error
with self.assertRaises(bb.fetch2.FetchError):
If git lfs does not exist in the host the test does not run all the code paths possible, thus is not reproducile Signed-off-by: Paulo Neves <paulo@myneves.com> --- lib/bb/tests/fetch.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) -- 2.34.1