[OE-core] [PATCH 41/45] image-buildinfo, oeqa/selftest/containerimage: Ensure image-buildinfo doesn't break tests
Armin Kuster
akuster808 at gmail.com
Thu Dec 13 21:38:49 UTC 2018
From: Richard Purdie <richard.purdie at linuxfoundation.org>
Having image-buildinfo enabled causes containerimage.ContainerImageTests.test_expected_files
to fail due to the presence of an unexpected file:
['./',
'./etc/',
- './etc/build',
'./etc/default/',
'./etc/default/postinst',
Tweak the class to allow it to be disabled and disable it from the test just in
case it was enabled.
(From OE-Core rev: af67bf422a4df5b7e07894512ff73a5f493682ab)
(From OE-Core rev: f49ab8b1610c045acaed7b964d12f07f969df856)
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/image-buildinfo.bbclass | 2 ++
meta/lib/oeqa/selftest/cases/containerimage.py | 1 +
2 files changed, 3 insertions(+)
diff --git a/meta/classes/image-buildinfo.bbclass b/meta/classes/image-buildinfo.bbclass
index 213fb9c..87a6a1a 100644
--- a/meta/classes/image-buildinfo.bbclass
+++ b/meta/classes/image-buildinfo.bbclass
@@ -64,6 +64,8 @@ def buildinfo_target(d):
# Write build information to target filesystem
python buildinfo () {
+ if not d.getVar('IMAGE_BUILDINFO_FILE'):
+ return
with open(d.expand('${IMAGE_ROOTFS}${IMAGE_BUILDINFO_FILE}'), 'w') as build:
build.writelines((
'''-----------------------
diff --git a/meta/lib/oeqa/selftest/cases/containerimage.py b/meta/lib/oeqa/selftest/cases/containerimage.py
index 99a5cc9..8deaae7 100644
--- a/meta/lib/oeqa/selftest/cases/containerimage.py
+++ b/meta/lib/oeqa/selftest/cases/containerimage.py
@@ -39,6 +39,7 @@ class ContainerImageTests(OESelftestTestCase):
IMAGE_FSTYPES = "container"
PACKAGE_CLASSES = "package_ipk"
IMAGE_FEATURES = ""
+IMAGE_BUILDINFO_FILE = ""
""")
bbvars = get_bb_vars(['bindir', 'sysconfdir', 'localstatedir',
--
2.7.4
More information about the Openembedded-core
mailing list