From patchwork Tue Nov 7 10:32:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 118143 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3804192qgn; Tue, 7 Nov 2017 02:33:02 -0800 (PST) X-Google-Smtp-Source: ABhQp+QfBQhODF05J61hKbtE21qnhTYYA3roIYKIKQexrHT9xnCYrTrCsl9whjFveokbPQsJmFbV X-Received: by 10.101.65.6 with SMTP id w6mr18323427pgp.365.1510050782808; Tue, 07 Nov 2017 02:33:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510050782; cv=none; d=google.com; s=arc-20160816; b=nCQ9WGCD9+xiByzwjHFjHyHoY9oiSpFLiXqYn4Ho2D29va40QXzwRZlxan/Il+9lRm 3/MTaY8pJZsNxlTmvUWMTBgh4hkUqUWiVeJqHsopW8Kg80GUS0xfboq8Rid5Z1yZvRHb N2eiYF4O24XixhYj1SYjT9x3hqCl/ph8Jp3JRVjh8L+iUzxBzmK9X22C0oBDW7UDerSh zrw8GxivGKm1H0CCnspVQby75Gd7I5hoFB9YsyyF8F73ex9JroJGrtJx42petN0sZvjw lv+V6TbLnohnvDfVMxgG2a725wElxKjGLe0rwvn9+YDwol7kCKQr/ae1GLA0RceVTqMV WYrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=aLVqKG0d/2KIlG3aDfQOkJitqWByXJ3YZ2TyQ22uj2k=; b=mpxIKoERb7e+wgTofrcxiMsmswlcc/vZff6vRjgAU8iB7LooSUvpoUxN6xewpOn4tr 5WaRWCKFg/ZCQs/sFhaMUTW9ufNx8dpv3P0gWEsYRcgLACqXc0pmAJE2frh9jxdmmjRy CSDzMlISgR2vQEJFxVEsLLYUHBxmh8UQjQyi5OxGeEGgOmyPPdg94gE/RejgqnZ/8RPt gj6kJT2qhB9EWCkCAFez8uT0KBU/DyqR1N15YstIuynL/OXLi0KEplf9IwjI6XcwxejZ ueWqvsYkm/MXf/Rmq6gicFMpw+OvlqQyqBOagPQP4I0SoLWFSYY7FPm8IzfUEV7N7dNe /YgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=qS6lARrz; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 64si841539pla.657.2017.11.07.02.33.02; Tue, 07 Nov 2017 02:33:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=qS6lARrz; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id DB0DE7845B; Tue, 7 Nov 2017 10:32:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by mail.openembedded.org (Postfix) with ESMTP id 84C7978445 for ; Tue, 7 Nov 2017 10:32:45 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id l22so608624wrc.11 for ; Tue, 07 Nov 2017 02:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=0OkKokS0GhDc4wQUKQ5MmU1h4zVO+qTxG8IvpCjXR8Y=; b=qS6lARrzBuEI7C3gJX4oZbJiBwQYYDoHKI4HwzbxlUofeHIaR8JkM/PuHTulAxuqcJ rFekOU0b6g+ajRApHw3Ae0dwCU97DOMDPMNaNBkdJjSlyJraAIfFDMvb6349TIX7PmLL xwkUBTeS64vMMsg1A9vnEdPomXEme/eN7pG4ufcZocxXueLCl1qbew2JrPTPVkECdwOY i38CeOzdwwsDX53Ls9QhjgabrQn4pOpO8QtKCKEyNvYCdgGi9HN0QmX2t9JwRwVFNoq5 uC4o0C68ySFejEl/D90FRdewQHH/jdZZfRiZwYmFNe49TU9KzlMJQPye0uOms2mCFVyD RulQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=0OkKokS0GhDc4wQUKQ5MmU1h4zVO+qTxG8IvpCjXR8Y=; b=dv8+2iB5nc9ToX9IwzlT8H8dtDS5Y87DC4oLAHM7tt9vruN4iu4bx70hc6cpkkVDrY QkqGeT3qy+9Yn0n466AiMZk2UKJ9rQXF958OfU8PjmAHrcHH4neAV16fhgcC4UlAx4Hv 610qtNAYtU1eIwwejThfytu/EsQJ+8u6H0TcSdG48Md6WFmh4+gyw+A/krJuSvt8gmCR zxmyGdDsg2sezs46LaF111q4H4GOIF9BqwqO/DTHWuX46N6ADBKM2bOPrdPurS0dFQLF eBfAGpAb4MM28tS0aADGQ9Ssu0gVJ6Ehk7offCS3gKVczh0WYXSQ31NQS22JCZxhcR/i yQxw== X-Gm-Message-State: AJaThX5aMDahsSmiarCNaIK+gFdrmUxfZBsHmSqKLr0662df43gdjtGy G7HQAYsHJiK9+xRcP0G/L9Pckjbx X-Received: by 10.223.175.199 with SMTP id y7mr2367958wrd.207.1510050765995; Tue, 07 Nov 2017 02:32:45 -0800 (PST) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id x75sm1480188wme.29.2017.11.07.02.32.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 02:32:45 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Tue, 7 Nov 2017 10:32:43 +0000 Message-Id: <20171107103243.9420-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] tests/fetch: use subtests in the wget tests X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org 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 --- bitbake/lib/bb/tests/fetch.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core 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()