bitbake: tests/fetch: add a test for download paths without a proper filename

For example the miniupnpd recipe has a SRC_URI like this:

    http://miniupnp.tuxfamily.org/files/download.php?file=${BP}.tar.gz

In this case the path is /files/download.php, which isn't useful when
the latest_upstream logic bails early if there is no version in the path.

The logic now also checks in the downloadfilename, so add a test that
this works as expected.

(Bitbake rev: fffbf5d5e1c8556cddf0794e0b303bb0106747a0)

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:23 +00:00 committed by Richard Purdie
parent 58c015cdd7
commit 43a2be2897
2 changed files with 3534 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1524,6 +1524,12 @@ class FetchLatestVersionTest(FetcherTest):
# http://ftp.debian.org/debian/pool/main/m/minicom/minicom_2.7.1.orig.tar.gz
WgetTestData("minicom", "/debian/pool/main/m/minicom/minicom_2.7.1.orig.tar.gz")
: "2.8",
#
# packages where the path doesn't actually contain the filename, so downloadfilename should be respected
#
WgetTestData("miniupnpd", "/software/miniupnp/download.php?file=miniupnpd_2.1.20191006.tar.gz;downloadfilename=miniupnpd_2.1.20191006.tar.gz", pv="2.1.20191006", check_uri="/software/miniupnp/download.php", check_regex=r"miniupnpd-(?P<pver>\d+(\.\d+)+)\.tar")
: "2.3.7",
}
test_crate_uris = {