All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: yocto@yoctoproject.org
Cc: paul.eggleton@linux.intel.com
Subject: [[AUH] 4/6] testimage/ptest: Add require of ptest-pkgs in EXTRA_IMAGE_FEATURES.
Date: Tue,  1 Dec 2015 16:03:39 -0600	[thread overview]
Message-ID: <1449007421-26206-5-git-send-email-anibal.limon@linux.intel.com> (raw)
In-Reply-To: <1449007421-26206-1-git-send-email-anibal.limon@linux.intel.com>

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.limon@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



  parent reply	other threads:[~2015-12-01 22:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 22:03 [[AUH] 0/6] Integration error handling and enhacements Aníbal Limón
2015-12-01 22:03 ` [[AUH] 1/6] recipe/git.py: Add missing import of re module Aníbal Limón
2015-12-01 22:03 ` [[AUH] 2/6] upgradehelper.py: Add support for preserve logs in workdir Aníbal Limón
2015-12-01 22:03 ` [[AUH] 3/6] upgradehelper.py: Add support for specify what image test Aníbal Limón
2015-12-01 22:03 ` Aníbal Limón [this message]
2015-12-11  1:31   ` [[AUH] 4/6] testimage/ptest: Add require of ptest-pkgs in EXTRA_IMAGE_FEATURES Paul Eggleton
2015-12-01 22:03 ` [[AUH] 5/6] testimage: Add handling of IntegrationError Aníbal Limón
2015-12-01 22:03 ` [[AUH] 6/6] upgradehelper: Remove deprecated setting drop_previous_commits Aníbal Limón

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449007421-26206-5-git-send-email-anibal.limon@linux.intel.com \
    --to=anibal.limon@linux.intel.com \
    --cc=paul.eggleton@linux.intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.