aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-02-24 18:50:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-28 14:50:36 +0000
commita750c57242928c546a5aace632543e956ee908eb (patch)
treefdd9d13870c4e2464388316f9b9669b658ce0174 /lib/bb/tests/fetch.py
parente4bf4ad4b99978483541a719105c98ea124e8a34 (diff)
downloadbitbake-contrib-a750c57242928c546a5aace632543e956ee908eb.tar.gz
tests: add test for gitsm fetcher
Use a newly created "git-submodule-test" repo on git.yoctoproject.org which currently contains one submodule (the bitbake repository). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tests/fetch.py')
-rw-r--r--lib/bb/tests/fetch.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index deb1d3733..156da83de 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -417,6 +417,13 @@ class FetcherNetworkTest(FetcherTest):
self.d.setVar("PREMIRRORS", "%s git://%s;protocol=file \n" % (dummyurl, self.sourcedir))
self.gitfetcher(dummyurl, dummyurl)
+ def test_git_submodule(self):
+ fetcher = bb.fetch.Fetch(["gitsm://git.yoctoproject.org/git-submodule-test;rev=f12e57f2edf0aa534cf1616fa983d165a92b0842"], self.d)
+ fetcher.download()
+ # Previous cwd has been deleted
+ os.chdir(os.path.dirname(self.unpackdir))
+ fetcher.unpack(self.unpackdir)
+
class URLHandle(unittest.TestCase):
datatable = {