From 12d9280c3de24c1c2b835e80fa1b8be72e9bc63a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 16 Aug 2023 10:38:36 +0100 Subject: lttng-tools: Upgrade 2.13.9 -> 2.13.10 (From OE-Core rev: 6dffea78a6de286de67524b558bb1527fedd673e) Signed-off-by: Richard Purdie --- .../40b2a4a793c81221a28f822d07135069456ea021.patch | 48 ----- .../lttng/lttng-tools/gcc13-ptest-fix.patch | 107 ----------- meta/recipes-kernel/lttng/lttng-tools_2.13.10.bb | 195 ++++++++++++++++++++ meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb | 197 --------------------- 4 files changed, 195 insertions(+), 352 deletions(-) delete mode 100644 meta/recipes-kernel/lttng/lttng-tools/40b2a4a793c81221a28f822d07135069456ea021.patch delete mode 100644 meta/recipes-kernel/lttng/lttng-tools/gcc13-ptest-fix.patch create mode 100644 meta/recipes-kernel/lttng/lttng-tools_2.13.10.bb delete mode 100644 meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb diff --git a/meta/recipes-kernel/lttng/lttng-tools/40b2a4a793c81221a28f822d07135069456ea021.patch b/meta/recipes-kernel/lttng/lttng-tools/40b2a4a793c81221a28f822d07135069456ea021.patch deleted file mode 100644 index e338eaff2b..0000000000 --- a/meta/recipes-kernel/lttng/lttng-tools/40b2a4a793c81221a28f822d07135069456ea021.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 40b2a4a793c81221a28f822d07135069456ea021 Mon Sep 17 00:00:00 2001 -From: Olivier Dion -Date: Fri, 10 Mar 2023 13:17:46 -0500 -Subject: [PATCH] Tests: fix: parse-callback reports missing addr2line -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Backport - -addr2line from binutils is required for this script to work correctly. -However, it silently fails. Fix this by using `subprocess.run' with -`check=True' instead of `subprocess.getoutput'. That way, an exception -is raised if an error occurs. - -Fix the shebang by not assuming where python is installed while at it. - -Change-Id: I5157b3dbccf6bfbe08a6b6840b38f5db9010fe96 -Signed-off-by: Olivier Dion -Signed-off-by: Jérémie Galarneau ---- - tests/utils/parse-callstack.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py -index 3bfddd9ef..c3f0e2e9b 100755 ---- a/tests/utils/parse-callstack.py -+++ b/tests/utils/parse-callstack.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python3 -+#!/usr/bin/env python3 - # - # Copyright (C) 2017 Francis Deslauriers - # -@@ -24,7 +24,9 @@ def addr2line(executable, addr): - # Expand inlined functions - cmd += ['--addresses', addr] - -- addr2line_output = subprocess.getoutput(' '.join(cmd)) -+ status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True) -+ -+ addr2line_output = status.stdout.decode("utf-8") - - # Omit the last 2 lines as the caller of main can not be determine - fcts = [addr2line_output.split()[-2]] --- -2.34.1 - diff --git a/meta/recipes-kernel/lttng/lttng-tools/gcc13-ptest-fix.patch b/meta/recipes-kernel/lttng/lttng-tools/gcc13-ptest-fix.patch deleted file mode 100644 index 52c4ec9f8e..0000000000 --- a/meta/recipes-kernel/lttng/lttng-tools/gcc13-ptest-fix.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 844be4dc46deeec83199da80e9e2a6058e9f5a53 Mon Sep 17 00:00:00 2001 -From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= - -Date: Thu, 25 May 2023 19:15:20 -0400 -Subject: [PATCH] Tests fix: test_callstack: output of addr2line incorrectly - parsed -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Backport - -Issue observed --------------- - -The test_callstack test fails with GCC 13.1 with the following output: - - Traceback (most recent call last): - File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 160, in - main() - File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 155, in main - raise Exception('Expected function name not found in recorded callstack') - Exception: Expected function name not found in recorded callstack - ok 10 - Destroy session callstack - PASS: kernel/test_callstack 10 - Destroy session callstack - not ok 11 - Validate userspace callstack - FAIL: kernel/test_callstack 11 - Validate userspace callstack - -Cause ------ - -parse-callstack.py uses 'split()' to split the lines of addr2line's -output. By default, 'split()' splits a string on any whitespace. -Typically this was fine as addr2line's output doesn't contain spaces and -the function then splits on new lines. - -Typical output of addr2line: - - $ addr2line -e ./tests/regression/kernel//../../utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack --functions --addresses 0x40124B - 0x000000000040124b - my_gettid - /tmp/test-callstack-master/src/lttng-tools/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c:40 - -However, with the test app compiled using gcc 13.1, a "discriminator" -annotation is present: - - 0x0000000000401279 - fct_b - /tmp/test-callstack-master/src/lttng-tools/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c:58 (discriminator 1) - -Hence, by selecting the second to last element (-2, with negative -indexing), the addr2line function returns '(discriminator' as the -function name. - -Solution --------- - -The parsing code is changed to simply iterate on groups of 3 lines, -following addr2line's output format. - -Fixes #1377 - -Change-Id: I8c1eab97e84ca7cad171904bed6660540061cf08 -Signed-off-by: Jérémie Galarneau ---- - tests/utils/parse-callstack.py | 25 +++++++++++++++++-------- - 1 file changed, 17 insertions(+), 8 deletions(-) - -diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py -index c3f0e2e9bc..029100b618 100755 ---- a/tests/utils/parse-callstack.py -+++ b/tests/utils/parse-callstack.py -@@ -26,14 +26,23 @@ def addr2line(executable, addr): - - status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True) - -- addr2line_output = status.stdout.decode("utf-8") -- -- # Omit the last 2 lines as the caller of main can not be determine -- fcts = [addr2line_output.split()[-2]] -- -- fcts = [ f for f in fcts if '??' not in f] -- -- return fcts -+ addr2line_output = status.stdout.decode("utf-8").splitlines() -+ # addr2line's output is made of 3-tuples: -+ # - address -+ # - function name -+ # - source location -+ if len(addr2line_output) % 3 != 0: -+ raise Exception('Unexpected addr2line output:\n\t{}'.format('\n\t'.join(addr2line_output))) -+ -+ function_names = [] -+ for address_line_number in range(0, len(addr2line_output), 3): -+ function_name = addr2line_output[address_line_number + 1] -+ -+ # Filter-out unresolved functions -+ if "??" not in function_name: -+ function_names.append(addr2line_output[address_line_number + 1]) -+ -+ return function_names - - def extract_user_func_names(executable, raw_callstack): - """ --- -2.34.1 - diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.10.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.10.bb new file mode 100644 index 0000000000..20e6375a9b --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.10.bb @@ -0,0 +1,195 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit Control" +DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \ +to extract program execution details from the Linux operating system \ +and interpret them." +HOMEPAGE = "https://github.com/lttng/lttng-tools" + +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=40ef17463fbd6f377db3c47b1cbaded8 \ + file://LICENSES/GPL-2.0;md5=e68f69a54b44ba526ad7cb963e18fbce \ + file://LICENSES/LGPL-2.1;md5=9920968d0f2ff585ce61fae30344dd95" + +include lttng-platforms.inc + +DEPENDS = "liburcu popt libxml2 util-linux bison-native" +RDEPENDS:${PN} = "libgcc" +RRECOMMENDS:${PN} += "${LTTNGMODULES}" +RDEPENDS:${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core grep binutils" +RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils" +RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils" +# babelstats.pl wants getopt-long +RDEPENDS:${PN}-ptest += "perl-module-getopt-long" + +PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \ + am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \ + PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ +" +PACKAGECONFIG ??= "${LTTNGUST} kmod" +PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native" +PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust" +PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod" +PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" + +SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ + file://0001-tests-do-not-strip-a-helper-library.patch \ + file://run-ptest \ + file://lttng-sessiond.service \ + file://disable-tests.patch \ + file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \ + " + +SRC_URI[sha256sum] = "e5d1095ec1322565f38f149346f71967496c281eacc51ec5c77994b850e7d335" + +inherit autotools ptest pkgconfig useradd python3-dir manpages systemd + +CACHED_CONFIGUREVARS = "PGREP=/usr/bin/pgrep" + +SYSTEMD_SERVICE:${PN} = "lttng-sessiond.service" +SYSTEMD_AUTO_ENABLE = "disable" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "tracing" + +FILES:${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \ + ${PYTHON_SITEPACKAGES_DIR}/*" +FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" +FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" + +# Since files are installed into ${libdir}/lttng/libexec we match +# the libexec insane test so skip it. +# Python module needs to keep _lttng.so +INSANE_SKIP:${PN} = "libexec dev-so" +INSANE_SKIP:${PN}-dbg = "libexec" + +PRIVATE_LIBS:${PN}-ptest = "libfoo.so" + +do_install:append () { + # install systemd unit file + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_system_unitdir} +} + +do_install_ptest () { + for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/*.lttng \ + tests/regression/tools/save-load/configuration/load-42*.lttng tests/regression/tools/health/test_health.sh \ + tests/regression/tools/metadata/utils.sh tests/regression/tools/rotation/rotate_utils.sh \ + tests/regression/tools/notification/util_event_generator.sh \ + tests/regression/tools/base-path/*.lttng; do + install -D "${B}/$f" "${D}${PTEST_PATH}/$f" + done + + for f in tests/utils/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-4.1.xsd; do + install -D "${S}/$f" "${D}${PTEST_PATH}/$f" + done + + # Patch in the correct path for the custom libraries a helper executable needs + sed -i -e 's!FIXMEPTESTPATH!${PTEST_PATH}!g' "${D}${PTEST_PATH}/run-ptest" + + # Prevent 'make check' from recursing into non-test subdirectories. + sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile" + + # We don't need these + sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile" + + # We shouldn't need to build anything in tests/utils + sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \ + "${D}${PTEST_PATH}/tests/Makefile" + + # Copy the tests directory tree and the executables and + # Makefiles found within. + for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do + install -d "${D}${PTEST_PATH}/tests/$d" + find "${B}/tests/$d" -maxdepth 1 -executable -type f \ + -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + + # Take all .py scripts for tests using the python bindings. + find "${B}/tests/$d" -maxdepth 1 -type f -name "*.py" \ + -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + + test -r "${B}/tests/$d/Makefile" && \ + install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile" + done + + for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do + for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do + cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f + case $f in + *.so|userspace-probe-elf-*) + install -d ${D}${PTEST_PATH}/tests/$d/ + ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f + # Remove any rpath/runpath to pass QA check. + chrpath --delete ${D}${PTEST_PATH}/tests/$d/$f + ;; + esac + done + done + + chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary + chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary + chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libbar.so + chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libfoo.so + + # + # Use the versioned libs of liblttng-ust-dl. + # + ustdl="${D}${PTEST_PATH}/tests/regression/ust/ust-dl/test_ust-dl.py" + if [ -e $ustdl ]; then + sed -i -e 's!:liblttng-ust-dl.so!:liblttng-ust-dl.so.0!' $ustdl + fi + + install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/ + + # We shouldn't need to build anything in tests/regression/tools + sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \ + "${D}${PTEST_PATH}/tests/regression/Makefile" + + # Prevent attempts to update Makefiles during test runs, and + # silence "Making check in $SUBDIR" messages. + find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ + sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \ + -e '/echo "Making $$target in $$subdir"; \\/d' \ + -e 's/^srcdir = \(.*\)/srcdir = ./' \ + -e 's/^builddir = \(.*\)/builddir = ./' \ + -e 's/^all-am:.*/all-am:/' \ + {} + + + find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ + touch -r "${B}/Makefile" {} + + + # + # Need to stop generated binaries from rebuilding by removing their source dependencies + # + sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \ + -e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \ + -e 's#\(^test.*SOURCES.=\)#disable\1#g' \ + -e 's#\(^test.*LDADD.=\)#disable\1#g' \ + -i ${D}${PTEST_PATH}/tests/unit/Makefile + + # Fix hardcoded build path + sed -e 's#TESTAPP_PATH=.*/tests/regression/#TESTAPP_PATH="${PTEST_PATH}/tests/regression/#' \ + -i ${D}${PTEST_PATH}/tests/regression/ust/python-logging/test_python_logging + + # Substitute links to installed binaries. + for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd lttng-crash; do + exedir="${D}${PTEST_PATH}/src/bin/${prog}" + install -d "$exedir" + case "$prog" in + lttng-consumerd) + ln -s "${libdir}/lttng/libexec/$prog" "$exedir" + ;; + *) + ln -s "${bindir}/$prog" "$exedir" + ;; + esac + done +} + +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary \ + ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/.libs/userspace-probe-elf-binary \ + ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary \ + ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/.libs/userspace-probe-elf-cxx-binary \ + ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/gen-syscall-events \ + ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/.libs/gen-syscall-events \ + ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack \ + ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/.libs/gen-syscall-events-callstack \ + " diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb deleted file mode 100644 index 113720ca5c..0000000000 --- a/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb +++ /dev/null @@ -1,197 +0,0 @@ -SECTION = "devel" -SUMMARY = "Linux Trace Toolkit Control" -DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \ -to extract program execution details from the Linux operating system \ -and interpret them." -HOMEPAGE = "https://github.com/lttng/lttng-tools" - -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=40ef17463fbd6f377db3c47b1cbaded8 \ - file://LICENSES/GPL-2.0;md5=e68f69a54b44ba526ad7cb963e18fbce \ - file://LICENSES/LGPL-2.1;md5=9920968d0f2ff585ce61fae30344dd95" - -include lttng-platforms.inc - -DEPENDS = "liburcu popt libxml2 util-linux bison-native" -RDEPENDS:${PN} = "libgcc" -RRECOMMENDS:${PN} += "${LTTNGMODULES}" -RDEPENDS:${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core grep binutils" -RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils" -RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils" -# babelstats.pl wants getopt-long -RDEPENDS:${PN}-ptest += "perl-module-getopt-long" - -PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \ - am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \ - PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ -" -PACKAGECONFIG ??= "${LTTNGUST} kmod" -PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native" -PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust" -PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod" -PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" - -SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ - file://0001-tests-do-not-strip-a-helper-library.patch \ - file://run-ptest \ - file://lttng-sessiond.service \ - file://disable-tests.patch \ - file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \ - file://40b2a4a793c81221a28f822d07135069456ea021.patch \ - file://gcc13-ptest-fix.patch \ - " - -SRC_URI[sha256sum] = "8d94dc95b608cf70216b01203a3f8242b97a232db2e23421a2f43708da08f337" - -inherit autotools ptest pkgconfig useradd python3-dir manpages systemd - -CACHED_CONFIGUREVARS = "PGREP=/usr/bin/pgrep" - -SYSTEMD_SERVICE:${PN} = "lttng-sessiond.service" -SYSTEMD_AUTO_ENABLE = "disable" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM:${PN} = "tracing" - -FILES:${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \ - ${PYTHON_SITEPACKAGES_DIR}/*" -FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" -FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" - -# Since files are installed into ${libdir}/lttng/libexec we match -# the libexec insane test so skip it. -# Python module needs to keep _lttng.so -INSANE_SKIP:${PN} = "libexec dev-so" -INSANE_SKIP:${PN}-dbg = "libexec" - -PRIVATE_LIBS:${PN}-ptest = "libfoo.so" - -do_install:append () { - # install systemd unit file - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_system_unitdir} -} - -do_install_ptest () { - for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/*.lttng \ - tests/regression/tools/save-load/configuration/load-42*.lttng tests/regression/tools/health/test_health.sh \ - tests/regression/tools/metadata/utils.sh tests/regression/tools/rotation/rotate_utils.sh \ - tests/regression/tools/notification/util_event_generator.sh \ - tests/regression/tools/base-path/*.lttng; do - install -D "${B}/$f" "${D}${PTEST_PATH}/$f" - done - - for f in tests/utils/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-4.1.xsd; do - install -D "${S}/$f" "${D}${PTEST_PATH}/$f" - done - - # Patch in the correct path for the custom libraries a helper executable needs - sed -i -e 's!FIXMEPTESTPATH!${PTEST_PATH}!g' "${D}${PTEST_PATH}/run-ptest" - - # Prevent 'make check' from recursing into non-test subdirectories. - sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile" - - # We don't need these - sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile" - - # We shouldn't need to build anything in tests/utils - sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \ - "${D}${PTEST_PATH}/tests/Makefile" - - # Copy the tests directory tree and the executables and - # Makefiles found within. - for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do - install -d "${D}${PTEST_PATH}/tests/$d" - find "${B}/tests/$d" -maxdepth 1 -executable -type f \ - -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + - # Take all .py scripts for tests using the python bindings. - find "${B}/tests/$d" -maxdepth 1 -type f -name "*.py" \ - -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + - test -r "${B}/tests/$d/Makefile" && \ - install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile" - done - - for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do - for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do - cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f - case $f in - *.so|userspace-probe-elf-*) - install -d ${D}${PTEST_PATH}/tests/$d/ - ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f - # Remove any rpath/runpath to pass QA check. - chrpath --delete ${D}${PTEST_PATH}/tests/$d/$f - ;; - esac - done - done - - chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary - chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary - chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libbar.so - chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libfoo.so - - # - # Use the versioned libs of liblttng-ust-dl. - # - ustdl="${D}${PTEST_PATH}/tests/regression/ust/ust-dl/test_ust-dl.py" - if [ -e $ustdl ]; then - sed -i -e 's!:liblttng-ust-dl.so!:liblttng-ust-dl.so.0!' $ustdl - fi - - install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/ - - # We shouldn't need to build anything in tests/regression/tools - sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \ - "${D}${PTEST_PATH}/tests/regression/Makefile" - - # Prevent attempts to update Makefiles during test runs, and - # silence "Making check in $SUBDIR" messages. - find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ - sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \ - -e '/echo "Making $$target in $$subdir"; \\/d' \ - -e 's/^srcdir = \(.*\)/srcdir = ./' \ - -e 's/^builddir = \(.*\)/builddir = ./' \ - -e 's/^all-am:.*/all-am:/' \ - {} + - - find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ - touch -r "${B}/Makefile" {} + - - # - # Need to stop generated binaries from rebuilding by removing their source dependencies - # - sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \ - -e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \ - -e 's#\(^test.*SOURCES.=\)#disable\1#g' \ - -e 's#\(^test.*LDADD.=\)#disable\1#g' \ - -i ${D}${PTEST_PATH}/tests/unit/Makefile - - # Fix hardcoded build path - sed -e 's#TESTAPP_PATH=.*/tests/regression/#TESTAPP_PATH="${PTEST_PATH}/tests/regression/#' \ - -i ${D}${PTEST_PATH}/tests/regression/ust/python-logging/test_python_logging - - # Substitute links to installed binaries. - for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd lttng-crash; do - exedir="${D}${PTEST_PATH}/src/bin/${prog}" - install -d "$exedir" - case "$prog" in - lttng-consumerd) - ln -s "${libdir}/lttng/libexec/$prog" "$exedir" - ;; - *) - ln -s "${bindir}/$prog" "$exedir" - ;; - esac - done -} - -INHIBIT_PACKAGE_STRIP_FILES = "\ - ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary \ - ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/.libs/userspace-probe-elf-binary \ - ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary \ - ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/.libs/userspace-probe-elf-cxx-binary \ - ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/gen-syscall-events \ - ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/.libs/gen-syscall-events \ - ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack \ - ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/.libs/gen-syscall-events-callstack \ - " -- cgit v1.2.3-54-g00ecf