From 745babbaa4cf65e032fe2671b53fc2c5a1dfb95c Mon Sep 17 00:00:00 2001 From: Stefan Herbrechtsmeier Date: Fri, 5 Sep 2025 08:20:44 +0200 Subject: bitbake: tests: fetch: add test case for local paths (Bitbake rev: 3938f8e1128b47e4c589f1492f43100e9f1661ee) Signed-off-by: Stefan Herbrechtsmeier Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- bitbake/lib/bb/tests/fetch.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bitbake/lib') 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): alt = os.path.join(self.unpackdir, 'git/.git/objects/info/alternates') self.assertFalse(os.path.exists(alt)) + def test_localpaths(self): + localpaths = { + "file://archive.tar.gz": + f"{self.localsrcdir}/archive.tar.gz", + "https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz": + f"{self.dldir}/bitbake-1.0.tar.gz", + "git://git.openembedded.org/bitbake;branch=master;protocol=https;rev=270a05b0b4ba0959fe0624d2a4885d7b70426da5": + f"{self.dldir}/git2/git.openembedded.org.bitbake", + } + fetcher = bb.fetch2.Fetch(localpaths.keys(), self.d) + self.assertEqual(fetcher.localpaths(), list(localpaths.values())) + class FetcherNoNetworkTest(FetcherTest): def setUp(self): super().setUp() -- cgit v1.2.3-54-g00ecf