summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-04 17:12:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-05 11:39:09 +0100
commit7e07f03bc4d08cbec514a9a0a3eda3e57df1c404 (patch)
treeaae2fdedbe5c8e90b4ecb79fd882a896114b187b /meta/classes/insane.bbclass
parent2f22d86f4c2d1d04206990ab1f279462e92d1b48 (diff)
downloadpoky-7e07f03bc4d08cbec514a9a0a3eda3e57df1c404.tar.gz
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>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass37
1 files changed, 20 insertions, 17 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index a6f9c1ea9a..3572ce7b4f 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -383,7 +383,7 @@ def package_qa_check_staged(path,d):
383 return sane 383 return sane
384 384
385# Walk over all files in a directory and call func 385# Walk over all files in a directory and call func
386def package_qa_walk(path, warnfuncs, errorfuncs, package, d): 386def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
387 import oe.qa 387 import oe.qa
388 388
389 #if this will throw an exception, then fix the dict above 389 #if this will throw an exception, then fix the dict above
@@ -414,7 +414,7 @@ def package_qa_walk(path, warnfuncs, errorfuncs, package, d):
414 414
415 return len(errors) == 0 415 return len(errors) == 0
416 416
417def package_qa_check_rdepends(pkg, pkgdest, d): 417def package_qa_check_rdepends(pkg, pkgdest, skip, d):
418 sane = True 418 sane = True
419 if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg: 419 if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg:
420 # Copied from package_ipk.bbclass 420 # Copied from package_ipk.bbclass
@@ -439,7 +439,7 @@ def package_qa_check_rdepends(pkg, pkgdest, d):
439 439
440 # Now do the sanity check!!! 440 # Now do the sanity check!!!
441 for rdepend in rdepends: 441 for rdepend in rdepends:
442 if "-dbg" in rdepend: 442 if "-dbg" in rdepend and "debug-deps" not in skip:
443 error_msg = "%s rdepends on %s" % (pkgname,rdepend) 443 error_msg = "%s rdepends on %s" % (pkgname,rdepend)
444 sane = package_qa_handle_error("debug-deps", error_msg, d) 444 sane = package_qa_handle_error("debug-deps", error_msg, d)
445 445
@@ -480,27 +480,30 @@ python do_package_qa () {
480 testmatrix = d.getVarFlags("QAPATHTEST") 480 testmatrix = d.getVarFlags("QAPATHTEST")
481 481
482 g = globals() 482 g = globals()
483 warnchecks = []
484 for w in (d.getVar("WARN_QA", True) or "").split():
485 if w in testmatrix and testmatrix[w] in g:
486 warnchecks.append(g[testmatrix[w]])
487 errorchecks = []
488 for e in (d.getVar("ERROR_QA", True) or "").split():
489 if e in testmatrix and testmatrix[e] in g:
490 errorchecks.append(g[testmatrix[e]])
491
492 walk_sane = True 483 walk_sane = True
493 rdepends_sane = True 484 rdepends_sane = True
494 for package in packages.split(): 485 for package in packages.split():
495 if bb.data.getVar('INSANE_SKIP_' + package, d, True): 486 skip = (bb.data.getVar('INSANE_SKIP_' + package, d, True) or "").split()
496 bb.note("Package: %s (skipped)" % package) 487 if skip:
497 continue 488 bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
489 warnchecks = []
490 for w in (d.getVar("WARN_QA", True) or "").split():
491 if w in skip:
492 continue
493 if w in testmatrix and testmatrix[w] in g:
494 warnchecks.append(g[testmatrix[w]])
495 errorchecks = []
496 for e in (d.getVar("ERROR_QA", True) or "").split():
497 if e in skip:
498 continue
499 if e in testmatrix and testmatrix[e] in g:
500 errorchecks.append(g[testmatrix[e]])
498 501
499 bb.note("Checking Package: %s" % package) 502 bb.note("Checking Package: %s" % package)
500 path = "%s/%s" % (pkgdest, package) 503 path = "%s/%s" % (pkgdest, package)
501 if not package_qa_walk(path, warnchecks, errorchecks, package, d): 504 if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d):
502 walk_sane = False 505 walk_sane = False
503 if not package_qa_check_rdepends(package, pkgdest, d): 506 if not package_qa_check_rdepends(package, pkgdest, skip, d):
504 rdepends_sane = False 507 rdepends_sane = False
505 508
506 509