]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
tests: add test for gitsm fetcher
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 24 Feb 2014 18:50:05 +0000 (18:50 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Feb 2014 14:50:36 +0000 (14:50 +0000)
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>
lib/bb/tests/fetch.py

index deb1d3733b11a97d91d1b460f50e0c75cff0e5ad..156da83dec8443262422d023a157f7103eb327d0 100644 (file)
@@ -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 = {