summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
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-12-04 17:24:01 +0000
commit738fc234fa4dc04a2d5b57ceb187044b25adac90 (patch)
treef2cb434c60f3e80e67292550f0d623038724d493 /bitbake/lib/bb/tests/fetch.py
parentf79c0d45fa5772462775934ee5ace05325ee9d3a (diff)
downloadpoky-738fc234fa4dc04a2d5b57ceb187044b25adac90.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: 0eadcf94540c7e4a634c5c1e873658b65996f334) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c4c4465b32e82d4b6e46a44e776be5039aef6b18) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-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