[oe-commits] Richard Purdie : insane.bbclass: Allow INSANE_SKIP to work on a per test basis

git version control git at git.openembedded.org
Tue Jul 5 10:25:16 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: fbff17f0f01db55c7093f089ec06840179c389bd
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=fbff17f0f01db55c7093f089ec06840179c389bd

Author: Richard  Purdie <richard.purdie at linuxfoundation.org>
Date:   Mon Jul  4 17:12:32 2011 +0100

insane.bbclass: Allow INSANE_SKIP to work on a per test basis

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/insane.bbclass |   37 ++++++++++++++++++++-----------------
 1 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index a6f9c1e..3572ce7 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -383,7 +383,7 @@ def package_qa_check_staged(path,d):
     return sane
 
 # 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
 
     #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
 
-def package_qa_check_rdepends(pkg, pkgdest, d):
+def package_qa_check_rdepends(pkg, pkgdest, skip, d):
     sane = True
     if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg:
         # Copied from package_ipk.bbclass
@@ -439,7 +439,7 @@ def package_qa_check_rdepends(pkg, pkgdest, d):
 
         # Now do the sanity check!!!
         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)
                 sane = package_qa_handle_error("debug-deps", error_msg, d)
 
@@ -480,27 +480,30 @@ python do_package_qa () {
     testmatrix = d.getVarFlags("QAPATHTEST")
 
     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
     rdepends_sane = True
     for package in packages.split():
-        if bb.data.getVar('INSANE_SKIP_' + package, d, True):
-            bb.note("Package: %s (skipped)" % package)
-            continue
+        skip = (bb.data.getVar('INSANE_SKIP_' + package, d, True) or "").split()
+        if skip:
+            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)
         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
-        if not package_qa_check_rdepends(package, pkgdest, d):
+        if not package_qa_check_rdepends(package, pkgdest, skip, d):
             rdepends_sane = False
 
 





More information about the Openembedded-commits mailing list