aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
diff options
context:
space:
mode:
authorDave Lerner <dave.lerner@windriver.com>2014-02-15 09:27:31 -0600
committerSaul Wold <sgw@linux.intel.com>2014-02-20 20:06:22 -0800
commitd4438e421f448cdb7e25c038d657bbebc1b6486e (patch)
tree87433e9b5b32f527a6493aa7c8e4356bb997765f /meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
parent43ac6e3216c5d985d6f90a28e727e397df616267 (diff)
downloadopenembedded-core-contrib-d4438e421f448cdb7e25c038d657bbebc1b6486e.tar.gz
valgrind: integration of regression tests to ptest
Modifies valgrind's regression test framework to be compatible with the yocto PTEST framework as follows: * existing recipe valgrind*bb adds new methods: do_compile_ptest and do_install_ptest. * new file run-ptest adds the wrapper interface to the valgrind regression test script vg_regtest. * existing valgrind regression test script 'vg_regtest' changes to report the status of the valgrind component tests in the format that PTEST expects, instead of the valgrind formats, but only when vg_regtest is invoked with an optional --yocto-ptest argument * four new patches disable building tests that don't compile with the yocto compiler and default options. See the patches for details. Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind_3.9.0.bb')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.9.0.bb56
1 files changed, 55 insertions, 1 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
index 64da1a2808..163367c822 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
@@ -16,6 +16,11 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
file://sepbuildfix.patch \
file://glibc-2.19.patch \
+ file://force-nostabs.patch \
+ file://remove-arm-variant-specific.patch \
+ file://remove-ppc-tests-failing-build.patch \
+ file://add-ptest.patch \
+ file://run-ptest \
"
SRC_URI[md5sum] = "0947de8112f946b9ce64764af7be6df2"
@@ -24,7 +29,7 @@ SRC_URI[sha256sum] = "e6af71a06bc2534541b07743e1d58dc3caf744f38205ca3e5b5a0bdf37
COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64).*-linux'
COMPATIBLE_HOST_armv7a = 'arm.*-linux'
-inherit autotools
+inherit autotools ptest
EXTRA_OECONF = "--enable-tls --without-mpicc"
EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc"
@@ -42,3 +47,52 @@ FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*"
# valgrind needs debug information for ld.so at runtime in order to
# redirect functions like strlen.
RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
+
+RDEPENDS_${PN}-ptest += " sed perl eglibc-utils"
+
+do_compile_ptest() {
+ oe_runmake check
+}
+
+
+do_install_ptest() {
+ chmod +x ${B}/tests/vg_regtest
+
+ # The test application binaries are not automatically installed.
+ # Grab them from the build directory.
+ #
+ # The regression tests require scripts and data files that are not
+ # copied to the build directory. They must be copied from the
+ # source directory.
+ saved_dir=$PWD
+ for parent_dir in ${S} ${B} ; do
+ cd $parent_dir
+
+ # exclude shell or the package won't install
+ rm -rf none/tests/shell* 2>/dev/null
+
+ subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests"
+
+ # Get the vg test scripts, filters, and expected files
+ for dir in $subdirs ; do
+ find $dir | cpio -pvdu ${D}${PTEST_PATH}
+ done
+ cd $saved_dir
+ done
+
+ # clean out build artifacts before building the rpm
+ find ${D}${PTEST_PATH} \
+ \( -name "Makefile*" \
+ -o -name "*.o" \
+ -o -name "*.c" \
+ -o -name "*.S" \
+ -o -name "*.h" \) \
+ -exec rm {} \;
+
+ # needed by massif tests
+ cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print
+
+ # handle multilib
+ sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
+}
+