diff options
author | Christopher Larson <chris_larson@mentor.com> | 2015-09-01 15:23:02 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-03 13:32:10 +0100 |
commit | 1b697a5e92be01725ad20298f54c277c852c974d (patch) | |
tree | 85e0f21b2b5c35860bacf9f67711c7b83a5c32a6 /meta/classes | |
parent | 0ee1e3b000137ebcb2e223e7a3f8e9eb53088c70 (diff) | |
download | openembedded-core-1b697a5e92be01725ad20298f54c277c852c974d.tar.gz openembedded-core-1b697a5e92be01725ad20298f54c277c852c974d.tar.bz2 openembedded-core-1b697a5e92be01725ad20298f54c277c852c974d.zip |
insane.bbclass: handle tests which need fakeroot
If any tests listed in FAKEROOT_QA are enabled (listed in ALL_QA), then
run do_package_qa under fakeroot.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/insane.bbclass | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 61cd42bf34..7ea80dc90c 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -39,6 +39,9 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ split-strip packages-list pkgv-undefined var-undefined \ version-going-backwards expanded-d invalid-chars \ " +FAKEROOT_QA = "" +FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \ +enabled tests are listed here, the do_package_qa task will run under fakeroot." ALL_QA = "${WARN_QA} ${ERROR_QA}" @@ -1232,6 +1235,11 @@ python () { for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY': if d.getVar(var, False): issues.append(var) + + fakeroot_tests = d.getVar('FAKEROOT_QA', True).split() + if set(tests) & set(fakeroot_tests): + d.setVarFlag('do_package_qa', 'fakeroot', '1') + d.appendVarFlag('do_package_qa', 'depends', ' virtual/fakeroot-native:do_populate_sysroot') else: d.setVarFlag('do_package_qa', 'rdeptask', '') for i in issues: |