Patchwork [bitbake-devel,4/4] tests: add test for gitsm fetcher

login
register
mail settings
Submitter Paul Eggleton
Date Feb. 24, 2014, 6:50 p.m.
Message ID <31788164c1466d385b7d76a03228662df32a70d2.1393267755.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/67327/
State New
Headers show

Comments

Paul Eggleton - Feb. 24, 2014, 6:50 p.m.
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>
---
 lib/bb/tests/fetch.py | 7 +++++++
 1 file changed, 7 insertions(+)

Patch

diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index deb1d37..156da83 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 = {