diff options
author | Chong Lu <Chong.Lu@windriver.com> | 2014-06-06 09:25:10 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-10 17:24:18 +0100 |
commit | df956a6dcdf79086517c7c956f1deb7824c222b7 (patch) | |
tree | f130f2002859f67f54e14b608e7bc36332d58b0d /meta/recipes-kernel/oprofile/oprofile.inc | |
parent | 54f1528f93ec0e8a62365f2cdce7e6db16cb62ff (diff) | |
download | poky-df956a6dcdf79086517c7c956f1deb7824c222b7.tar.gz |
oprofile: Add PTEST regression testing to oprofile
The commit changes the oe-core oprofile recipe by adding the PTEST
interface, implementing do_compile_ptest() and do_install_ptest().
The install routine adds several files that only the regression tests
require. Also, a patch is necessary to inhibit executing the tests on
the build host and to point to the correct target directory for the
libutil++ test 'file-manip-tests'.
That test requires the recipe to set SRCDIR in the build environment
instead of determining the value from build-time host paths as for a
self-hosted build.
(From OE-Core rev: ac5a9835075a04726a64dbd669b9c89270b23865)
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/oprofile/oprofile.inc')
-rw-r--r-- | meta/recipes-kernel/oprofile/oprofile.inc | 31 |
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" | |||
20 | 20 | ||
21 | SRC_URI = "file://opstart.patch \ | 21 | SRC_URI = "file://opstart.patch \ |
22 | file://oprofile-root.patch \ | 22 | file://oprofile-root.patch \ |
23 | file://acinclude.m4" | 23 | file://acinclude.m4 \ |
24 | file://oprofile-cross-compile-tests.patch \ | ||
25 | file://run-ptest" | ||
24 | 26 | ||
25 | inherit autotools-brokensep pkgconfig | 27 | inherit autotools-brokensep pkgconfig ptest |
26 | 28 | ||
27 | EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x" | 29 | EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x" |
28 | do_configure () { | 30 | do_configure () { |
@@ -30,3 +32,28 @@ do_configure () { | |||
30 | cp ${WORKDIR}/acinclude.m4 ${S}/ | 32 | cp ${WORKDIR}/acinclude.m4 ${S}/ |
31 | autotools_do_configure | 33 | autotools_do_configure |
32 | } | 34 | } |
35 | |||
36 | EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests" | ||
37 | do_compile_ptest() { | ||
38 | oe_runmake check | ||
39 | } | ||
40 | |||
41 | do_install_ptest() { | ||
42 | subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests " | ||
43 | cd ${S} | ||
44 | for tooltest in ${subdirs} | ||
45 | do | ||
46 | find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH} | ||
47 | done | ||
48 | |||
49 | # needed by some libop tests | ||
50 | cp -r events ${D}${PTEST_PATH} | ||
51 | |||
52 | # needed by libregex regex_test | ||
53 | cp libregex/stl.pat ${D}${PTEST_PATH}/libregex | ||
54 | cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests | ||
55 | |||
56 | # needed by litutil++ file_manip_tests | ||
57 | cp libutil++/tests/file_manip_tests.cpp \ | ||
58 | libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests | ||
59 | } | ||