summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/insane.bbclass65
1 files changed, 42 insertions, 23 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 17c9058b04..0e974b5147 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -808,6 +808,23 @@ def package_qa_package(warnfuncs, errorfuncs, skip, package, d):
808 808
809 return len(errors) == 0 809 return len(errors) == 0
810 810
811# Run all recipe-wide warnfuncs and errorfuncs
812def package_qa_recipe(warnfuncs, errorfuncs, skip, pn, d):
813 warnings = {}
814 errors = {}
815
816 for func in warnfuncs:
817 func(pn, d, warnings)
818 for func in errorfuncs:
819 func(pn, d, errors)
820
821 for w in warnings:
822 package_qa_handle_error(w, warnings[w], d)
823 for e in errors:
824 package_qa_handle_error(e, errors[e], d)
825
826 return len(errors) == 0
827
811# Walk over all files in a directory and call func 828# Walk over all files in a directory and call func
812def package_qa_walk(warnfuncs, errorfuncs, skip, package, d): 829def package_qa_walk(warnfuncs, errorfuncs, skip, package, d):
813 import oe.qa 830 import oe.qa
@@ -1108,34 +1125,33 @@ python do_package_qa () {
1108 for dep in taskdepdata: 1125 for dep in taskdepdata:
1109 taskdeps.add(taskdepdata[dep][0]) 1126 taskdeps.add(taskdepdata[dep][0])
1110 1127
1111 for package in packages: 1128 def parse_test_matrix(matrix_name):
1112 def parse_test_matrix(matrix_name): 1129 testmatrix = d.getVarFlags(matrix_name) or {}
1113 testmatrix = d.getVarFlags(matrix_name) or {} 1130 g = globals()
1114 g = globals() 1131 warnchecks = []
1115 warnchecks = [] 1132 for w in (d.getVar("WARN_QA") or "").split():
1116 for w in (d.getVar("WARN_QA") or "").split(): 1133 if w in skip:
1117 if w in skip: 1134 continue
1118 continue 1135 if w in testmatrix and testmatrix[w] in g:
1119 if w in testmatrix and testmatrix[w] in g: 1136 warnchecks.append(g[testmatrix[w]])
1120 warnchecks.append(g[testmatrix[w]]) 1137 if w == 'unsafe-references-in-binaries':
1121 if w == 'unsafe-references-in-binaries': 1138 oe.utils.write_ld_so_conf(d)
1122 oe.utils.write_ld_so_conf(d) 1139
1123 1140 errorchecks = []
1124 errorchecks = [] 1141 for e in (d.getVar("ERROR_QA") or "").split():
1125 for e in (d.getVar("ERROR_QA") or "").split(): 1142 if e in skip:
1126 if e in skip: 1143 continue
1127 continue 1144 if e in testmatrix and testmatrix[e] in g:
1128 if e in testmatrix and testmatrix[e] in g: 1145 errorchecks.append(g[testmatrix[e]])
1129 errorchecks.append(g[testmatrix[e]]) 1146 if e == 'unsafe-references-in-binaries':
1130 if e == 'unsafe-references-in-binaries': 1147 oe.utils.write_ld_so_conf(d)
1131 oe.utils.write_ld_so_conf(d) 1148 return warnchecks, errorchecks
1132 return warnchecks, errorchecks
1133 1149
1150 for package in packages:
1134 skip = (d.getVar('INSANE_SKIP_' + package) or "").split() 1151 skip = (d.getVar('INSANE_SKIP_' + package) or "").split()
1135 if skip: 1152 if skip:
1136 bb.note("Package %s skipping QA tests: %s" % (package, str(skip))) 1153 bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
1137 1154
1138
1139 bb.note("Checking Package: %s" % package) 1155 bb.note("Checking Package: %s" % package)
1140 # Check package name 1156 # Check package name
1141 if not pkgname_pattern.match(package): 1157 if not pkgname_pattern.match(package):
@@ -1151,6 +1167,9 @@ python do_package_qa () {
1151 package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d) 1167 package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d)
1152 package_qa_check_deps(package, pkgdest, skip, d) 1168 package_qa_check_deps(package, pkgdest, skip, d)
1153 1169
1170 warn_checks, error_checks = parse_test_matrix("QARECIPETEST")
1171 package_qa_recipe(warn_checks, error_checks, skip, pn, d)
1172
1154 if 'libdir' in d.getVar("ALL_QA").split(): 1173 if 'libdir' in d.getVar("ALL_QA").split():
1155 package_qa_check_libdir(d) 1174 package_qa_check_libdir(d)
1156 1175