oprofile: Add PTEST and Determine the root home directory dynamically
cover oprofile: Add PTEST and Determine the root home directory dynamically
root@qemux86:/usr/lib/oprofile/ptest# ./run-ptest PASS: libdb/tests db_test PASS: libop/tests alloc_counter_tests PASS: libop/tests cpu_type_tests PASS: libop/tests load_events_files_tests PASS: libop/tests mangle_tests PASS: libop/tests parse_event_tests PASS: libop/tests utf8_checker.sh PASS: libregex/tests java_test PASS: libregex/tests regex_test PASS: libutil++/tests cached_value_tests PASS: libutil++/tests comma_list_tests PASS: libutil++/tests file_manip_tests PASS: libutil++/tests glob_filter_tests PASS: libutil++/tests path_filter_tests PASS: libutil++/tests string_filter_tests PASS: libutil++/tests string_manip_tests PASS: libutil++/tests utility_tests PASS: libutil/tests file_tests PASS: libutil/tests string_tests
The following changes since commit e7114046be6e71fb326477dc882adb814ef6a751:
busybox: fix meta-yocto's bbappend's FILESEXTRAPATH (2014-06-03 17:53:13 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib chonglu/oprofile
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=chonglu/oprofile
Chong Lu (2):
oprofile: Add PTEST regression testing to oprofile
oprofile: Determine the root home directory dynamically
meta/recipes-kernel/oprofile/oprofile.inc | 34 ++++++-
.../oprofile/oprofile-cross-compile-tests.patch | 98 ++++++++++++++++++
.../{oprofile-root.patch => root-home-dir.patch} | 111 +++++++++++----------
meta/recipes-kernel/oprofile/oprofile/run-ptest | 18 ++++
4 files changed, 205 insertions(+), 56 deletions(-)
create mode 100644 meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch
rename meta/recipes-kernel/oprofile/oprofile/{oprofile-root.patch => root-home-dir.patch} (43%)
create mode 100644 meta/recipes-kernel/oprofile/oprofile/run-ptestSignature · 1 line
1.8.1.2
PATCH 1/2 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.
--- meta/recipes-kernel/oprofile/oprofile.inc | 31 ++++++- .../oprofile/oprofile-cross-compile-tests.patch | 98 ++++++++++++++++++++++ meta/recipes-kernel/oprofile/oprofile/run-ptest | 18 ++++ 3 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/run-ptest
meta/recipes-kernel/oprofile/oprofile.inc +29 -2
@@ -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 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 +}
meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch new file +98 -0
98 lines not on this page · raw message
meta/recipes-kernel/oprofile/oprofile/run-ptest new file +18 -0
@@ -0,0 +1,18 @@ +#!/bin/bash +saved_dir=$PWD +for dir in */tests ; do + cd $dir + for atest in * ; do + if [ \( -x $atest \) -a \( -f $atest \) ] ; then + ./$atest > ${atest}.stdout 2> ${atest}.stderr + if [ $? = 0 ] ; then + echo "PASS: $dir $atest" + rm ${atest}.stdout ${atest}.stderr + else + echo "FAIL: ${dir}/${atest}" + fi + fi + done + cd $saved_dir +done +
Signature · 1 line
1.8.1.2
Re: [PATCH 1/2] oprofile: Add PTEST regression testing to oprofile
Quoted 27 lines · Chong Lu
The commit changes the oe-core oprofile recipe by adding the PTEST interface, implementing
do_compile_ptest()anddo_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.
Signed-off-by Dave Lerner <[email protected]>Signed-off-by Chong Lu <[email protected]>--- meta/recipes-kernel/oprofile/oprofile.inc | 31 ++++++- .../oprofile/oprofile-cross-compile-tests.patch | 98 ++++++++++++++++++++++ meta/recipes-kernel/oprofile/oprofile/run-ptest | 18 ++++ 3 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/run-ptestmeta/recipes-kernel/oprofile/oprofile.inc +0
-0
meta/recipes-kernel/oprofile/oprofile.inc FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" · line 27
Quoted 10 lines
meta/recipes-kernel/oprofile/oprofile.inc +4
-2@@ -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 ptest
You removed pkgconfig, why?
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Re: [PATCH 1/2] oprofile: Add PTEST regression testing to oprofile
Quoted 36 lines · Otavio Salvador
Quoted 35 lines · Chong Lu
The commit changes the oe-core oprofile recipe by adding the PTEST interface, implementing
do_compile_ptest()anddo_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.
Signed-off-by Dave Lerner <[email protected]>Signed-off-by Chong Lu <[email protected]>--- meta/recipes-kernel/oprofile/oprofile.inc | 31 ++++++- .../oprofile/oprofile-cross-compile-tests.patch | 98 ++++++++++++++++++++++ meta/recipes-kernel/oprofile/oprofile/run-ptest | 18 ++++ 3 files changed, 145 insertions(+), 2 deletions(-)create mode 100644
meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patchcreate mode 100644 meta/recipes-kernel/oprofile/oprofile/run-ptestmeta/recipes-kernel/oprofile/oprofile.inc +3
-1@@ -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"
Quoted 4 lines
meta/recipes-kernel/oprofile/oprofile.inc FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" · line 27
Quoted 2 lines
meta/recipes-kernel/oprofile/oprofile.inc +1
-1-inherit autotools-brokensep pkgconfig +inherit autotools-brokensep ptestYou removed pkgconfig, why?
It's my mistake. pkgconfig should not be removed. I will resend V2.
Best Regards
Chong
PATCH 2/2 oprofile: Determine the root home directory dynamically
In reply to Chong LuThis commit detects the root home directory dynamically with changes to the opcontrol script and the oprofile gui app source.
The commit replaces an earlier fix that detected and adjusted a 'non-standard' root home directory at build time. The advantage of this patch is that the oprofile tools are adjusted to the current run-time path to ~root, not the build time path.
---
meta/recipes-kernel/oprofile/oprofile.inc | 5 +-
.../{oprofile-root.patch => root-home-dir.patch} | 111 +++++++++++----------
2 files changed, 61 insertions(+), 55 deletions(-)
rename meta/recipes-kernel/oprofile/oprofile/{oprofile-root.patch => root-home-dir.patch} (43%)meta/recipes-kernel/oprofile/oprofile.inc +2 -3
@@ -19,16 +19,15 @@ FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la" FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" SRC_URI = "file://opstart.patch \ - file://oprofile-root.patch \ file://acinclude.m4 \ file://oprofile-cross-compile-tests.patch \ - file://run-ptest" + file://run-ptest \ + file://root-home-dir.patch" inherit autotools-brokensep ptest EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x" do_configure () { - find ${S} -wholename '${S}/.pc' -prune -o -type f -print | xargs sed -i 's#ROOTHOME#${ROOT_HOME}#' cp ${WORKDIR}/acinclude.m4 ${S}/ autotools_do_configure }
meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch renamed from meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch +59 -52
172 lines not on this page · raw message
Signature · 1 line
1.8.1.2