Instead of add manually the ptest packages use IMAGE_FEATURE to install ptest packages this save time validating if ptest pkg exist.
Signed-off-by: Aníbal Limón <anibal.li...@linux.intel.com> --- README | 3 ++- modules/testimage.py | 5 ++--- upgradehelper.py | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README b/README index 1c8eba1..63c3b39 100644 --- a/README +++ b/README @@ -108,7 +108,8 @@ file: --------------- snip --------------- INHERIT += "testimage" -EXTRA_IMAGE_FEATURES = "debug-tweaks package-management" +DISTRO_FEATURES_append = " ptest" +EXTRA_IMAGE_FEATURES = "debug-tweaks package-management ptest-pkgs" # testimage/ptest only work with rpm PACKAGE_CLASSES = "package_rpm" --------------- snip --------------- diff --git a/modules/testimage.py b/modules/testimage.py index e410111..52e2592 100644 --- a/modules/testimage.py +++ b/modules/testimage.py @@ -60,11 +60,10 @@ class TestImage(): # for provide access to the target if ptest: pkgs_out.append("dropbear") + pkgs_out.append("ptest-runner") for c in pkgs: pkgs_out.append(c['PN']) - if ptest: - pkgs_out.append("%s-ptest" % c['PN']) return ' '.join(pkgs_out) @@ -122,7 +121,7 @@ class TestImage(): ptest_pkgs = self._get_ptest_pkgs() os.environ['CORE_IMAGE_EXTRA_INSTALL'] = \ - self._get_pkgs_to_install(ptest_pkgs, True) + self._get_pkgs_to_install(ptest_pkgs, ptest=True) I( " building core-image-minimal for %s ..." % machine) self.bb.complete("core-image-minimal", machine) diff --git a/upgradehelper.py b/upgradehelper.py index db39601..5a2b844 100755 --- a/upgradehelper.py +++ b/upgradehelper.py @@ -242,6 +242,11 @@ class Updater(object): " please add to conf/local.conf.") exit(1) + if not "ptest-pkgs" in self.base_env['EXTRA_IMAGE_FEATURES']: + E(" testimage/ptest requires ptest-pkgs in EXTRA_IMAGE_FEATURES"\ + " please add to conf/local.conf.") + exit(1) + if not "package_rpm" == self.base_env["PACKAGE_CLASSES"]: E(" testimage/ptest requires PACKAGE_CLASSES set to package_rpm"\ " please add to conf/local.conf.") -- 2.1.4 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto