diff options
Diffstat (limited to 'bitbake/lib/bb/tests')
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 54148b3fdf..73eefc5938 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -2666,6 +2666,45 @@ class NPMTest(FetcherTest): | |||
| 2666 | 2666 | ||
| 2667 | @skipIfNoNpm() | 2667 | @skipIfNoNpm() |
| 2668 | @skipIfNoNetwork() | 2668 | @skipIfNoNetwork() |
| 2669 | def test_npmsw_git(self): | ||
| 2670 | swfile = self.create_shrinkwrap_file({ | ||
| 2671 | 'dependencies': { | ||
| 2672 | 'cookie': { | ||
| 2673 | 'version': 'github:jshttp/cookie.git#aec1177c7da67e3b3273df96cf476824dbc9ae09', | ||
| 2674 | 'from': 'github:jshttp/cookie.git' | ||
| 2675 | } | ||
| 2676 | } | ||
| 2677 | }) | ||
| 2678 | fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) | ||
| 2679 | fetcher.download() | ||
| 2680 | self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'github.com.jshttp.cookie.git'))) | ||
| 2681 | |||
| 2682 | swfile = self.create_shrinkwrap_file({ | ||
| 2683 | 'dependencies': { | ||
| 2684 | 'cookie': { | ||
| 2685 | 'version': 'jshttp/cookie.git#aec1177c7da67e3b3273df96cf476824dbc9ae09', | ||
| 2686 | 'from': 'jshttp/cookie.git' | ||
| 2687 | } | ||
| 2688 | } | ||
| 2689 | }) | ||
| 2690 | fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) | ||
| 2691 | fetcher.download() | ||
| 2692 | self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'github.com.jshttp.cookie.git'))) | ||
| 2693 | |||
| 2694 | swfile = self.create_shrinkwrap_file({ | ||
| 2695 | 'dependencies': { | ||
| 2696 | 'nodejs': { | ||
| 2697 | 'version': 'gitlab:gitlab-examples/nodejs.git#892a1f16725e56cc3a2cb0d677be42935c8fc262', | ||
| 2698 | 'from': 'gitlab:gitlab-examples/nodejs' | ||
| 2699 | } | ||
| 2700 | } | ||
| 2701 | }) | ||
| 2702 | fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) | ||
| 2703 | fetcher.download() | ||
| 2704 | self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'gitlab.com.gitlab-examples.nodejs.git'))) | ||
| 2705 | |||
| 2706 | @skipIfNoNpm() | ||
| 2707 | @skipIfNoNetwork() | ||
| 2669 | def test_npmsw_dev(self): | 2708 | def test_npmsw_dev(self): |
| 2670 | swfile = self.create_shrinkwrap_file({ | 2709 | swfile = self.create_shrinkwrap_file({ |
| 2671 | 'dependencies': { | 2710 | 'dependencies': { |
