mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
insane.bbclass: Improve ability to detect enabled tests
Define an ALL_QA variable which can be used to determine which tests to run. Improve the libdir test to work in the case it is set to raise an error rather than a warning. (From OE-Core rev: 069992a502658e8e44b870601e2e189cd9596ec9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -116,6 +116,8 @@ def package_qa_get_machine_dict():
|
|||||||
WARN_QA ?= "ldflags useless-rpaths rpaths unsafe-references-in-binaries unsafe-references-in-scripts staticdev libdir"
|
WARN_QA ?= "ldflags useless-rpaths rpaths unsafe-references-in-binaries unsafe-references-in-scripts staticdev libdir"
|
||||||
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms"
|
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms"
|
||||||
|
|
||||||
|
ALL_QA = "${WARN_QA} ${ERROR_QA}"
|
||||||
|
|
||||||
def package_qa_clean_path(path,d):
|
def package_qa_clean_path(path,d):
|
||||||
""" Remove the common prefix from the path. In this case it is the TMPDIR"""
|
""" Remove the common prefix from the path. In this case it is the TMPDIR"""
|
||||||
return path.replace(d.getVar('TMPDIR',True),"")
|
return path.replace(d.getVar('TMPDIR',True),"")
|
||||||
@@ -722,7 +724,7 @@ python do_package_qa () {
|
|||||||
rdepends_sane = False
|
rdepends_sane = False
|
||||||
|
|
||||||
|
|
||||||
if 'libdir' in (d.getVar("WARN_QA", True) or "").split():
|
if 'libdir' in d.getVar("ALL_QA", True).split():
|
||||||
package_qa_check_libdir(d)
|
package_qa_check_libdir(d)
|
||||||
|
|
||||||
if not walk_sane or not rdepends_sane:
|
if not walk_sane or not rdepends_sane:
|
||||||
@@ -787,7 +789,7 @@ do_populate_sysroot[postfuncs] += "do_qa_staging "
|
|||||||
do_configure[postfuncs] += "do_qa_configure "
|
do_configure[postfuncs] += "do_qa_configure "
|
||||||
|
|
||||||
python () {
|
python () {
|
||||||
tests = d.getVar('WARN_QA', True) + " " + d.getVar('ERROR_QA', True)
|
tests = d.getVar('ALL_QA', True).split()
|
||||||
if tests.find("desktop") != -1:
|
if "desktop" in tests:
|
||||||
d.appendVar("PACKAGE_DEPENDS", "desktop-file-utils-native")
|
d.appendVar("PACKAGE_DEPENDS", "desktop-file-utils-native")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user