aboutsummaryrefslogtreecommitdiffstats
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:55:06 +0100
commitad33259b507914bfc8de92d1df12e0974157900e (patch)
tree0778a606edd6ec0cb2975d88bf86d1b289189abe /meta/lib/oeqa/selftest/imagefeatures.py
parent2a4ecc88ca10ef6abe55dddb96842b579b73497c (diff)
downloadopenembedded-core-contrib-ad33259b507914bfc8de92d1df12e0974157900e.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. Signed-off-by: Ross Burton <ross.burton@intel.com>
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):
features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password"\n'
features += 'INHERIT += "extrausers"\n'
features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
-
- # Append 'features' to local.conf
- self.append_config(features)
+ self.write_config(features)
# Build a core-image-minimal
bitbake('core-image-minimal')
@@ -53,9 +51,7 @@ class ImageFeatures(oeSelfTest):
features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password"\n'
features += 'INHERIT += "extrausers"\n'
features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
-
- # Append 'features' to local.conf
- self.append_config(features)
+ self.write_config(features)
# Build a core-image-minimal
bitbake('core-image-minimal')
@@ -87,9 +83,7 @@ class ImageFeatures(oeSelfTest):
features += 'IMAGE_INSTALL_append = " openssh"\n'
features += 'EXTRA_IMAGE_FEATURES = "empty-root-password allow-empty-password package-management"\n'
features += 'RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"'
-
- # Append 'features' to local.conf
- self.append_config(features)
+ self.write_config(features)
# Build a core-image-minimal
bitbake('core-image-minimal')
@@ -159,9 +153,7 @@ class ImageFeatures(oeSelfTest):
features = 'DISTRO_FEATURES_append = " wayland"\n'
features += 'CORE_IMAGE_EXTRA_INSTALL += "wayland weston"'
-
- # Append 'features' to local.conf
- self.append_config(features)
+ self.write_config(features)
# Build a core-image-weston
bitbake('core-image-weston')