diff options
author | Ross Burton <ross.burton@intel.com> | 2016-11-24 20:26:44 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-30 15:48:07 +0000 |
commit | b8f0acf70d68357a1917719d42aa21a4bf6234fb (patch) | |
tree | 553082d321dad93a04b15a7cadf2e38e55146538 /meta | |
parent | 4a7a2b4777741057b0b9f4cb3323a10127746abe (diff) | |
download | poky-b8f0acf70d68357a1917719d42aa21a4bf6234fb.tar.gz |
insane: add QAPKGTEST, a package-wide equivilant to QAPATHTEST
QAPATHTEST defines a function that is executed for every file in every package.
For tests which just need to look at the datastore this is massive overkill.
Add QAPKGTEST, which is invoked for each package in the recipe.
(From OE-Core rev: acc3cc26099c77e4eeb44c75bc7167ab58ef1147)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/insane.bbclass | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 0ba4cae23e..407ccee739 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -822,6 +822,23 @@ def package_qa_check_staged(path,d): | |||
822 | 822 | ||
823 | return sane | 823 | return sane |
824 | 824 | ||
825 | # Run all package-wide warnfuncs and errorfuncs | ||
826 | def package_qa_package(warnfuncs, errorfuncs, skip, package, d): | ||
827 | warnings = {} | ||
828 | errors = {} | ||
829 | |||
830 | for func in warnfuncs: | ||
831 | func(package, d, warnings) | ||
832 | for func in errorfuncs: | ||
833 | func(package, d, errors) | ||
834 | |||
835 | for w in warnings: | ||
836 | package_qa_handle_error(w, warnings[w], d) | ||
837 | for e in errors: | ||
838 | package_qa_handle_error(e, errors[e], d) | ||
839 | |||
840 | return len(errors) == 0 | ||
841 | |||
825 | # Walk over all files in a directory and call func | 842 | # Walk over all files in a directory and call func |
826 | def package_qa_walk(warnfuncs, errorfuncs, skip, package, d): | 843 | def package_qa_walk(warnfuncs, errorfuncs, skip, package, d): |
827 | import oe.qa | 844 | import oe.qa |
@@ -1162,6 +1179,9 @@ python do_package_qa () { | |||
1162 | warn_checks, error_checks = parse_test_matrix("QAPATHTEST") | 1179 | warn_checks, error_checks = parse_test_matrix("QAPATHTEST") |
1163 | package_qa_walk(warn_checks, error_checks, skip, package, d) | 1180 | package_qa_walk(warn_checks, error_checks, skip, package, d) |
1164 | 1181 | ||
1182 | warn_checks, error_checks = parse_test_matrix("QAPKGTEST") | ||
1183 | package_qa_package(warn_checks, error_checks, skip, package, d) | ||
1184 | |||
1165 | package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d) | 1185 | package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d) |
1166 | package_qa_check_deps(package, pkgdest, skip, d) | 1186 | package_qa_check_deps(package, pkgdest, skip, d) |
1167 | 1187 | ||