From c2895edcdd99bf292cf56b65522f879669869724 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 24 Feb 2014 18:50:05 +0000 Subject: bitbake: 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). (Bitbake rev: a750c57242928c546a5aace632543e956ee908eb) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/tests/fetch.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bitbake/lib/bb/tests/fetch.py') diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index deb1d3733b..156da83dec 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/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 = { -- cgit v1.2.3-54-g00ecf