diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-31 12:38:49 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-31 16:56:25 +0100 |
| commit | f24ffc087b4edd3915bc6a5da61d35845499f36d (patch) | |
| tree | 3bc319de9dcf7ac7c840f3b4bb18199dcc8fc8f7 /bitbake/lib/bb/tests | |
| parent | f81127b6195dd94280389c3dd4a82abdad85faa8 (diff) | |
| download | poky-f24ffc087b4edd3915bc6a5da61d35845499f36d.tar.gz | |
bitbake: tests/fetch: Tweak to work on Fedora40
On Fedora40, "localhost" sometimes resolves to ::1 and sometimes to 127.0.0.1
and python only binds to one of the addresses, leading to test failures.
Use 127.0.0.1 explicitly to avoid problems of the name resolution, we're trying
to test things other than the host networking.
(Bitbake rev: 9adc6da42618f41bf0d6b558d62b2f3c13bedd61)
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index ed7a39a723..1e55cdd299 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -1525,7 +1525,7 @@ class FetchLatestVersionTest(FetcherTest): | |||
| 1525 | 1525 | ||
| 1526 | def test_wget_latest_versionstring(self): | 1526 | def test_wget_latest_versionstring(self): |
| 1527 | testdata = os.path.dirname(os.path.abspath(__file__)) + "/fetch-testdata" | 1527 | testdata = os.path.dirname(os.path.abspath(__file__)) + "/fetch-testdata" |
| 1528 | server = HTTPService(testdata) | 1528 | server = HTTPService(testdata, host="127.0.0.1") |
| 1529 | server.start() | 1529 | server.start() |
| 1530 | port = server.port | 1530 | port = server.port |
| 1531 | try: | 1531 | try: |
| @@ -1533,10 +1533,10 @@ class FetchLatestVersionTest(FetcherTest): | |||
| 1533 | self.d.setVar("PN", k[0]) | 1533 | self.d.setVar("PN", k[0]) |
| 1534 | checkuri = "" | 1534 | checkuri = "" |
| 1535 | if k[2]: | 1535 | if k[2]: |
| 1536 | checkuri = "http://localhost:%s/" % port + k[2] | 1536 | checkuri = "http://127.0.0.1:%s/" % port + k[2] |
| 1537 | self.d.setVar("UPSTREAM_CHECK_URI", checkuri) | 1537 | self.d.setVar("UPSTREAM_CHECK_URI", checkuri) |
| 1538 | self.d.setVar("UPSTREAM_CHECK_REGEX", k[3]) | 1538 | self.d.setVar("UPSTREAM_CHECK_REGEX", k[3]) |
| 1539 | url = "http://localhost:%s/" % port + k[1] | 1539 | url = "http://127.0.0.1:%s/" % port + k[1] |
| 1540 | ud = bb.fetch2.FetchData(url, self.d) | 1540 | ud = bb.fetch2.FetchData(url, self.d) |
| 1541 | pupver = ud.method.latest_versionstring(ud, self.d) | 1541 | pupver = ud.method.latest_versionstring(ud, self.d) |
| 1542 | verstring = pupver[0] | 1542 | verstring = pupver[0] |
