summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-25 16:04:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-03 10:12:42 +0000
commit5acc6975063b82e34aa99366fedb1ce5c4238f70 (patch)
treee16ab57f4fc59132185b6756f3691fa59710ee17 /bitbake/lib/bb/tests/fetch.py
parente17d4895ca069d3d5b268f8be561c3651c132b5c (diff)
downloadpoky-5acc6975063b82e34aa99366fedb1ce5c4238f70.tar.gz
bitbake: fetch2/git: Allow git fetcher to support subdir param
The git fetcher is odd in that it supports destsuffix as a parameter but not the default documented subdir parameter. destsuffix is more limited as it can't take absolute paths. Rework the code to correctly support subdir. Also cleanup to use the None default .get() values and be a bit more pythonic and use subpath as the variable name for subpath for code clarity. We could consider dropping destsuffix as a parameter as some future point. Also fix the tests not to pass in a subdir parameter which was never used but now causes errors. (Bitbake rev: 66953f06fe822e4001efabd9fc1c985ea2b03f96) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-rw-r--r--bitbake/lib/bb/tests/fetch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index a008e7cc5b..e1638bc478 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -2157,7 +2157,7 @@ class GitLfsTest(FetcherTest):
2157 def test_lfs_enabled(self): 2157 def test_lfs_enabled(self):
2158 import shutil 2158 import shutil
2159 2159
2160 uri = 'git://%s;protocol=file;subdir=${S};lfs=1' % self.srcdir 2160 uri = 'git://%s;protocol=file;lfs=1' % self.srcdir
2161 self.d.setVar('SRC_URI', uri) 2161 self.d.setVar('SRC_URI', uri)
2162 2162
2163 # Careful: suppress initial attempt at downloading until 2163 # Careful: suppress initial attempt at downloading until
@@ -2182,7 +2182,7 @@ class GitLfsTest(FetcherTest):
2182 def test_lfs_disabled(self): 2182 def test_lfs_disabled(self):
2183 import shutil 2183 import shutil
2184 2184
2185 uri = 'git://%s;protocol=file;subdir=${S};lfs=0' % self.srcdir 2185 uri = 'git://%s;protocol=file;lfs=0' % self.srcdir
2186 self.d.setVar('SRC_URI', uri) 2186 self.d.setVar('SRC_URI', uri)
2187 2187
2188 # In contrast to test_lfs_enabled(), allow the implicit download 2188 # In contrast to test_lfs_enabled(), allow the implicit download