summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-11-03 11:48:36 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-07 15:02:19 +0000
commit30b25d216ee8e7ef726ad4dc1600effd6483aae8 (patch)
tree2c78cb56ab975314206d6fa04a8226671e02acb0 /bitbake
parentc11104b0610f70a24ea46d4d75665b65cd507ae6 (diff)
downloadpoky-30b25d216ee8e7ef726ad4dc1600effd6483aae8.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/tests/fetch.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index f1799a7eff..b07bf00470 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -848,10 +848,11 @@ class FetchCheckStatusTest(FetcherTest):
848 def test_wget_checkstatus(self): 848 def test_wget_checkstatus(self):
849 fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d) 849 fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d)
850 for u in self.test_wget_uris: 850 for u in self.test_wget_uris:
851 ud = fetch.ud[u] 851 with self.subTest(url=u):
852 m = ud.method 852 ud = fetch.ud[u]
853 ret = m.checkstatus(fetch, ud, self.d) 853 m = ud.method
854 self.assertTrue(ret, msg="URI %s, can't check status" % (u)) 854 ret = m.checkstatus(fetch, ud, self.d)
855 self.assertTrue(ret, msg="URI %s, can't check status" % (u))
855 856
856 @skipIfNoNetwork() 857 @skipIfNoNetwork()
857 def test_wget_checkstatus_connection_cache(self): 858 def test_wget_checkstatus_connection_cache(self):
@@ -862,10 +863,11 @@ class FetchCheckStatusTest(FetcherTest):
862 connection_cache = connection_cache) 863 connection_cache = connection_cache)
863 864
864 for u in self.test_wget_uris: 865 for u in self.test_wget_uris:
865 ud = fetch.ud[u] 866 with self.subTest(url=u):
866 m = ud.method 867 ud = fetch.ud[u]
867 ret = m.checkstatus(fetch, ud, self.d) 868 m = ud.method
868 self.assertTrue(ret, msg="URI %s, can't check status" % (u)) 869 ret = m.checkstatus(fetch, ud, self.d)
870 self.assertTrue(ret, msg="URI %s, can't check status" % (u))
869 871
870 connection_cache.close_connections() 872 connection_cache.close_connections()
871 873