All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linaro-pm-qa-utils: include scripts and cpuidle binaries
@ 2013-11-19 23:13 Chase Maupin
  2013-11-19 22:33 ` Carlos Hernandez
  0 siblings, 1 reply; 2+ messages in thread
From: Chase Maupin @ 2013-11-19 23:13 UTC (permalink / raw)
  To: meta-arago

* Added support to build cpuidle binaries and install all of the
  test scripts along with the binaries so that the scripts can
  be removed from ltp-ddt

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
---
 .../linaro-pm-qa/linaro-pm-qa-utils_git.bb         |   44 ++++++++++++++++----
 1 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/meta-arago-extras/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb b/meta-arago-extras/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
index 275b6e6..dcf599f 100644
--- a/meta-arago-extras/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
+++ b/meta-arago-extras/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
@@ -2,31 +2,59 @@ DESCRIPTION = "Utilities from Linaro for testing Power Management"
 HOMEPAGE = "https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQa"
 
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 PV = "0.4.4"
-PR = "r0"
+PR = "r1"
 
 BRANCH ?= "master"
 SRCREV = "fbc2762359b863dfbf4fd0bab1e8abd2a6125ed4"
 
 SRC_URI = "git://git.linaro.org/tools/pm-qa.git;protocol=git;branch=${BRANCH}"
 
-S = "${WORKDIR}/git/utils"
-
-UTILS = "cpuburn cpucycle heat_cpu nanosleep"
+S = "${WORKDIR}/git"
 
 CFLAGS += "-pthread"
 
 do_compile () {
-    oe_runmake
+    # Find all the .c files in this project and build them.  Save the names
+    # of these files so we know which to install in the installation step.
+    for x in `find . -name "*.c"`
+    do
+        util=`echo ${x} | sed s/.c$//`
+        oe_runmake ${util}
+    done
 }
 
 do_install () {
     install -d ${D}${bindir}
+    install -d ${D}${bindir}/linaro-pm-qa-include
+
+    # Install the compiled binaries
+    for x in `find . -name "*.c"`
+    do
+        util=`echo ${x} | sed s/.c$//`
+        util_basename=`basename ${util}`
+        install -m 0755 ${util} ${D}${bindir}/${util_basename}
+    done
 
-    for util in ${UTILS}
+    # Install the helper scripts in the include directory
+    for script in `find . -name "*.sh" | grep include`
     do
-        install -m 0755 $util ${D}${bindir}/
+        script_basename=`basename ${script}`
+        install -m 0755 $script ${D}${bindir}/linaro-pm-qa-include/${script_basename}
+    done
+
+    # Install the shell scripts NOT in the include directory since those
+    # will be installed elsewhere
+    for script in `find . -name "*.sh" | grep -v include`
+    do
+        # if the script includes any helper scripts from the include
+        # directory then change the include path to the absolute path
+        # and to reflect the install location of the helper scripts.
+        sed -i -e "s#source ../include#source ${bindir}/linaro-pm-qa-include#g" ${script}
+
+        script_basename=`basename ${script}`
+        install -m 0755 $script ${D}${bindir}/${script_basename}
     done
 }
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-19 22:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19 23:13 [PATCH] linaro-pm-qa-utils: include scripts and cpuidle binaries Chase Maupin
2013-11-19 22:33 ` Carlos Hernandez

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.