diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2024-02-19 01:38:03 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-19 15:08:30 +0000 |
commit | 21603031df33b820daf7c37e2c8c824848368367 (patch) | |
tree | b54b78b8199d27f102c0ed3070171d461319a9b4 /bitbake/lib/bb/tests | |
parent | 272d5ae098e3519b4d484f36a0497cb944667f74 (diff) | |
download | poky-21603031df33b820daf7c37e2c8c824848368367.tar.gz |
bitbake: tests/fetch: Make test_git_latest_versionstring support a max version
In some cases, the version found by latest_versionstring() may be higher
than the real version. Make it possible to specify a maximum version so
that this case can be detected.
(Bitbake rev: 9134d4777109bc78410c3e641420d9a78b485e33)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests')
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 522d89de65..ca869fb24c 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -1389,36 +1389,36 @@ class FetchLatestVersionTest(FetcherTest): | |||
1389 | 1389 | ||
1390 | test_git_uris = { | 1390 | test_git_uris = { |
1391 | # version pattern "X.Y.Z" | 1391 | # version pattern "X.Y.Z" |
1392 | ("mx-1.0", "git://github.com/clutter-project/mx.git;branch=mx-1.4;protocol=https", "9b1db6b8060bd00b121a692f942404a24ae2960f", "") | 1392 | ("mx-1.0", "git://github.com/clutter-project/mx.git;branch=mx-1.4;protocol=https", "9b1db6b8060bd00b121a692f942404a24ae2960f", "", "") |
1393 | : "1.99.4", | 1393 | : "1.99.4", |
1394 | # version pattern "vX.Y" | 1394 | # version pattern "vX.Y" |
1395 | # mirror of git.infradead.org since network issues interfered with testing | 1395 | # mirror of git.infradead.org since network issues interfered with testing |
1396 | ("mtd-utils", "git://git.yoctoproject.org/mtd-utils.git;branch=master;protocol=https", "ca39eb1d98e736109c64ff9c1aa2a6ecca222d8f", "") | 1396 | ("mtd-utils", "git://git.yoctoproject.org/mtd-utils.git;branch=master;protocol=https", "ca39eb1d98e736109c64ff9c1aa2a6ecca222d8f", "", "") |
1397 | : "1.5.0", | 1397 | : "1.5.0", |
1398 | # version pattern "pkg_name-X.Y" | 1398 | # version pattern "pkg_name-X.Y" |
1399 | # mirror of git://anongit.freedesktop.org/git/xorg/proto/presentproto since network issues interfered with testing | 1399 | # mirror of git://anongit.freedesktop.org/git/xorg/proto/presentproto since network issues interfered with testing |
1400 | ("presentproto", "git://git.yoctoproject.org/bbfetchtests-presentproto;branch=master;protocol=https", "24f3a56e541b0a9e6c6ee76081f441221a120ef9", "") | 1400 | ("presentproto", "git://git.yoctoproject.org/bbfetchtests-presentproto;branch=master;protocol=https", "24f3a56e541b0a9e6c6ee76081f441221a120ef9", "", "") |
1401 | : "1.0", | 1401 | : "1.0", |
1402 | # version pattern "pkg_name-vX.Y.Z" | 1402 | # version pattern "pkg_name-vX.Y.Z" |
1403 | ("dtc", "git://git.yoctoproject.org/bbfetchtests-dtc.git;branch=master;protocol=https", "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf", "") | 1403 | ("dtc", "git://git.yoctoproject.org/bbfetchtests-dtc.git;branch=master;protocol=https", "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf", "", "") |
1404 | : "1.4.0", | 1404 | : "1.4.0", |
1405 | # combination version pattern | 1405 | # combination version pattern |
1406 | ("sysprof", "git://gitlab.gnome.org/GNOME/sysprof.git;protocol=https;branch=master", "cd44ee6644c3641507fb53b8a2a69137f2971219", "") | 1406 | ("sysprof", "git://gitlab.gnome.org/GNOME/sysprof.git;protocol=https;branch=master", "cd44ee6644c3641507fb53b8a2a69137f2971219", "", "") |
1407 | : "1.2.0", | 1407 | : "1.2.0", |
1408 | ("u-boot-mkimage", "git://git.denx.de/u-boot.git;branch=master;protocol=git", "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c", "") | 1408 | ("u-boot-mkimage", "git://git.denx.de/u-boot.git;branch=master;protocol=git", "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c", "", "") |
1409 | : "2014.01", | 1409 | : "2014.01", |
1410 | # version pattern "yyyymmdd" | 1410 | # version pattern "yyyymmdd" |
1411 | ("mobile-broadband-provider-info", "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=master", "4ed19e11c2975105b71b956440acdb25d46a347d", "") | 1411 | ("mobile-broadband-provider-info", "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=master", "4ed19e11c2975105b71b956440acdb25d46a347d", "", "") |
1412 | : "20120614", | 1412 | : "20120614", |
1413 | # packages with a valid UPSTREAM_CHECK_GITTAGREGEX | 1413 | # packages with a valid UPSTREAM_CHECK_GITTAGREGEX |
1414 | # mirror of git://anongit.freedesktop.org/xorg/driver/xf86-video-omap since network issues interfered with testing | 1414 | # mirror of git://anongit.freedesktop.org/xorg/driver/xf86-video-omap since network issues interfered with testing |
1415 | ("xf86-video-omap", "git://git.yoctoproject.org/bbfetchtests-xf86-video-omap;branch=master;protocol=https", "ae0394e687f1a77e966cf72f895da91840dffb8f", r"(?P<pver>(\d+\.(\d\.?)*))") | 1415 | ("xf86-video-omap", "git://git.yoctoproject.org/bbfetchtests-xf86-video-omap;branch=master;protocol=https", "ae0394e687f1a77e966cf72f895da91840dffb8f", r"(?P<pver>(\d+\.(\d\.?)*))", "") |
1416 | : "0.4.3", | 1416 | : "0.4.3", |
1417 | ("build-appliance-image", "git://git.yoctoproject.org/poky;branch=master;protocol=https", "b37dd451a52622d5b570183a81583cc34c2ff555", r"(?P<pver>(([0-9][\.|_]?)+[0-9]))") | 1417 | ("build-appliance-image", "git://git.yoctoproject.org/poky;branch=master;protocol=https", "b37dd451a52622d5b570183a81583cc34c2ff555", r"(?P<pver>(([0-9][\.|_]?)+[0-9]))", "") |
1418 | : "11.0.0", | 1418 | : "11.0.0", |
1419 | ("chkconfig-alternatives-native", "git://github.com/kergoth/chkconfig;branch=sysroot;protocol=https", "cd437ecbd8986c894442f8fce1e0061e20f04dee", r"chkconfig\-(?P<pver>((\d+[\.\-_]*)+))") | 1419 | ("chkconfig-alternatives-native", "git://github.com/kergoth/chkconfig;branch=sysroot;protocol=https", "cd437ecbd8986c894442f8fce1e0061e20f04dee", r"chkconfig\-(?P<pver>((\d+[\.\-_]*)+))", "") |
1420 | : "1.3.59", | 1420 | : "1.3.59", |
1421 | ("remake", "git://github.com/rocky/remake.git;protocol=https;branch=master", "f05508e521987c8494c92d9c2871aec46307d51d", r"(?P<pver>(\d+\.(\d+\.)*\d*(\+dbg\d+(\.\d+)*)*))") | 1421 | ("remake", "git://github.com/rocky/remake.git;protocol=https;branch=master", "f05508e521987c8494c92d9c2871aec46307d51d", r"(?P<pver>(\d+\.(\d+\.)*\d*(\+dbg\d+(\.\d+)*)*))", "") |
1422 | : "3.82+dbg0.9", | 1422 | : "3.82+dbg0.9", |
1423 | } | 1423 | } |
1424 | 1424 | ||
@@ -1487,6 +1487,9 @@ class FetchLatestVersionTest(FetcherTest): | |||
1487 | self.assertTrue(verstring, msg="Could not find upstream version for %s" % k[0]) | 1487 | self.assertTrue(verstring, msg="Could not find upstream version for %s" % k[0]) |
1488 | r = bb.utils.vercmp_string(v, verstring) | 1488 | r = bb.utils.vercmp_string(v, verstring) |
1489 | self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (k[0], v, verstring)) | 1489 | self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (k[0], v, verstring)) |
1490 | if k[4]: | ||
1491 | r = bb.utils.vercmp_string(verstring, k[4]) | ||
1492 | self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (k[0], verstring, k[4])) | ||
1490 | 1493 | ||
1491 | def test_wget_latest_versionstring(self): | 1494 | def test_wget_latest_versionstring(self): |
1492 | testdata = os.path.dirname(os.path.abspath(__file__)) + "/fetch-testdata" | 1495 | testdata = os.path.dirname(os.path.abspath(__file__)) + "/fetch-testdata" |