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-04 16:23:47 +0100 |
commit | b95c3404432cb8986533c52a16a13f68b200c7a3 (patch) | |
tree | 1faa279bd463f968fbb4746796aede4c1ab947aa | |
parent | 31c231c95d37819717f8390d2fd8f68da970aa2a (diff) | |
download | poky-b95c3404432cb8986533c52a16a13f68b200c7a3.tar.gz |
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.
(From OE-Core rev: 1b697a5e92be01725ad20298f54c277c852c974d)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 \ | |||
39 | split-strip packages-list pkgv-undefined var-undefined \ | 39 | split-strip packages-list pkgv-undefined var-undefined \ |
40 | version-going-backwards expanded-d invalid-chars \ | 40 | version-going-backwards expanded-d invalid-chars \ |
41 | " | 41 | " |
42 | FAKEROOT_QA = "" | ||
43 | FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \ | ||
44 | enabled tests are listed here, the do_package_qa task will run under fakeroot." | ||
42 | 45 | ||
43 | ALL_QA = "${WARN_QA} ${ERROR_QA}" | 46 | ALL_QA = "${WARN_QA} ${ERROR_QA}" |
44 | 47 | ||
@@ -1232,6 +1235,11 @@ python () { | |||
1232 | for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY': | 1235 | for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY': |
1233 | if d.getVar(var, False): | 1236 | if d.getVar(var, False): |
1234 | issues.append(var) | 1237 | issues.append(var) |
1238 | |||
1239 | fakeroot_tests = d.getVar('FAKEROOT_QA', True).split() | ||
1240 | if set(tests) & set(fakeroot_tests): | ||
1241 | d.setVarFlag('do_package_qa', 'fakeroot', '1') | ||
1242 | d.appendVarFlag('do_package_qa', 'depends', ' virtual/fakeroot-native:do_populate_sysroot') | ||
1235 | else: | 1243 | else: |
1236 | d.setVarFlag('do_package_qa', 'rdeptask', '') | 1244 | d.setVarFlag('do_package_qa', 'rdeptask', '') |
1237 | for i in issues: | 1245 | for i in issues: |