diff options
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 5fb5d04cb0..1497a3cff7 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -894,15 +894,23 @@ class FetcherNetworkTest(FetcherTest): | |||
| 894 | @skipIfNoNetwork() | 894 | @skipIfNoNetwork() |
| 895 | def test_git_submodule(self): | 895 | def test_git_submodule(self): |
| 896 | # URL with ssh submodules | 896 | # URL with ssh submodules |
| 897 | url = "gitsm://git.yoctoproject.org/git-submodule-test;branch=ssh-gitsm-tests;rev=0d3ffc14bce95e8b3a21a0a67bfe4c4a96ba6350" | 897 | url = "gitsm://git.yoctoproject.org/git-submodule-test;branch=ssh-gitsm-tests;rev=f53765f515e0eeca569ed385bb1c89ce008bb058" |
| 898 | # Original URL (comment this if you have ssh access to git.yoctoproject.org) | 898 | # Original URL (comment this if you have ssh access to git.yoctoproject.org) |
| 899 | url = "gitsm://git.yoctoproject.org/git-submodule-test;rev=f12e57f2edf0aa534cf1616fa983d165a92b0842" | 899 | url = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master;rev=132fea6e4dee56b61bcf5721c94e8b2445c6a017" |
| 900 | fetcher = bb.fetch.Fetch([url], self.d) | 900 | fetcher = bb.fetch.Fetch([url], self.d) |
| 901 | fetcher.download() | 901 | fetcher.download() |
| 902 | # Previous cwd has been deleted | 902 | # Previous cwd has been deleted |
| 903 | os.chdir(os.path.dirname(self.unpackdir)) | 903 | os.chdir(os.path.dirname(self.unpackdir)) |
| 904 | fetcher.unpack(self.unpackdir) | 904 | fetcher.unpack(self.unpackdir) |
| 905 | 905 | ||
| 906 | repo_path = os.path.join(self.tempdir, 'unpacked', 'git') | ||
| 907 | self.assertTrue(os.path.exists(repo_path), msg='Unpacked repository missing') | ||
| 908 | self.assertTrue(os.path.exists(os.path.join(repo_path, 'bitbake')), msg='bitbake submodule missing') | ||
| 909 | self.assertFalse(os.path.exists(os.path.join(repo_path, 'na')), msg='uninitialized submodule present') | ||
| 910 | |||
| 911 | # Only when we're running the extended test with a submodule's submodule, can we check this. | ||
| 912 | if os.path.exists(os.path.join(repo_path, 'bitbake-gitsm-test1')): | ||
| 913 | self.assertTrue(os.path.exists(os.path.join(repo_path, 'bitbake-gitsm-test1', 'bitbake')), msg='submodule of submodule missing') | ||
| 906 | 914 | ||
| 907 | class TrustedNetworksTest(FetcherTest): | 915 | class TrustedNetworksTest(FetcherTest): |
| 908 | def test_trusted_network(self): | 916 | def test_trusted_network(self): |
