summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/strace
diff options
context:
space:
mode:
authorGabriel Barbu <gabriel.barbu@enea.com>2013-07-25 15:28:33 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-29 13:09:14 +0100
commit69119073c0992090c93fe577fbfd10eee36e4540 (patch)
tree49cf7b19e60f103ecdab9cc164773568042579a7 /meta/recipes-devtools/strace
parent2df842d17d8d7a322ca12b98e375ca60b46c68fa (diff)
downloadpoky-69119073c0992090c93fe577fbfd10eee36e4540.tar.gz
strace: Add ptest
Install strace test suite and run it as ptest. (From OE-Core rev: 6e2d8724b023e2b6b55db7845009b4422a53c3b3) Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/strace')
-rw-r--r--meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch28
-rwxr-xr-xmeta/recipes-devtools/strace/strace-4.8/run-ptest2
-rw-r--r--meta/recipes-devtools/strace/strace_4.8.bb19
3 files changed, 47 insertions, 2 deletions
diff --git a/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch
new file mode 100644
index 0000000000..f5556b23e3
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch
@@ -0,0 +1,28 @@
1strace: Add ptest
2
3Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
4Upstream-Status: Pending
5
6--- old/tests/Makefile.am 2013-07-23 13:44:24.660481381 +0200
7+++ new/tests/Makefile.am 2013-07-23 16:22:42.937654391 +0200
8@@ -9,3 +9,20 @@
9 EXTRA_DIST = init.sh $(TESTS)
10
11 CLEANFILES = check.log
12+
13+buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
14+
15+install-ptest:
16+ install $(BUILDDIR)/strace $(DESTDIR)
17+ install "$(srcdir)/.."/strace-log-merge $(DESTDIR)
18+ install -d $(DESTDIR)/$(TESTDIR)
19+ cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
20+ sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
21+ for file in $(check_PROGRAMS); do \
22+ install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
23+ done
24+ for file in $(EXTRA_DIST); do \
25+ install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
26+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
27+ done
28+ sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/net
diff --git a/meta/recipes-devtools/strace/strace-4.8/run-ptest b/meta/recipes-devtools/strace/strace-4.8/run-ptest
new file mode 100755
index 0000000000..133cf92d02
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace-4.8/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -C tests -k runtest-TESTS
diff --git a/meta/recipes-devtools/strace/strace_4.8.bb b/meta/recipes-devtools/strace/strace_4.8.bb
index 0f4d2f001e..79a4ad79ab 100644
--- a/meta/recipes-devtools/strace/strace_4.8.bb
+++ b/meta/recipes-devtools/strace/strace_4.8.bb
@@ -7,11 +7,16 @@ PR = "r0"
7 7
8SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \ 8SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
9 file://git-version-gen \ 9 file://git-version-gen \
10 file://strace-add-configure-options.patch" 10 file://strace-add-configure-options.patch \
11 file://Makefile-ptest.patch \
12 file://run-ptest \
13 "
11 14
12SRC_URI[md5sum] = "c575ef43829586801f514fd91bfe7575" 15SRC_URI[md5sum] = "c575ef43829586801f514fd91bfe7575"
13SRC_URI[sha256sum] = "f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8" 16SRC_URI[sha256sum] = "f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8"
14inherit autotools 17
18inherit autotools ptest
19RDEPENDS_${PN}-ptest += "make"
15 20
16PACKAGECONFIG_class-target ?= "libaio" 21PACKAGECONFIG_class-target ?= "libaio"
17PACKAGECONFIG_class-target += "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" 22PACKAGECONFIG_class-target += "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
@@ -21,6 +26,8 @@ PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
21 26
22export INCLUDES = "-I. -I./linux" 27export INCLUDES = "-I. -I./linux"
23 28
29TESTDIR = "tests"
30
24do_configure_prepend() { 31do_configure_prepend() {
25 cp ${WORKDIR}/git-version-gen ${S} 32 cp ${WORKDIR}/git-version-gen ${S}
26} 33}
@@ -30,4 +37,12 @@ do_install_append() {
30 rm ${D}${bindir}/strace-graph 37 rm ${D}${bindir}/strace-graph
31} 38}
32 39
40do_compile_ptest() {
41 oe_runmake -C ${TESTDIR} buildtest-TESTS
42}
43
44do_install_ptest() {
45 oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
46}
47
33BBCLASSEXTEND = "native" 48BBCLASSEXTEND = "native"