All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/fetch: use subtests in the wget tests
@ 2017-11-07 10:32 Ross Burton
  2017-11-07 11:07 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2017-11-07 10:32 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 bitbake/lib/bb/tests/fetch.py | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index f1799a7eff3..b07bf00470f 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -848,10 +848,11 @@ class FetchCheckStatusTest(FetcherTest):
     def test_wget_checkstatus(self):
         fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d)
         for u in self.test_wget_uris:
-            ud = fetch.ud[u]
-            m = ud.method
-            ret = m.checkstatus(fetch, ud, self.d)
-            self.assertTrue(ret, msg="URI %s, can't check status" % (u))
+            with self.subTest(url=u):
+                ud = fetch.ud[u]
+                m = ud.method
+                ret = m.checkstatus(fetch, ud, self.d)
+                self.assertTrue(ret, msg="URI %s, can't check status" % (u))
 
     @skipIfNoNetwork()
     def test_wget_checkstatus_connection_cache(self):
@@ -862,10 +863,11 @@ class FetchCheckStatusTest(FetcherTest):
                     connection_cache = connection_cache)
 
         for u in self.test_wget_uris:
-            ud = fetch.ud[u]
-            m = ud.method
-            ret = m.checkstatus(fetch, ud, self.d)
-            self.assertTrue(ret, msg="URI %s, can't check status" % (u))
+            with self.subTest(url=u):
+                ud = fetch.ud[u]
+                m = ud.method
+                ret = m.checkstatus(fetch, ud, self.d)
+                self.assertTrue(ret, msg="URI %s, can't check status" % (u))
 
         connection_cache.close_connections()
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ patchtest: failure for tests/fetch: use subtests in the wget tests
  2017-11-07 10:32 [PATCH] tests/fetch: use subtests in the wget tests Ross Burton
@ 2017-11-07 11:07 ` Patchwork
  0 siblings, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-11-07 11:07 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core

== Series Details ==

Series: tests/fetch: use subtests in the wget tests
Revision: 1
URL   : https://patchwork.openembedded.org/series/9647/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists [test_target_mailing_list] 
  Suggested fix    Send the series again to the correct mailing list (ML)
  Suggested ML     bitbake-devel@lists.openembedded.org [http://git.openembedded.org/bitbake/]
  Patch's path:    bitbake/lib/bb/tests/fetch.py

* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 73c6f85457)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] tests/fetch: use subtests in the wget tests
@ 2017-11-07 11:09 Ross Burton
  0 siblings, 0 replies; 3+ messages in thread
From: Ross Burton @ 2017-11-07 11:09 UTC (permalink / raw)
  To: bitbake-devel

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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 bitbake/lib/bb/tests/fetch.py | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index f1799a7eff3..b07bf00470f 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -848,10 +848,11 @@ class FetchCheckStatusTest(FetcherTest):
     def test_wget_checkstatus(self):
         fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d)
         for u in self.test_wget_uris:
-            ud = fetch.ud[u]
-            m = ud.method
-            ret = m.checkstatus(fetch, ud, self.d)
-            self.assertTrue(ret, msg="URI %s, can't check status" % (u))
+            with self.subTest(url=u):
+                ud = fetch.ud[u]
+                m = ud.method
+                ret = m.checkstatus(fetch, ud, self.d)
+                self.assertTrue(ret, msg="URI %s, can't check status" % (u))
 
     @skipIfNoNetwork()
     def test_wget_checkstatus_connection_cache(self):
@@ -862,10 +863,11 @@ class FetchCheckStatusTest(FetcherTest):
                     connection_cache = connection_cache)
 
         for u in self.test_wget_uris:
-            ud = fetch.ud[u]
-            m = ud.method
-            ret = m.checkstatus(fetch, ud, self.d)
-            self.assertTrue(ret, msg="URI %s, can't check status" % (u))
+            with self.subTest(url=u):
+                ud = fetch.ud[u]
+                m = ud.method
+                ret = m.checkstatus(fetch, ud, self.d)
+                self.assertTrue(ret, msg="URI %s, can't check status" % (u))
 
         connection_cache.close_connections()
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-07 11:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 10:32 [PATCH] tests/fetch: use subtests in the wget tests Ross Burton
2017-11-07 11:07 ` ✗ patchtest: failure for " Patchwork
2017-11-07 11:09 [PATCH] " Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.