summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-09 11:24:47 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-09 15:27:34 +0000
commitd3b55a3f6761f996f15dcbf741038f2e7891f693 (patch)
tree40b6b640d23e5706b9f1391f316802e0f64d2f12
parent73f8baa8d87f8c5e10b767ab669eccc21c018b37 (diff)
downloadpoky-d3b55a3f6761f996f15dcbf741038f2e7891f693.tar.gz
image-buildinfo,oeqa/selftest/containerimage: Ensure image-buildinfo doesn't break tests
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) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image-buildinfo.bbclass2
-rw-r--r--meta/lib/oeqa/selftest/cases/containerimage.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/image-buildinfo.bbclass b/meta/classes/image-buildinfo.bbclass
index 213fb9cf9b..87a6a1a489 100644
--- a/meta/classes/image-buildinfo.bbclass
+++ b/meta/classes/image-buildinfo.bbclass
@@ -64,6 +64,8 @@ def buildinfo_target(d):
64 64
65# Write build information to target filesystem 65# Write build information to target filesystem
66python buildinfo () { 66python buildinfo () {
67 if not d.getVar('IMAGE_BUILDINFO_FILE'):
68 return
67 with open(d.expand('${IMAGE_ROOTFS}${IMAGE_BUILDINFO_FILE}'), 'w') as build: 69 with open(d.expand('${IMAGE_ROOTFS}${IMAGE_BUILDINFO_FILE}'), 'w') as build:
68 build.writelines(( 70 build.writelines((
69 '''----------------------- 71 '''-----------------------
diff --git a/meta/lib/oeqa/selftest/cases/containerimage.py b/meta/lib/oeqa/selftest/cases/containerimage.py
index 99a5cc9e57..8deaae75d8 100644
--- a/meta/lib/oeqa/selftest/cases/containerimage.py
+++ b/meta/lib/oeqa/selftest/cases/containerimage.py
@@ -39,6 +39,7 @@ class ContainerImageTests(OESelftestTestCase):
39IMAGE_FSTYPES = "container" 39IMAGE_FSTYPES = "container"
40PACKAGE_CLASSES = "package_ipk" 40PACKAGE_CLASSES = "package_ipk"
41IMAGE_FEATURES = "" 41IMAGE_FEATURES = ""
42IMAGE_BUILDINFO_FILE = ""
42""") 43""")
43 44
44 bbvars = get_bb_vars(['bindir', 'sysconfdir', 'localstatedir', 45 bbvars = get_bb_vars(['bindir', 'sysconfdir', 'localstatedir',