Acked-by: Carlos Hernandez <[email protected]>

I will have to rework ltp-ddt test cases but this is a cleaner way to integrate linaro's pm-qa.git.

Thanks,
Carlos
On 11/19/2013 06:13 PM, Chase Maupin wrote:
* 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 <[email protected]>
---
  .../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
  }

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to