summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2025-09-05 08:20:44 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:15:34 +0000
commit745babbaa4cf65e032fe2671b53fc2c5a1dfb95c (patch)
treee200bc45ccb001d30723f31cc3c1a317cafc54d2 /bitbake/lib
parent740b8d5c6aad0e344faaf670354200db0f3b76f6 (diff)
downloadpoky-745babbaa4cf65e032fe2671b53fc2c5a1dfb95c.tar.gz
bitbake: tests: fetch: add test case for local paths
(Bitbake rev: 3938f8e1128b47e4c589f1492f43100e9f1661ee) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/tests/fetch.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index e027705bf4..6de0b5334e 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -888,6 +888,18 @@ class FetcherLocalTest(FetcherTest):
888 alt = os.path.join(self.unpackdir, 'git/.git/objects/info/alternates') 888 alt = os.path.join(self.unpackdir, 'git/.git/objects/info/alternates')
889 self.assertFalse(os.path.exists(alt)) 889 self.assertFalse(os.path.exists(alt))
890 890
891 def test_localpaths(self):
892 localpaths = {
893 "file://archive.tar.gz":
894 f"{self.localsrcdir}/archive.tar.gz",
895 "https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz":
896 f"{self.dldir}/bitbake-1.0.tar.gz",
897 "git://git.openembedded.org/bitbake;branch=master;protocol=https;rev=270a05b0b4ba0959fe0624d2a4885d7b70426da5":
898 f"{self.dldir}/git2/git.openembedded.org.bitbake",
899 }
900 fetcher = bb.fetch2.Fetch(localpaths.keys(), self.d)
901 self.assertEqual(fetcher.localpaths(), list(localpaths.values()))
902
891class FetcherNoNetworkTest(FetcherTest): 903class FetcherNoNetworkTest(FetcherTest):
892 def setUp(self): 904 def setUp(self):
893 super().setUp() 905 super().setUp()