From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/4] insane: factor out the test matrix processing
Date: Thu, 24 Nov 2016 23:44:23 +0000 [thread overview]
Message-ID: <1480031065-19435-2-git-send-email-ross.burton@intel.com> (raw)
In-Reply-To: <1480031065-19435-1-git-send-email-ross.burton@intel.com>
Pull the test matrix processing out as a function so it can be reused.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/classes/insane.bbclass | 46 ++++++++++++++++++++++++---------------------
1 file changed, 25 insertions(+), 21 deletions(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 9f3065f..0ba4cae 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1116,7 +1116,6 @@ python do_package_qa () {
if not packages:
return
- testmatrix = d.getVarFlags("QAPATHTEST")
import re
# The package name matches the [a-z0-9.+-]+ regular expression
pkgname_pattern = re.compile("^[a-z0-9.+-]+$")
@@ -1126,28 +1125,33 @@ python do_package_qa () {
for dep in taskdepdata:
taskdeps.add(taskdepdata[dep][0])
- g = globals()
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", True) 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", True) 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
+
skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
if skip:
bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
- warnchecks = []
- for w in (d.getVar("WARN_QA", True) 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", True) 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)
+
bb.note("Checking Package: %s" % package)
# Check package name
@@ -1155,8 +1159,8 @@ python do_package_qa () {
package_qa_handle_error("pkgname",
"%s doesn't match the [a-z0-9.+-]+ regex" % package, d)
- path = "%s/%s" % (pkgdest, package)
- package_qa_walk(warnchecks, errorchecks, skip, package, d)
+ warn_checks, error_checks = parse_test_matrix("QAPATHTEST")
+ package_qa_walk(warn_checks, error_checks, skip, package, d)
package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d)
package_qa_check_deps(package, pkgdest, skip, d)
--
2.8.1
next prev parent reply other threads:[~2016-11-24 23:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-24 23:44 [PATCH 1/4] insane: fix expanded-d test Ross Burton
2016-11-24 23:44 ` Ross Burton [this message]
2016-11-24 23:44 ` [PATCH 3/4] insane: add QAPKGTEST, a package-wide equivilant to QAPATHTEST Ross Burton
2016-11-24 23:44 ` [PATCH 4/4] insane: rewrite the expanded-d test as a QAPKGTEST Ross Burton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480031065-19435-2-git-send-email-ross.burton@intel.com \
--to=ross.burton@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox