aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/oprofile/oprofile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/oprofile/oprofile.inc')
-rw-r--r--meta/recipes-kernel/oprofile/oprofile.inc31
1 files changed, 29 insertions, 2 deletions
diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
index ccf9f9fa61..aaba48e8a0 100644
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/meta/recipes-kernel/oprofile/oprofile.inc
@@ -20,9 +20,11 @@ FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
SRC_URI = "file://opstart.patch \
file://oprofile-root.patch \
- file://acinclude.m4"
+ file://acinclude.m4 \
+ file://oprofile-cross-compile-tests.patch \
+ file://run-ptest"
-inherit autotools-brokensep pkgconfig
+inherit autotools-brokensep pkgconfig ptest
EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x"
do_configure () {
@@ -30,3 +32,28 @@ do_configure () {
cp ${WORKDIR}/acinclude.m4 ${S}/
autotools_do_configure
}
+
+EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests"
+do_compile_ptest() {
+ oe_runmake check
+}
+
+do_install_ptest() {
+ subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests "
+ cd ${S}
+ for tooltest in ${subdirs}
+ do
+ find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH}
+ done
+
+ # needed by some libop tests
+ cp -r events ${D}${PTEST_PATH}
+
+ # needed by libregex regex_test
+ cp libregex/stl.pat ${D}${PTEST_PATH}/libregex
+ cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests
+
+ # needed by litutil++ file_manip_tests
+ cp libutil++/tests/file_manip_tests.cpp \
+ libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests
+}