1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

bitbake: tests/fetch: use subtests in the wget tests

As we test multiple URLs in this these tests and one failing abandons the test,
use subtests so all URLs are tested. This should help us identify patterns in
the failing URLs.

(Bitbake rev: c4c4465b32e82d4b6e46a44e776be5039aef6b18)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2017-11-03 11:48:36 +00:00
committed by Richard Purdie
parent c11104b061
commit 30b25d216e
+10 -8
View File
@@ -848,10 +848,11 @@ class FetchCheckStatusTest(FetcherTest):
def test_wget_checkstatus(self): def test_wget_checkstatus(self):
fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d) fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d)
for u in self.test_wget_uris: for u in self.test_wget_uris:
ud = fetch.ud[u] with self.subTest(url=u):
m = ud.method ud = fetch.ud[u]
ret = m.checkstatus(fetch, ud, self.d) m = ud.method
self.assertTrue(ret, msg="URI %s, can't check status" % (u)) ret = m.checkstatus(fetch, ud, self.d)
self.assertTrue(ret, msg="URI %s, can't check status" % (u))
@skipIfNoNetwork() @skipIfNoNetwork()
def test_wget_checkstatus_connection_cache(self): def test_wget_checkstatus_connection_cache(self):
@@ -862,10 +863,11 @@ class FetchCheckStatusTest(FetcherTest):
connection_cache = connection_cache) connection_cache = connection_cache)
for u in self.test_wget_uris: for u in self.test_wget_uris:
ud = fetch.ud[u] with self.subTest(url=u):
m = ud.method ud = fetch.ud[u]
ret = m.checkstatus(fetch, ud, self.d) m = ud.method
self.assertTrue(ret, msg="URI %s, can't check status" % (u)) ret = m.checkstatus(fetch, ud, self.d)
self.assertTrue(ret, msg="URI %s, can't check status" % (u))
connection_cache.close_connections() connection_cache.close_connections()