[OE-core] [PATCH] imagefeatures.py: update no busybox cases

kai.kang at windriver.com kai.kang at windriver.com
Mon Feb 10 13:20:26 UTC 2020


From: Kai Kang <kai.kang at windriver.com>

Duplicate case test_no_busybox_base_utils with
test_no_busybox_base_utils_systemd in imagefeatures.py. Append
IMAGE_FEATURES "ptest-pkgs" and run task 'testimage' of core-image-sato
in original case test_no_busybox_base_utils.

It takes too much time to run case test_no_busybox_base_utils, so not
update the case to run task 'testimage' in test_no_busybox_base_utils_systemd.

$ time oe-selftest -r imagefeatures.ImageFeatures.test_no_busybox_base_utils

real    394m54.424s
user    0m17.764s
sys     0m4.276s

[Yocto #13736]

Signed-off-by: Kai Kang <kai.kang at windriver.com>
---
 meta/lib/oeqa/selftest/cases/imagefeatures.py | 27 ++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 5c519ac3d6..200dfe58db 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -239,8 +239,33 @@ USERADD_GID_TABLES += "files/static-group"
 
     def test_no_busybox_base_utils(self):
         config = """
+INHERIT += "testimage"
+
+# Enable x11
+DISTRO_FEATURES_append = " x11"
+
+# Involve ptest packages
+IMAGE_FEATURES_append = " ptest-pkgs"
+
+# Replace busybox
+PREFERRED_PROVIDER_virtual/base-utils = "packagegroup-core-base-utils"
+VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
+VIRTUAL-RUNTIME_base-utils-hwclock = "util-linux-hwclock"
+VIRTUAL-RUNTIME_base-utils-syslog = "sysklogd"
+VIRTUAL-RUNTIME_login_manager = "shadow-base"
+
+# Blacklist busybox
+PNBLACKLIST[busybox] = "Don't build this"
+"""
+        self.write_config(config)
+
+        bitbake("core-image-sato")
+        bitbake("-c testimage core-image-sato")
+
+    def test_no_busybox_base_utils_systemd(self):
+        config = """
 # Enable x11
-DISTRO_FEATURES_append += "x11"
+DISTRO_FEATURES_append = " x11"
 
 # Switch to systemd
 DISTRO_FEATURES += "systemd"
-- 
2.17.1



More information about the Openembedded-core mailing list