From 6b490be5d119f932996ee8d0755ec331510da3b2 Mon Sep 17 00:00:00 2001 From: Soren Brinkmann Date: Sun, 9 Jul 2017 00:35:37 -0700 Subject: valgrind: Update 3.12.0 -> 3.13.0 (From OE-Core rev: 99e00dc094afbff7785263b760e26e03ac09425f) Signed-off-by: Soren Brinkmann Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- .../valgrind/0001-fix-build-for-musl-targets.patch | 69 --------- .../valgrind/0004-Fix-out-of-tree-builds.patch | 34 +++-- meta/recipes-devtools/valgrind/valgrind_3.12.0.bb | 155 --------------------- meta/recipes-devtools/valgrind/valgrind_3.13.0.bb | 152 ++++++++++++++++++++ 4 files changed, 173 insertions(+), 237 deletions(-) delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch delete mode 100644 meta/recipes-devtools/valgrind/valgrind_3.12.0.bb create mode 100644 meta/recipes-devtools/valgrind/valgrind_3.13.0.bb (limited to 'meta') diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch b/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch deleted file mode 100644 index dc6feff7ff..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 1b1a024efd18d44294e184e792c1e039cab02bfe Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 14 Feb 2016 09:14:12 +0000 -Subject: [PATCH] fix build for musl targets - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - configure.ac | 2 -- - coregrind/vg_preloaded.c | 2 +- - include/pub_tool_redir.h | 7 +++++-- - 3 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 9366dc7..679f514 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1066,8 +1066,6 @@ case "${GLIBC_VERSION}" in - ;; - 2.0|2.1|*) - AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) -- AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,]) -- AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc]) - ;; - esac - -diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c -index 2ea7a7a..e49c832 100644 ---- a/coregrind/vg_preloaded.c -+++ b/coregrind/vg_preloaded.c -@@ -56,7 +56,7 @@ - void VG_NOTIFY_ON_LOAD(freeres)( void ); - void VG_NOTIFY_ON_LOAD(freeres)( void ) - { --# if !defined(__UCLIBC__) \ -+# if !defined(__UCLIBC__) && defined(__GLIBC__) \ - && !defined(VGPV_arm_linux_android) \ - && !defined(VGPV_x86_linux_android) \ - && !defined(VGPV_mips32_linux_android) \ -diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h -index bac00d7..fbb2ef2 100644 ---- a/include/pub_tool_redir.h -+++ b/include/pub_tool_redir.h -@@ -242,8 +242,7 @@ - /* --- Soname of the standard C library. --- */ - - #if defined(VGO_linux) || defined(VGO_solaris) --# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so* -- -+# define VG_Z_LIBC_SONAME libcZdZa // libc.* - #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6) - # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib - -@@ -274,7 +273,11 @@ - /* --- Soname of the pthreads library. --- */ - - #if defined(VGO_linux) -+# if defined(__GLIBC__) || defined(__UCLIBC__) - # define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0 -+# else -+# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.* -+#endif - #elif defined(VGO_darwin) - # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib - #elif defined(VGO_solaris) --- -2.7.1 - diff --git a/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch index ed313d6444..39022d04ae 100644 --- a/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch +++ b/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch @@ -1,4 +1,4 @@ -From 38ae233b6893a4eec7f9ed6d8ad02392bca8eaed Mon Sep 17 00:00:00 2001 +From 739421e253e6eba3eb6438651822f80fa9c0502a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 15 Dec 2015 15:31:50 +0200 Subject: [PATCH 1/2] Fix out of tree builds. @@ -13,21 +13,21 @@ Upstream-Status: Pending Signed-off-by: Alexander Kanavin --- - configure.ac | 64 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 32 insertions(+), 32 deletions(-) + configure.ac | 68 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/configure.ac b/configure.ac -index 8ab7f9b..9366dc7 100644 +index 3874296fde0b..7a5ba2c8557e 100644 --- a/configure.ac +++ b/configure.ac -@@ -377,44 +377,44 @@ case "${host_os}" in +@@ -373,50 +373,50 @@ case "${host_os}" in 9.*) AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version]) - DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" ;; 10.*) AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) @@ -75,11 +75,19 @@ index 8ab7f9b..9366dc7 100644 - DEFAULT_SUPP="darwin15.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + ;; + 16.*) + AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_12, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin16.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; *) AC_MSG_RESULT([unsupported (${kernel})]) -@@ -426,13 +426,13 @@ case "${host_os}" in +@@ -428,13 +428,13 @@ case "${host_os}" in solaris2.11*) AC_MSG_RESULT([ok (${host_os})]) VGCONF_OS="solaris" @@ -95,7 +103,7 @@ index 8ab7f9b..9366dc7 100644 ;; *) -@@ -1015,29 +1015,29 @@ AC_MSG_CHECKING([the glibc version]) +@@ -982,29 +982,29 @@ AC_MSG_CHECKING([the glibc version]) case "${GLIBC_VERSION}" in 2.2) AC_MSG_RESULT(${GLIBC_VERSION} family) @@ -135,7 +143,7 @@ index 8ab7f9b..9366dc7 100644 ;; 2.*) AC_MSG_RESULT(${GLIBC_VERSION} family) -@@ -1046,8 +1046,8 @@ case "${GLIBC_VERSION}" in +@@ -1013,8 +1013,8 @@ case "${GLIBC_VERSION}" in AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1, [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)]) DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" @@ -146,7 +154,7 @@ index 8ab7f9b..9366dc7 100644 ;; darwin) AC_MSG_RESULT(Darwin) -@@ -1057,7 +1057,7 @@ case "${GLIBC_VERSION}" in +@@ -1024,7 +1024,7 @@ case "${GLIBC_VERSION}" in bionic) AC_MSG_RESULT(Bionic) AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic]) @@ -155,7 +163,7 @@ index 8ab7f9b..9366dc7 100644 ;; solaris) AC_MSG_RESULT(Solaris) -@@ -1079,11 +1079,11 @@ if test "$VGCONF_OS" != "solaris"; then +@@ -1051,11 +1051,11 @@ if test "$VGCONF_OS" != "solaris"; then # attempt to detect whether such libraries are installed on the # build machine (or even if any X facilities are present); just # add the suppressions antidisirregardless. @@ -171,5 +179,5 @@ index 8ab7f9b..9366dc7 100644 -- -2.6.2 +2.13.2.3.g44cd85c14 diff --git a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb deleted file mode 100644 index 0cc5eefc88..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb +++ /dev/null @@ -1,155 +0,0 @@ -SUMMARY = "Valgrind memory debugger and instrumentation framework" -HOMEPAGE = "http://valgrind.org/" -BUGTRACKER = "http://valgrind.org/support/bug_reports.html" -LICENSE = "GPLv2 & GPLv2+ & BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://include/pub_tool_basics.h;beginline=1;endline=29;md5=ebb8e640ef633f940c425686c873f9fa \ - file://include/valgrind.h;beginline=1;endline=56;md5=4b5e24908e53016ea561c45f4234a327 \ - file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56" - -X11DEPENDS = "virtual/libx11" -DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \ - " - -SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \ - file://fixed-perl-path.patch \ - file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ - file://run-ptest \ - file://0002-remove-rpath.patch \ - file://0004-Fix-out-of-tree-builds.patch \ - file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ - file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ - file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ - file://avoid-neon-for-targets-which-don-t-support-it.patch \ - file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ - file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \ - file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \ - file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ - file://0002-context-APIs-are-not-available-on-musl.patch \ - file://0003-correct-include-directive-path-for-config.h.patch \ - file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \ - file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \ - file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \ - file://0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch \ - file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \ - file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \ - file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ - file://link-gz-tests.patch \ - " -SRC_URI_append_libc-musl = "\ - file://0001-fix-build-for-musl-targets.patch \ -" -SRC_URI[md5sum] = "6eb03c0c10ea917013a7622e483d61bb" -SRC_URI[sha256sum] = "67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012cf76a1" - -COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' - -# valgrind supports armv7 and above -COMPATIBLE_HOST_armv4 = 'null' -COMPATIBLE_HOST_armv5 = 'null' -COMPATIBLE_HOST_armv6 = 'null' - -# X32 isn't supported by valgrind at this time -COMPATIBLE_HOST_linux-gnux32 = 'null' - -# Disable for some MIPS variants -COMPATIBLE_HOST_mipsarcho32 = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}" -COMPATIBLE_HOST_mipsarchn32 = 'null' -COMPATIBLE_HOST_mipsarchn64 = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}" -COMPATIBLE_HOST_mipsarchr6 = 'null' - -inherit autotools ptest - -EXTRA_OECONF = "--enable-tls --without-mpicc" -EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" - -# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option -EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" -TARGET_CC_ARCH_remove_arm = "${@get_mcpu(d)}" - -EXTRA_OEMAKE = "-w" - -CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" - -# valgrind likes to control its own optimisation flags. It generally defaults -# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags -# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it -# which fixes build path issue in DWARF. -SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" - -def get_mcpu(d): - for arg in (d.getVar('TUNE_CCARGS') or '').split(): - if arg.startswith('-mcpu='): - return arg - else: - continue - return "" - -do_configure_prepend () { - rm -rf ${S}/config.h -} - -do_install_append () { - install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ -} - -TUNE = "${@strip_mcpu(d)}" - -RDEPENDS_${PN} += "perl" - -# 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 perl-module-file-glob" -RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" - -# One of the tests contains a bogus interpreter path on purpose. -# Skip file dependency check -SKIP_FILEDEPS_${PN}-ptest = '1' - -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 -} diff --git a/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb new file mode 100644 index 0000000000..2ec9b9b6fc --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb @@ -0,0 +1,152 @@ +SUMMARY = "Valgrind memory debugger and instrumentation framework" +HOMEPAGE = "http://valgrind.org/" +BUGTRACKER = "http://valgrind.org/support/bug_reports.html" +LICENSE = "GPLv2 & GPLv2+ & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://include/pub_tool_basics.h;beginline=6;endline=29;md5=d4de0407239381463cf01dd276d7c22e \ + file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \ + file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56" + +X11DEPENDS = "virtual/libx11" +DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \ + " + +SRC_URI = "ftp://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ + file://fixed-perl-path.patch \ + file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ + file://run-ptest \ + file://0002-remove-rpath.patch \ + file://0004-Fix-out-of-tree-builds.patch \ + file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ + file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ + file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ + file://avoid-neon-for-targets-which-don-t-support-it.patch \ + file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ + file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \ + file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \ + file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ + file://0002-context-APIs-are-not-available-on-musl.patch \ + file://0003-correct-include-directive-path-for-config.h.patch \ + file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \ + file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \ + file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \ + file://0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch \ + file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \ + file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \ + file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ + file://link-gz-tests.patch \ + " +SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369" +SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b" + +COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' + +# valgrind supports armv7 and above +COMPATIBLE_HOST_armv4 = 'null' +COMPATIBLE_HOST_armv5 = 'null' +COMPATIBLE_HOST_armv6 = 'null' + +# X32 isn't supported by valgrind at this time +COMPATIBLE_HOST_linux-gnux32 = 'null' + +# Disable for some MIPS variants +COMPATIBLE_HOST_mipsarcho32 = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}" +COMPATIBLE_HOST_mipsarchn32 = 'null' +COMPATIBLE_HOST_mipsarchn64 = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}" +COMPATIBLE_HOST_mipsarchr6 = 'null' + +inherit autotools ptest + +EXTRA_OECONF = "--enable-tls --without-mpicc" +EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" + +# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option +EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" +TARGET_CC_ARCH_remove_arm = "${@get_mcpu(d)}" + +EXTRA_OEMAKE = "-w" + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" + +# valgrind likes to control its own optimisation flags. It generally defaults +# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags +# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it +# which fixes build path issue in DWARF. +SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" + +def get_mcpu(d): + for arg in (d.getVar('TUNE_CCARGS') or '').split(): + if arg.startswith('-mcpu='): + return arg + else: + continue + return "" + +do_configure_prepend () { + rm -rf ${S}/config.h +} + +do_install_append () { + install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ +} + +TUNE = "${@strip_mcpu(d)}" + +RDEPENDS_${PN} += "perl" + +# 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 perl-module-file-glob" +RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" + +# One of the tests contains a bogus interpreter path on purpose. +# Skip file dependency check +SKIP_FILEDEPS_${PN}-ptest = '1' + +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 +} -- cgit v1.2.3-54-g00ecf