summaryrefslogtreecommitdiffstats
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
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-21 16:09:07 +0000
commitdc9f7d7c4908a4bc32d4e1e03ab3367a3d3f1441 (patch)
tree27c2e40cb6aec1afe6cf8e6cd7b2d16b7fc69e10 /meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
parentbb0c26960d3b05070346cdfdfd05d6fd4ad0a7b1 (diff)
downloadpoky-dc9f7d7c4908a4bc32d4e1e03ab3367a3d3f1441.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. (From OE-Core rev: d4438e421f448cdb7e25c038d657bbebc1b6486e) Signed-off-by: Dave Lerner <dave.lerner@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-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 \
16 file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ 16 file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
17 file://sepbuildfix.patch \ 17 file://sepbuildfix.patch \
18 file://glibc-2.19.patch \ 18 file://glibc-2.19.patch \
19 file://force-nostabs.patch \
20 file://remove-arm-variant-specific.patch \
21 file://remove-ppc-tests-failing-build.patch \
22 file://add-ptest.patch \
23 file://run-ptest \
19 " 24 "
20 25
21SRC_URI[md5sum] = "0947de8112f946b9ce64764af7be6df2" 26SRC_URI[md5sum] = "0947de8112f946b9ce64764af7be6df2"
@@ -24,7 +29,7 @@ SRC_URI[sha256sum] = "e6af71a06bc2534541b07743e1d58dc3caf744f38205ca3e5b5a0bdf37
24COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64).*-linux' 29COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64).*-linux'
25COMPATIBLE_HOST_armv7a = 'arm.*-linux' 30COMPATIBLE_HOST_armv7a = 'arm.*-linux'
26 31
27inherit autotools 32inherit autotools ptest
28 33
29EXTRA_OECONF = "--enable-tls --without-mpicc" 34EXTRA_OECONF = "--enable-tls --without-mpicc"
30EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc" 35EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc"
@@ -42,3 +47,52 @@ FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*"
42# valgrind needs debug information for ld.so at runtime in order to 47# valgrind needs debug information for ld.so at runtime in order to
43# redirect functions like strlen. 48# redirect functions like strlen.
44RRECOMMENDS_${PN} += "${TCLIBC}-dbg" 49RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
50
51RDEPENDS_${PN}-ptest += " sed perl eglibc-utils"
52
53do_compile_ptest() {
54 oe_runmake check
55}
56
57
58do_install_ptest() {
59 chmod +x ${B}/tests/vg_regtest
60
61 # The test application binaries are not automatically installed.
62 # Grab them from the build directory.
63 #
64 # The regression tests require scripts and data files that are not
65 # copied to the build directory. They must be copied from the
66 # source directory.
67 saved_dir=$PWD
68 for parent_dir in ${S} ${B} ; do
69 cd $parent_dir
70
71 # exclude shell or the package won't install
72 rm -rf none/tests/shell* 2>/dev/null
73
74 subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests"
75
76 # Get the vg test scripts, filters, and expected files
77 for dir in $subdirs ; do
78 find $dir | cpio -pvdu ${D}${PTEST_PATH}
79 done
80 cd $saved_dir
81 done
82
83 # clean out build artifacts before building the rpm
84 find ${D}${PTEST_PATH} \
85 \( -name "Makefile*" \
86 -o -name "*.o" \
87 -o -name "*.c" \
88 -o -name "*.S" \
89 -o -name "*.h" \) \
90 -exec rm {} \;
91
92 # needed by massif tests
93 cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print
94
95 # handle multilib
96 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
97}
98