mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
insane.bbclass: Allow INSANE_SKIP to work on a per test basis
(From OE-Core rev: fbff17f0f01db55c7093f089ec06840179c389bd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
+20
-17
@@ -383,7 +383,7 @@ def package_qa_check_staged(path,d):
|
|||||||
return sane
|
return sane
|
||||||
|
|
||||||
# Walk over all files in a directory and call func
|
# Walk over all files in a directory and call func
|
||||||
def package_qa_walk(path, warnfuncs, errorfuncs, package, d):
|
def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
|
||||||
import oe.qa
|
import oe.qa
|
||||||
|
|
||||||
#if this will throw an exception, then fix the dict above
|
#if this will throw an exception, then fix the dict above
|
||||||
@@ -414,7 +414,7 @@ def package_qa_walk(path, warnfuncs, errorfuncs, package, d):
|
|||||||
|
|
||||||
return len(errors) == 0
|
return len(errors) == 0
|
||||||
|
|
||||||
def package_qa_check_rdepends(pkg, pkgdest, d):
|
def package_qa_check_rdepends(pkg, pkgdest, skip, d):
|
||||||
sane = True
|
sane = True
|
||||||
if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg:
|
if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg:
|
||||||
# Copied from package_ipk.bbclass
|
# Copied from package_ipk.bbclass
|
||||||
@@ -439,7 +439,7 @@ def package_qa_check_rdepends(pkg, pkgdest, d):
|
|||||||
|
|
||||||
# Now do the sanity check!!!
|
# Now do the sanity check!!!
|
||||||
for rdepend in rdepends:
|
for rdepend in rdepends:
|
||||||
if "-dbg" in rdepend:
|
if "-dbg" in rdepend and "debug-deps" not in skip:
|
||||||
error_msg = "%s rdepends on %s" % (pkgname,rdepend)
|
error_msg = "%s rdepends on %s" % (pkgname,rdepend)
|
||||||
sane = package_qa_handle_error("debug-deps", error_msg, d)
|
sane = package_qa_handle_error("debug-deps", error_msg, d)
|
||||||
|
|
||||||
@@ -480,27 +480,30 @@ python do_package_qa () {
|
|||||||
testmatrix = d.getVarFlags("QAPATHTEST")
|
testmatrix = d.getVarFlags("QAPATHTEST")
|
||||||
|
|
||||||
g = globals()
|
g = globals()
|
||||||
warnchecks = []
|
|
||||||
for w in (d.getVar("WARN_QA", True) or "").split():
|
|
||||||
if w in testmatrix and testmatrix[w] in g:
|
|
||||||
warnchecks.append(g[testmatrix[w]])
|
|
||||||
errorchecks = []
|
|
||||||
for e in (d.getVar("ERROR_QA", True) or "").split():
|
|
||||||
if e in testmatrix and testmatrix[e] in g:
|
|
||||||
errorchecks.append(g[testmatrix[e]])
|
|
||||||
|
|
||||||
walk_sane = True
|
walk_sane = True
|
||||||
rdepends_sane = True
|
rdepends_sane = True
|
||||||
for package in packages.split():
|
for package in packages.split():
|
||||||
if bb.data.getVar('INSANE_SKIP_' + package, d, True):
|
skip = (bb.data.getVar('INSANE_SKIP_' + package, d, True) or "").split()
|
||||||
bb.note("Package: %s (skipped)" % package)
|
if skip:
|
||||||
continue
|
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]])
|
||||||
|
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]])
|
||||||
|
|
||||||
bb.note("Checking Package: %s" % package)
|
bb.note("Checking Package: %s" % package)
|
||||||
path = "%s/%s" % (pkgdest, package)
|
path = "%s/%s" % (pkgdest, package)
|
||||||
if not package_qa_walk(path, warnchecks, errorchecks, package, d):
|
if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d):
|
||||||
walk_sane = False
|
walk_sane = False
|
||||||
if not package_qa_check_rdepends(package, pkgdest, d):
|
if not package_qa_check_rdepends(package, pkgdest, skip, d):
|
||||||
rdepends_sane = False
|
rdepends_sane = False
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user