diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-21 11:16:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-21 11:17:47 +0100 |
commit | 30b7781650e3ff092d04889beab2e87eaff29cdb (patch) | |
tree | fabd9f8c865174caccf60b9be1dec07e7148afa4 /meta/classes/insane.bbclass | |
parent | 65d1eb7788870b3e318902c827097183f2dddafc (diff) | |
download | poky-30b7781650e3ff092d04889beab2e87eaff29cdb.tar.gz |
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>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r-- | meta/classes/insane.bbclass | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 425e93a8fc..1fb89704a3 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -116,6 +116,8 @@ def package_qa_get_machine_dict(): | |||
116 | WARN_QA ?= "ldflags useless-rpaths rpaths unsafe-references-in-binaries unsafe-references-in-scripts staticdev libdir" | 116 | WARN_QA ?= "ldflags useless-rpaths rpaths unsafe-references-in-binaries unsafe-references-in-scripts staticdev libdir" |
117 | ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms" | 117 | ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms" |
118 | 118 | ||
119 | ALL_QA = "${WARN_QA} ${ERROR_QA}" | ||
120 | |||
119 | def package_qa_clean_path(path,d): | 121 | def package_qa_clean_path(path,d): |
120 | """ Remove the common prefix from the path. In this case it is the TMPDIR""" | 122 | """ Remove the common prefix from the path. In this case it is the TMPDIR""" |
121 | return path.replace(d.getVar('TMPDIR',True),"") | 123 | return path.replace(d.getVar('TMPDIR',True),"") |
@@ -722,7 +724,7 @@ python do_package_qa () { | |||
722 | rdepends_sane = False | 724 | rdepends_sane = False |
723 | 725 | ||
724 | 726 | ||
725 | if 'libdir' in (d.getVar("WARN_QA", True) or "").split(): | 727 | if 'libdir' in d.getVar("ALL_QA", True).split(): |
726 | package_qa_check_libdir(d) | 728 | package_qa_check_libdir(d) |
727 | 729 | ||
728 | if not walk_sane or not rdepends_sane: | 730 | if not walk_sane or not rdepends_sane: |
@@ -787,7 +789,7 @@ do_populate_sysroot[postfuncs] += "do_qa_staging " | |||
787 | do_configure[postfuncs] += "do_qa_configure " | 789 | do_configure[postfuncs] += "do_qa_configure " |
788 | 790 | ||
789 | python () { | 791 | python () { |
790 | tests = d.getVar('WARN_QA', True) + " " + d.getVar('ERROR_QA', True) | 792 | tests = d.getVar('ALL_QA', True).split() |
791 | if tests.find("desktop") != -1: | 793 | if "desktop" in tests: |
792 | d.appendVar("PACKAGE_DEPENDS", "desktop-file-utils-native") | 794 | d.appendVar("PACKAGE_DEPENDS", "desktop-file-utils-native") |
793 | } | 795 | } |