bitbake: tests/fetch: support setting PV in the wget fetcher

Some code paths in latest_versionstring() need PV to be set correctly.

(Bitbake rev: 0a9f90ff658e09feda63b398ec35715a65ff6193)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2025-03-26 12:25:22 +00:00
committed by Richard Purdie
parent 63246241f9
commit 58c015cdd7

View File

@@ -1472,7 +1472,7 @@ class FetchLatestVersionTest(FetcherTest):
: "0.28.0",
}
WgetTestData = collections.namedtuple("WgetTestData", ["pn", "path", "check_uri", "check_regex"], defaults=[None, None])
WgetTestData = collections.namedtuple("WgetTestData", ["pn", "path", "pv", "check_uri", "check_regex"], defaults=[None, None, None])
test_wget_uris = {
#
# packages with versions inside directory name
@@ -1558,6 +1558,7 @@ class FetchLatestVersionTest(FetcherTest):
for data, v in self.test_wget_uris.items():
with self.subTest(pn=data.pn):
self.d.setVar("PN", data.pn)
self.d.setVar("PV", data.pv)
if data.check_uri:
checkuri = "http://127.0.0.1:%s/%s" % (port, data.check_uri)
self.d.setVar("UPSTREAM_CHECK_URI", checkuri)