From patchwork Mon Jun 19 15:07:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 105859 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp920966qgd; Mon, 19 Jun 2017 08:07:58 -0700 (PDT) X-Received: by 10.84.224.141 with SMTP id s13mr8735179plj.217.1497884877977; Mon, 19 Jun 2017 08:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497884877; cv=none; d=google.com; s=arc-20160816; b=wwmIRrX0Zz9NVk1d8KND5gKG+o2VJO3AdSJRc60e6kz5fLxz9LVhnLwXy4KfymNFQ8 Le/b5SZbav1+0qr8k3N6AG7y8dlu7AxGoBK/a8hwiOGfh5sYCB0CGVUtBsDwWpJKcdxC ea0PLMcwyb+bW6Zm5hOITyVHsno2nckxR+QdYEFIwxgFVuliLPSkDxJ6RXc9ANTZl1Z8 EPoV8MedxUy80S//T8C7svxWr8hOyXPFyuJbEzFIySk4rCIXnlWddg/Wre5a6T2NkLjZ sDySd6qvpJKJdTIeCbrT+aXXy1LtvCNbisFxlcP0HxRULmasIqV0jB8Ygp/d+oetgzr3 x7zw== 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=fF7HljSrhQIU1R9w8poHPzcXMudFa+MCKHm7SQfT6KM=; b=y5W4kAGIzUH5xmXUhxrj+xfBnL1/6FppD23Jz3kbaKX71JN58catwP8qCZlVniES5+ wfvbG5zZRVBjqkhT5fijpOkS7u/+FvxyuZpQ6gnxnNM61UMHba12k/wt9u2T0Etx88HD I+chqJtwbkXJAXOVZtbGyQ9vPmviAKvMxoiLS91OFMngpYW5QlM3OA2lWzJopqLCyJ8M 9G4XXTKFRnPTmMN+JryjH+r6tMk31b1sQQvp9Z85vX1sLHUc1gvKhLINQPoGH7mubzuz n4gZLqFkwGbdbZ6dDgxnJ0bX8+6WtNLdb9FglI81OLotyStrNZVp+7CPJnxXtR9aXC/U kE4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.b=CCrhZ5i/; 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 i62si8202598pfi.231.2017.06.19.08.07.57; Mon, 19 Jun 2017 08:07:57 -0700 (PDT) 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.b=CCrhZ5i/; 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 EC8E5780FA; Mon, 19 Jun 2017 15:07:54 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by mail.openembedded.org (Postfix) with ESMTP id 7530A780BD for ; Mon, 19 Jun 2017 15:07:44 +0000 (UTC) Received: by mail-wr0-f172.google.com with SMTP id y25so37112653wrd.2 for ; Mon, 19 Jun 2017 08:07:46 -0700 (PDT) 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=hgH+fy+rfTj7G4AjoUbcPJQjcvBnp/xaIuszIMRkMaU=; b=CCrhZ5i/LFc+7s1PNWhtvP81Fm3QPx++3uMs4dgaCtYrTzCENASNNLVhzSZkd6TybN v3RrvAwjAYhajS9Ju1ql4b0VNX61At8VzJVbtWNDdARZp/RTDrE422LfGA3LwiqN+EUd yY4hNnq7R79lJypOyX4XyqWTpjktuX5JgE8SVrP902g82pjVxsmfHADFEJgP0CK9Evvt yOvhd2zwVi9qhO4x8DczMaUR5Xzeec/biSIjbbuksRwLvfyGMI7Z1HT3z68pcdvf6Cj4 DvlViXNekiFGI0OQ4HN0MH2gjaUfBxFfXjxbZlix4QiFxQjFyK2K165mQov/mPX0Me2D q9EA== 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=hgH+fy+rfTj7G4AjoUbcPJQjcvBnp/xaIuszIMRkMaU=; b=DJ28grApKJLkGhVWtVeQA/Hx5C4MItigPaqDebXTBc3RHInpWtZWMHxiqUf0cpRw1H Nj10dWABYrjtrTAlw4RFqtThPgmXVqaOnajWzDBeIMObzUZXkD7gv7xbZb5RMwiYM2A6 b9LVfrH82JIPDOMuXsUdOawCR1VYZMqb/uCuZHe1vBugOO3xmO1HtIhe7s6+2Dzd3C/F hwesCoIiL8aXCnW1ppAgh4ponBR7S+Oyd7tm+hp4+oEClGdT0pgdbxsCVNtv2e+K3WYl Kj3/0JdrQ+Jaywx7cFeVujhnLwFrbs0j0sl5tSeufGLAhgSd6K4GbSVuOWeC9ocr3Z7k NZCQ== X-Gm-Message-State: AKS2vOyxG3aSBXyG/grZpr509HY0TFmUSGnFbUU4lmSGEjGFBx75AIbE dUGZO8Uhfo+pjTcTCYs= X-Received: by 10.223.142.202 with SMTP id q68mr6589995wrb.13.1497884865139; Mon, 19 Jun 2017 08:07:45 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id f21sm15987569wra.5.2017.06.19.08.07.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 08:07:44 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 19 Jun 2017 16:07:40 +0100 Message-Id: <20170619150741.14635-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH 1/2] insane: rename pkg to pn because that is what it is 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 Signed-off-by: Ross Burton --- meta/classes/insane.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index eecd5763c7e..17c9058b04e 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -1060,7 +1060,7 @@ python do_package_qa () { package_qa_check_encoding(['DESCRIPTION', 'SUMMARY', 'LICENSE', 'SECTION'], 'utf-8', d) logdir = d.getVar('T') - pkg = d.getVar('PN') + pn = d.getVar('PN') # Check the compile log for host contamination compilelog = os.path.join(logdir,"log.do_compile") @@ -1069,7 +1069,7 @@ python do_package_qa () { statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog if subprocess.call(statement, shell=True) == 0: msg = "%s: The compile log indicates that host include and/or library paths were used.\n \ - Please check the log '%s' for more information." % (pkg, compilelog) + Please check the log '%s' for more information." % (pn, compilelog) package_qa_handle_error("compile-host-path", msg, d) # Check the install log for host contamination @@ -1079,7 +1079,7 @@ python do_package_qa () { statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog if subprocess.call(statement, shell=True) == 0: msg = "%s: The install log indicates that host include and/or library paths were used.\n \ - Please check the log '%s' for more information." % (pkg, installlog) + Please check the log '%s' for more information." % (pn, installlog) package_qa_handle_error("install-host-path", msg, d) # Scan the packages... From patchwork Mon Jun 19 15:07:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 105858 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp920918qgd; Mon, 19 Jun 2017 08:07:51 -0700 (PDT) X-Received: by 10.99.97.5 with SMTP id v5mr23296737pgb.77.1497884871889; Mon, 19 Jun 2017 08:07:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497884871; cv=none; d=google.com; s=arc-20160816; b=kxDVZ/GwPWzkvIA7kBQq5wfBwVRq98N80s3Kzt769ky9+d1oX2fH7wRpYsQsI3vNh0 XzWqpZeOrR9LT/wuM3B4vatw1G26uYqz6d31m3GxWjf0+9ggAl2TBkXeYNLRO7gpU4jt LgxJDvKp9dFFGU4ehe63263dV0DcraslnydZ45lCyK3oFefn1qAMmidf9l27bBuMEHCy 13+zzYkG1MsknHX8A+nyFD1OtJ0NnfeGHiSCTuigjRODx3bJX+Xe1YsFI0p65mkbfE+D Al/TyVEc/nqtvh3YWFITsv77zQo9l3a96Jfs5KHPO1BRyG12dFJO76IEhs92e0JXKpGd yAiQ== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=p1F/phUB9D4xGdi13c8r1yQHb3ZX4mAUsne8HtuI+R4=; b=g5v5YahLUDtB0A+1Lz3bwRoF+Vp33FYKqEfFVkrvqykLtsnNmRoDSA0lo8hTaT1tu/ gdZuj78/x957nt7rf1lfHIvc4RpXpkBwtQn7/M9dsptB+OZ2QwVd6uzpvY0ctoFWY2fA HAhoO0xpWPwOwUVG1dMGXm/rIFcEpdHFIWQy6RQ+HYkTlE0brY4H7Z6tjyYVInc0F16w ZWHLZAMknymvsQRaLezMqFx8iAQ1z8h1keYcZDSUGcURtvS5eGJJJgyNPlFL/BsDMl9T HqyIQL4YTrAcaufiuSIG48vldHgDXNUtBM8yzHnGKBLxeoNVnpDCUvhkb6p8NMmNRu8v Hz5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.b=wo7cftrS; 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 q63si8105031pfk.166.2017.06.19.08.07.51; Mon, 19 Jun 2017 08:07:51 -0700 (PDT) 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.b=wo7cftrS; 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 40AD4780BE; Mon, 19 Jun 2017 15:07:48 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by mail.openembedded.org (Postfix) with ESMTP id 6F468780B8 for ; Mon, 19 Jun 2017 15:07:45 +0000 (UTC) Received: by mail-wr0-f180.google.com with SMTP id 77so76359020wrb.1 for ; Mon, 19 Jun 2017 08:07:46 -0700 (PDT) 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:in-reply-to:references; bh=JouENV+GF45qTkQXmm8BtBbahR6kyQlZ2Bbe5vGoYzA=; b=wo7cftrSe+k3+gq/J/udL9q6BndmBx31nGrdHvKY3EsEMIFnyK3nwGQdLcM0CMLS7e Jry3cHiOR/J8Tol1bLKe/pzCQdDV1bbwUhyDSVBdD7Lkyj+GfQJK0SMQ7IGGSz7wDIxB 7FfYZFEvFV8t8inyxiz4BmTGdDNYhqar/e2UVZ4smoemRMO0K0o8ceLrZEh0EMAv5JQT pj8ar3rqfZpGqEVThvJytg3MQMzOjxzy+3eBlIN06QipjfCXqnnRFY9UtFAKBLpmcRW4 49vwNUqH8LYToI6KhYnjK0jdNH3KkP8PRD7sVHQYBs7zhW3bcnPzLOvmTiTQcpwY4hWg e+CQ== 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:in-reply-to :references; bh=JouENV+GF45qTkQXmm8BtBbahR6kyQlZ2Bbe5vGoYzA=; b=Blw7Kr3OEPqzizLHKi9dL8oKGYp8qmOzsD0oMTpD7qf5gwR7qyxb6mj34xmz1bp54z qf5RPp1Sm315gf5MfkPCnKkF7TdFirvESsJWvfPXjV5yEa3Gl8rpEtjhIzT3RQpb2DTs l3+C9TbWJfYebTfkVqkG/wkJ8KskFrJ0da3VhHJuyzmh5+dQl/1fGCOs2A1EixDQ75bb sJVPpb60PNRC/Tr15a0ThNzArt+qbQS+ytkjqEkd5BQ31Tdi2OwTuU1mk/D34WCAz1t7 /M6jfp5Tb96/Dl8kjPGgF0jK9AvDwSBCe8bhGcucv4PY5ZiMagbf2Q8mZbNyiO3OkGuF x0Fg== X-Gm-Message-State: AKS2vOyQbwDRJ2+ssaExOVO3TnT8P/DXNII5w4niRskcG64uetFCy3Xx zathemfOFBRfluNDJdE= X-Received: by 10.223.155.222 with SMTP id e30mr5224156wrc.55.1497884865948; Mon, 19 Jun 2017 08:07:45 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id f21sm15987569wra.5.2017.06.19.08.07.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 08:07:45 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 19 Jun 2017 16:07:41 +0100 Message-Id: <20170619150741.14635-2-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619150741.14635-1-ross.burton@intel.com> References: <20170619150741.14635-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 2/2] insane: add extensible framework for recipe-wide QA 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 Following QAPATHTEST (QA hook for each file in each package) and QAPKGTEST (QA hook for each package), add QARECIPETEST: a hook which is executed once per recipe in do_package_qa. This makes it trivial to add recipe-wide QA tests that integrate with the existing tests. Signed-off-by: Ross Burton --- meta/classes/insane.bbclass | 65 +++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 23 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 17c9058b04e..0e974b51471 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -808,6 +808,23 @@ def package_qa_package(warnfuncs, errorfuncs, skip, package, d): return len(errors) == 0 +# Run all recipe-wide warnfuncs and errorfuncs +def package_qa_recipe(warnfuncs, errorfuncs, skip, pn, d): + warnings = {} + errors = {} + + for func in warnfuncs: + func(pn, d, warnings) + for func in errorfuncs: + func(pn, d, errors) + + for w in warnings: + package_qa_handle_error(w, warnings[w], d) + for e in errors: + package_qa_handle_error(e, errors[e], d) + + return len(errors) == 0 + # Walk over all files in a directory and call func def package_qa_walk(warnfuncs, errorfuncs, skip, package, d): import oe.qa @@ -1108,34 +1125,33 @@ python do_package_qa () { for dep in taskdepdata: taskdeps.add(taskdepdata[dep][0]) - for package in packages: - def parse_test_matrix(matrix_name): - testmatrix = d.getVarFlags(matrix_name) or {} - g = globals() - warnchecks = [] - for w in (d.getVar("WARN_QA") or "").split(): - if w in skip: - continue - if w in testmatrix and testmatrix[w] in g: - warnchecks.append(g[testmatrix[w]]) - if w == 'unsafe-references-in-binaries': - oe.utils.write_ld_so_conf(d) - - errorchecks = [] - for e in (d.getVar("ERROR_QA") or "").split(): - if e in skip: - continue - if e in testmatrix and testmatrix[e] in g: - errorchecks.append(g[testmatrix[e]]) - if e == 'unsafe-references-in-binaries': - oe.utils.write_ld_so_conf(d) - return warnchecks, errorchecks + def parse_test_matrix(matrix_name): + testmatrix = d.getVarFlags(matrix_name) or {} + g = globals() + warnchecks = [] + for w in (d.getVar("WARN_QA") or "").split(): + if w in skip: + continue + if w in testmatrix and testmatrix[w] in g: + warnchecks.append(g[testmatrix[w]]) + if w == 'unsafe-references-in-binaries': + oe.utils.write_ld_so_conf(d) + + errorchecks = [] + for e in (d.getVar("ERROR_QA") or "").split(): + if e in skip: + continue + if e in testmatrix and testmatrix[e] in g: + errorchecks.append(g[testmatrix[e]]) + if e == 'unsafe-references-in-binaries': + oe.utils.write_ld_so_conf(d) + return warnchecks, errorchecks + for package in packages: skip = (d.getVar('INSANE_SKIP_' + package) or "").split() if skip: bb.note("Package %s skipping QA tests: %s" % (package, str(skip))) - bb.note("Checking Package: %s" % package) # Check package name if not pkgname_pattern.match(package): @@ -1151,6 +1167,9 @@ python do_package_qa () { package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d) package_qa_check_deps(package, pkgdest, skip, d) + warn_checks, error_checks = parse_test_matrix("QARECIPETEST") + package_qa_recipe(warn_checks, error_checks, skip, pn, d) + if 'libdir' in d.getVar("ALL_QA").split(): package_qa_check_libdir(d)