summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-11-24 18:02:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 17:21:43 +0000
commit67965302e271c48520ec32c0b57ea649c77efbb5 (patch)
tree304417971f6825f9a4c9c51d6a2d9f6899476500 /meta/classes
parent71c8568b387de4baa9f6cc17e8666eb3bb02cafe (diff)
downloadpoky-67965302e271c48520ec32c0b57ea649c77efbb5.tar.gz
insane: factor out the test matrix processing
Pull the test matrix processing out as a function so it can be reused. (From OE-Core rev: 3caccd3f6079b7e284d32e1eb0217107425e7bf8) (From OE-Core rev: 3b21c285d4ff08ae6f613700c5936e39e7e3051d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/insane.bbclass46
1 files changed, 25 insertions, 21 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 9f3065fdc7..0ba4cae23e 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1116,7 +1116,6 @@ python do_package_qa () {
1116 if not packages: 1116 if not packages:
1117 return 1117 return
1118 1118
1119 testmatrix = d.getVarFlags("QAPATHTEST")
1120 import re 1119 import re
1121 # The package name matches the [a-z0-9.+-]+ regular expression 1120 # The package name matches the [a-z0-9.+-]+ regular expression
1122 pkgname_pattern = re.compile("^[a-z0-9.+-]+$") 1121 pkgname_pattern = re.compile("^[a-z0-9.+-]+$")
@@ -1126,28 +1125,33 @@ python do_package_qa () {
1126 for dep in taskdepdata: 1125 for dep in taskdepdata:
1127 taskdeps.add(taskdepdata[dep][0]) 1126 taskdeps.add(taskdepdata[dep][0])
1128 1127
1129 g = globals()
1130 for package in packages: 1128 for package in packages:
1129 def parse_test_matrix(matrix_name):
1130 testmatrix = d.getVarFlags(matrix_name) or {}
1131 g = globals()
1132 warnchecks = []
1133 for w in (d.getVar("WARN_QA", True) or "").split():
1134 if w in skip:
1135 continue
1136 if w in testmatrix and testmatrix[w] in g:
1137 warnchecks.append(g[testmatrix[w]])
1138 if w == 'unsafe-references-in-binaries':
1139 oe.utils.write_ld_so_conf(d)
1140
1141 errorchecks = []
1142 for e in (d.getVar("ERROR_QA", True) or "").split():
1143 if e in skip:
1144 continue
1145 if e in testmatrix and testmatrix[e] in g:
1146 errorchecks.append(g[testmatrix[e]])
1147 if e == 'unsafe-references-in-binaries':
1148 oe.utils.write_ld_so_conf(d)
1149 return warnchecks, errorchecks
1150
1131 skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split() 1151 skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
1132 if skip: 1152 if skip:
1133 bb.note("Package %s skipping QA tests: %s" % (package, str(skip))) 1153 bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
1134 warnchecks = [] 1154
1135 for w in (d.getVar("WARN_QA", True) or "").split():
1136 if w in skip:
1137 continue
1138 if w in testmatrix and testmatrix[w] in g:
1139 warnchecks.append(g[testmatrix[w]])
1140 if w == 'unsafe-references-in-binaries':
1141 oe.utils.write_ld_so_conf(d)
1142
1143 errorchecks = []
1144 for e in (d.getVar("ERROR_QA", True) or "").split():
1145 if e in skip:
1146 continue
1147 if e in testmatrix and testmatrix[e] in g:
1148 errorchecks.append(g[testmatrix[e]])
1149 if e == 'unsafe-references-in-binaries':
1150 oe.utils.write_ld_so_conf(d)
1151 1155
1152 bb.note("Checking Package: %s" % package) 1156 bb.note("Checking Package: %s" % package)
1153 # Check package name 1157 # Check package name
@@ -1155,8 +1159,8 @@ python do_package_qa () {
1155 package_qa_handle_error("pkgname", 1159 package_qa_handle_error("pkgname",
1156 "%s doesn't match the [a-z0-9.+-]+ regex" % package, d) 1160 "%s doesn't match the [a-z0-9.+-]+ regex" % package, d)
1157 1161
1158 path = "%s/%s" % (pkgdest, package) 1162 warn_checks, error_checks = parse_test_matrix("QAPATHTEST")
1159 package_qa_walk(warnchecks, errorchecks, skip, package, d) 1163 package_qa_walk(warn_checks, error_checks, skip, package, d)
1160 1164
1161 package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d) 1165 package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d)
1162 package_qa_check_deps(package, pkgdest, skip, d) 1166 package_qa_check_deps(package, pkgdest, skip, d)