From: Paul Eggleton Date: Mon, 24 Feb 2014 18:50:05 +0000 (+0000) Subject: tests: add test for gitsm fetcher X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a750c57242928c546a5aace632543e956ee908eb;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Richard Purdie --- diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index deb1d3733b1..156da83dec8 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 = {