summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/imagefeatures.py
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2015-10-19 15:58:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-21 22:56:07 +0100
commit2d008033c540f07c12e025c342f7474e09e1c615 (patch)
tree03b1aaf0882723233b3b206dd77c3b6975040a55 /meta/lib/oeqa/selftest/imagefeatures.py
parent1881564cdd8f52c2d7ee46e4c2d38272c4d9820c (diff)
downloadpoky-2d008033c540f07c12e025c342f7474e09e1c615.tar.gz
oeqa/selftest: improve config writing and cleanup
The selftest.inc configuration file is deleted in both tearDown() and setUp() so there's no need to use addCleanup() to remove statements from it. Use write_config instead of append_config if the intention is to start from an empty config file, for clarity. Finally remove some misleading comments that claim that append_config() writes to local.conf when it doesn't. (From OE-Core rev: ad33259b507914bfc8de92d1df12e0974157900e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/imagefeatures.py')
-rw-r--r--meta/lib/oeqa/selftest/imagefeatures.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/meta/lib/oeqa/selftest/imagefeatures.py b/meta/lib/oeqa/selftest/imagefeatures.py
index fcffc423ea..4efb0d92a3 100644
--- a/meta/lib/oeqa/selftest/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/imagefeatures.py
@@ -25,9 +25,7 @@ class ImageFeatures(oeSelfTest):
25 features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password"\n' 25 features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password"\n'
26 features += 'INHERIT += "extrausers"\n' 26 features += 'INHERIT += "extrausers"\n'
27 features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user) 27 features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
28 28 self.write_config(features)
29 # Append 'features' to local.conf
30 self.append_config(features)
31 29
32 # Build a core-image-minimal 30 # Build a core-image-minimal
33 bitbake('core-image-minimal') 31 bitbake('core-image-minimal')
@@ -53,9 +51,7 @@ class ImageFeatures(oeSelfTest):
53 features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password"\n' 51 features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password"\n'
54 features += 'INHERIT += "extrausers"\n' 52 features += 'INHERIT += "extrausers"\n'
55 features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user) 53 features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
56 54 self.write_config(features)
57 # Append 'features' to local.conf
58 self.append_config(features)
59 55
60 # Build a core-image-minimal 56 # Build a core-image-minimal
61 bitbake('core-image-minimal') 57 bitbake('core-image-minimal')
@@ -87,9 +83,7 @@ class ImageFeatures(oeSelfTest):
87 features += 'IMAGE_INSTALL_append = " openssh"\n' 83 features += 'IMAGE_INSTALL_append = " openssh"\n'
88 features += 'EXTRA_IMAGE_FEATURES = "empty-root-password allow-empty-password package-management"\n' 84 features += 'EXTRA_IMAGE_FEATURES = "empty-root-password allow-empty-password package-management"\n'
89 features += 'RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"' 85 features += 'RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"'
90 86 self.write_config(features)
91 # Append 'features' to local.conf
92 self.append_config(features)
93 87
94 # Build a core-image-minimal 88 # Build a core-image-minimal
95 bitbake('core-image-minimal') 89 bitbake('core-image-minimal')
@@ -159,9 +153,7 @@ class ImageFeatures(oeSelfTest):
159 153
160 features = 'DISTRO_FEATURES_append = " wayland"\n' 154 features = 'DISTRO_FEATURES_append = " wayland"\n'
161 features += 'CORE_IMAGE_EXTRA_INSTALL += "wayland weston"' 155 features += 'CORE_IMAGE_EXTRA_INSTALL += "wayland weston"'
162 156 self.write_config(features)
163 # Append 'features' to local.conf
164 self.append_config(features)
165 157
166 # Build a core-image-weston 158 # Build a core-image-weston
167 bitbake('core-image-weston') 159 bitbake('core-image-weston')