diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-09 11:24:47 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-09 15:27:34 +0000 |
commit | d3b55a3f6761f996f15dcbf741038f2e7891f693 (patch) | |
tree | 40b6b640d23e5706b9f1391f316802e0f64d2f12 | |
parent | 73f8baa8d87f8c5e10b767ab669eccc21c018b37 (diff) | |
download | poky-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.bbclass | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/containerimage.py | 1 |
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 |
66 | python buildinfo () { | 66 | python 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): | |||
39 | IMAGE_FSTYPES = "container" | 39 | IMAGE_FSTYPES = "container" |
40 | PACKAGE_CLASSES = "package_ipk" | 40 | PACKAGE_CLASSES = "package_ipk" |
41 | IMAGE_FEATURES = "" | 41 | IMAGE_FEATURES = "" |
42 | IMAGE_BUILDINFO_FILE = "" | ||
42 | """) | 43 | """) |
43 | 44 | ||
44 | bbvars = get_bb_vars(['bindir', 'sysconfdir', 'localstatedir', | 45 | bbvars = get_bb_vars(['bindir', 'sysconfdir', 'localstatedir', |