Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | DESCRIPTION = "Utilities for testing Power Management" |
| 2 | HOMEPAGE = "https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQa" |
| 3 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 4 | LICENSE = "GPL-2.0-only" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 6 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 7 | PV = "0.5.2" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 8 | |
| 9 | BRANCH ?= "master" |
| 10 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 11 | SRCREV = "05710ec5032be4c8edafb4109d4d908d31243906" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 12 | |
| 13 | SRC_URI = "git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH}" |
| 14 | |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
| 17 | CFLAGS += "-pthread" |
| 18 | |
| 19 | do_compile () { |
| 20 | # Find all the .c files in this project and build them. |
| 21 | for x in `find . -name "*.c"` |
| 22 | do |
| 23 | util=`echo ${x} | sed s/.c$//` |
| 24 | oe_runmake ${util} |
| 25 | done |
| 26 | } |
| 27 | |
| 28 | do_install () { |
| 29 | install -d ${D}${bindir} |
| 30 | install -d ${D}${libdir}/${BPN} |
| 31 | |
| 32 | # Install the compiled binaries that were built in the previous step |
| 33 | for x in `find . -name "*.c"` |
| 34 | do |
| 35 | util=`echo ${x} | sed s/.c$//` |
| 36 | util_basename=`basename ${util}` |
| 37 | install -m 0755 ${util} ${D}${bindir}/${util_basename} |
| 38 | done |
| 39 | |
| 40 | # Install the helper scripts in a subdirectory of $libdir |
| 41 | for script in `find . -name "*.sh" | grep include` |
| 42 | do |
| 43 | # Remove hardcoded relative paths |
| 44 | sed -i -e 's#..\/utils\/##' ${script} |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 45 | sed -i -e 's#. ..\/Switches#${bindir}#g' ${script} |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 46 | |
| 47 | script_basename=`basename ${script}` |
| 48 | install -m 0755 $script ${D}${libdir}/${BPN}/${script_basename} |
| 49 | done |
| 50 | |
| 51 | # Install the shell scripts NOT in the $libdir directory since those |
| 52 | # will be installed elsewhere |
| 53 | for script in `find . -name "*.sh" | grep -v include` |
| 54 | do |
| 55 | # if the script includes any helper scripts from the $libdir |
| 56 | # directory then change the source path to the absolute path |
| 57 | # to reflect the install location of the helper scripts. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 58 | sed -i -e "s#. ../include#. ${libdir}/${BPN}#g" ${script} |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 59 | # Remove hardcoded relative paths |
| 60 | sed -i -e 's#..\/utils\/##' ${script} |
| 61 | |
| 62 | script_basename=`basename ${script}` |
| 63 | install -m 0755 $script ${D}${bindir}/${script_basename} |
| 64 | done |
| 65 | } |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 66 | RDEPENDS:${PN} +="bash" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 67 | |
| 68 | # http://errors.yoctoproject.org/Errors/Details/186956/ |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | COMPATIBLE_HOST:libc-musl = 'null' |