summaryrefslogtreecommitdiffstats
path: root/meta/recipes-rt
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2012-09-11 21:17:06 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-12 15:13:52 +0100
commitb3155c8393e208826c2da4a6d4a8e09fb996fcb9 (patch)
treeed5b5e21aa1cd653cd37412d6166a3d3fdff093e /meta/recipes-rt
parent244dd760116ed40f498aaaa38e18771f506c0054 (diff)
downloadpoky-b3155c8393e208826c2da4a6d4a8e09fb996fcb9.tar.gz
rt-tests: Add hwlatdetect package
Split out rt-tests into rt-tests and hwlatdetect packages as the latter requires python and we want to be able to install the core rt-tests on minimal systems without python. This also addresses QA warnings about the hwlatdetect files not being packaged. Add an RRECOMMENDS on the hwlat kernel module package for the new hwlatdetect package as the python test requires the kernel module to function properly (but we probably don't want to kill a build if the exact kernel module package is not available). (From OE-Core rev: 0ea5e5a805e038ecfeb6b87ca05c021c5f72c5e9) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-rt')
-rw-r--r--meta/recipes-rt/rt-tests/files/0001-rt-tests-Allow-for-user-specified-PYLIB.patch35
-rw-r--r--meta/recipes-rt/rt-tests/files/0002-rt-tests-Break-out-install_hwlatdetect.patch68
-rw-r--r--meta/recipes-rt/rt-tests/hwlatdetect_0.84.bb24
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests.inc18
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests_0.84.bb15
5 files changed, 149 insertions, 11 deletions
diff --git a/meta/recipes-rt/rt-tests/files/0001-rt-tests-Allow-for-user-specified-PYLIB.patch b/meta/recipes-rt/rt-tests/files/0001-rt-tests-Allow-for-user-specified-PYLIB.patch
new file mode 100644
index 0000000000..8b493eb1f1
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/files/0001-rt-tests-Allow-for-user-specified-PYLIB.patch
@@ -0,0 +1,35 @@
1From 66765522b634952346f1a3ab7d00c7222a1f9361 Mon Sep 17 00:00:00 2001
2Message-Id: <66765522b634952346f1a3ab7d00c7222a1f9361.1347419597.git.dvhart@linux.intel.com>
3From: Darren Hart <dvhart@linux.intel.com>
4Date: Tue, 11 Sep 2012 15:19:30 -0700
5Subject: [PATCH 1/2] rt-tests: Allow for user-specified PYLIB
6
7Upstream-Status: Submitted
8
9Allow users (build systems) to specify PYLIB. This allows for a
10cross-build-system to specify the target PYLIB rather than the host
11PYLIB.
12
13Signed-off-by: Darren Hart <dvhart@linux.intel.com>
14CC: Clark Williams <williams@redhat.com>
15CC: John Kacur <jkacur@redhat.com>
16---
17 Makefile | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/Makefile b/Makefile
21index 3a82407..61e2f9f 100644
22--- a/Makefile
23+++ b/Makefile
24@@ -23,7 +23,7 @@ endif
25 CFLAGS ?= -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
26 LDFLAGS ?=
27
28-PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
29+PYLIB ?= $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
30
31 ifndef DEBUG
32 CFLAGS += -O2
33--
341.7.11.4
35
diff --git a/meta/recipes-rt/rt-tests/files/0002-rt-tests-Break-out-install_hwlatdetect.patch b/meta/recipes-rt/rt-tests/files/0002-rt-tests-Break-out-install_hwlatdetect.patch
new file mode 100644
index 0000000000..bc6136f1de
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/files/0002-rt-tests-Break-out-install_hwlatdetect.patch
@@ -0,0 +1,68 @@
1From af93e580d005a2bba6ed36528003af4cf631adb8 Mon Sep 17 00:00:00 2001
2Message-Id: <af93e580d005a2bba6ed36528003af4cf631adb8.1347419597.git.dvhart@linux.intel.com>
3In-Reply-To: <66765522b634952346f1a3ab7d00c7222a1f9361.1347419597.git.dvhart@linux.intel.com>
4References: <66765522b634952346f1a3ab7d00c7222a1f9361.1347419597.git.dvhart@linux.intel.com>
5From: Darren Hart <dvhart@linux.intel.com>
6Date: Tue, 11 Sep 2012 14:51:10 -0700
7Subject: [PATCH 2/2] rt-tests: Break out install_hwlatdetect
8
9Upstream-Status: Submitted
10
11Allow hwlatdetect to be installed independently of the rest of the
12tests. This is convenient for build systems that package it separately
13due to the python dependency.
14
15Signed-off-by: Darren Hart <dvhart@linux.intel.com>
16CC: Clark Williams <williams@redhat.com>
17CC: John Kacur <jkacur@redhat.com>
18---
19 Makefile | 18 +++++++++++-------
20 1 file changed, 11 insertions(+), 7 deletions(-)
21
22diff --git a/Makefile b/Makefile
23index 61e2f9f..636e63b 100644
24--- a/Makefile
25+++ b/Makefile
26@@ -119,21 +119,15 @@ changelog:
27 git log >ChangeLog
28
29 .PHONY: install
30-install: all
31+install: all install_hwlatdetect
32 mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man4"
33 mkdir -p "$(DESTDIR)$(srcdir)" "$(DESTDIR)$(mandir)/man8"
34 cp $(TARGETS) "$(DESTDIR)$(bindir)"
35- if test -n "$(PYLIB)" ; then \
36- install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
37- rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
38- ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
39- fi
40 install -D -m 644 src/backfire/backfire.c "$(DESTDIR)$(srcdir)/backfire/backfire.c"
41 install -m 644 src/backfire/Makefile "$(DESTDIR)$(srcdir)/backfire/Makefile"
42 gzip src/backfire/backfire.4 -c >"$(DESTDIR)$(mandir)/man4/backfire.4.gz"
43 gzip src/cyclictest/cyclictest.8 -c >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz"
44 gzip src/pi_tests/pi_stress.8 -c >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz"
45- gzip src/hwlatdetect/hwlatdetect.8 -c >"$(DESTDIR)$(mandir)/man8/hwlatdetect.8.gz"
46 gzip src/ptsematest/ptsematest.8 -c >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
47 gzip src/sigwaittest/sigwaittest.8 -c >"$(DESTDIR)$(mandir)/man8/sigwaittest.8.gz"
48 gzip src/svsematest/svsematest.8 -c >"$(DESTDIR)$(mandir)/man8/svsematest.8.gz"
49@@ -141,6 +135,16 @@ install: all
50 gzip src/backfire/sendme.8 -c >"$(DESTDIR)$(mandir)/man8/sendme.8.gz"
51 gzip src/hackbench/hackbench.8 -c >"$(DESTDIR)$(mandir)/man8/hackbench.8.gz"
52
53+.PHONY: install_hwlatdetect
54+install_hwlatdetect: hwlatdetect
55+ if test -n "$(PYLIB)" ; then \
56+ mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man8" ; \
57+ install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
58+ rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
59+ ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
60+ gzip src/hwlatdetect/hwlatdetect.8 -c >"$(DESTDIR)$(mandir)/man8/hwlatdetect.8.gz" ; \
61+ fi
62+
63 .PHONY: release
64 release: clean changelog
65 mkdir -p releases
66--
671.7.11.4
68
diff --git a/meta/recipes-rt/rt-tests/hwlatdetect_0.84.bb b/meta/recipes-rt/rt-tests/hwlatdetect_0.84.bb
new file mode 100644
index 0000000000..a850a2d42a
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/hwlatdetect_0.84.bb
@@ -0,0 +1,24 @@
1pickDESCRIPTION = "Python hardware latency detector"
2HOMEPAGE = "http://git.kernel.org/?p=linux/kernel/git/clrkwllms/rt-tests.git"
3SECTION = "tests"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
6RDEPENDS = "python python-subprocess python-textutils"
7RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
8
9require rt-tests.inc
10
11PR = "${INC_PR}.0"
12
13EXTRA_OEMAKE += "PYLIB=${libdir}/python${PYTHON_BASEVERSION}/dist-packages"
14
15do_compile() {
16 oe_runmake hwlatdetect
17}
18
19do_install() {
20 oe_runmake install_hwlatdetect DESTDIR=${D} SBINDIR=${sbindir} \
21 MANDIR=${mandir} INCLUDEDIR=${includedir}
22}
23
24FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
diff --git a/meta/recipes-rt/rt-tests/rt-tests.inc b/meta/recipes-rt/rt-tests/rt-tests.inc
new file mode 100644
index 0000000000..f51153238e
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/rt-tests.inc
@@ -0,0 +1,18 @@
1# Version v0.84
2SRCREV = "857cdd5320ce1f293f5dbcbec79cc8fe22b0bebf"
3
4PR = "r0"
5
6SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git \
7 file://0001-rt-tests-Allow-for-user-specified-PYLIB.patch \
8 file://0002-rt-tests-Break-out-install_hwlatdetect.patch"
9
10INC_PR = "r0"
11
12S = "${WORKDIR}/git"
13
14# need to append rt-tests' default CFLAGS to ours
15CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnulli"
16
17# calling 'uname -m' is broken on crossbuilds
18EXTRA_OEMAKE = "NUMA=0"
diff --git a/meta/recipes-rt/rt-tests/rt-tests_0.84.bb b/meta/recipes-rt/rt-tests/rt-tests_0.84.bb
index c54936e13b..c3964d2215 100644
--- a/meta/recipes-rt/rt-tests/rt-tests_0.84.bb
+++ b/meta/recipes-rt/rt-tests/rt-tests_0.84.bb
@@ -6,20 +6,13 @@ LICENSE = "GPLv2 & GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
7 file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=ce162fe491d19d2ec67dff6dbc938d50 \ 7 file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=ce162fe491d19d2ec67dff6dbc938d50 \
8 file://src/pi_tests/pi_stress.c;beginline=6;endline=19;md5=bd426a634a43ec612e9fbf125dfcc949" 8 file://src/pi_tests/pi_stress.c;beginline=6;endline=19;md5=bd426a634a43ec612e9fbf125dfcc949"
9# Version v0.84
10SRCREV = "857cdd5320ce1f293f5dbcbec79cc8fe22b0bebf"
11 9
12PR = "r0" 10require rt-tests.inc
13 11
14SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git" 12PR = "${INC_PR}.0"
15 13
16S = "${WORKDIR}/git" 14# Do not install hwlatdetect
17 15EXTRA_OEMAKE += "PYLIB=''"
18# need to append rt-tests' default CFLAGS to ours
19CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnulli"
20
21# calling 'uname -m' is broken on crossbuilds
22EXTRA_OEMAKE = "NUMA=0"
23 16
24do_install() { 17do_install() {
25 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \ 18 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \