From 2d008033c540f07c12e025c342f7474e09e1c615 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 19 Oct 2015 15:58:26 +0100 Subject: 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 Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/imagefeatures.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'meta/lib/oeqa/selftest/imagefeatures.py') 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') -- cgit v1.2.3-54-g00ecf