Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Babeltrace - Trace Format Babel Tower" |
| 2 | DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log." |
| 3 | HOMEPAGE = "http://babeltrace.org/" |
| 4 | BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 5 | LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-only" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa" |
| 7 | |
| 8 | DEPENDS = "glib-2.0 util-linux popt bison-native flex-native" |
| 9 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 10 | SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.5 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | file://run-ptest \ |
| 12 | " |
| 13 | SRCREV = "054a54ae10b01a271afc4f19496c041b10fb414c" |
| 14 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>1(\.\d+)+)$" |
| 15 | |
| 16 | S = "${WORKDIR}/git" |
| 17 | |
| 18 | inherit autotools pkgconfig ptest |
| 19 | |
| 20 | EXTRA_OECONF = "--disable-debug-info" |
| 21 | |
| 22 | ASNEEDED = "" |
| 23 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 24 | RDEPENDS:${PN}-ptest += "bash gawk" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | |
| 26 | addtask do_patch_ptest_path after do_patch before do_configure |
| 27 | do_patch_ptest_path () { |
| 28 | for f in $(grep -l -r abs_top_srcdir ${S}/tests); do |
| 29 | sed -i 's:\@abs_top_srcdir\@:${PTEST_PATH}:' ${f} |
| 30 | done |
| 31 | |
| 32 | for f in $(grep -l -r abs_top_builddir ${S}/tests); do |
| 33 | sed -i 's:\@abs_top_builddir\@:${PTEST_PATH}:' ${f} |
| 34 | done |
| 35 | for f in $(grep -l -r GREP ${S}/tests); do |
| 36 | sed -i 's:\@GREP\@:grep:' ${f} |
| 37 | done |
| 38 | |
| 39 | for f in $(grep -l -r SED ${S}/tests); do |
| 40 | sed -i 's:\@SED\@:sed:' ${f} |
| 41 | done |
| 42 | } |
| 43 | |
| 44 | do_compile_ptest () { |
| 45 | make -C tests all |
| 46 | } |
| 47 | |
| 48 | do_install_ptest () { |
| 49 | # Copy required files from source directory |
| 50 | for f in config/tap-driver.sh config/test-driver; do |
| 51 | install -D "${S}/$f" "${D}${PTEST_PATH}/$f" |
| 52 | done |
| 53 | install -d "$f" "${D}${PTEST_PATH}/tests/ctf-traces/" |
| 54 | cp -a ${S}/tests/ctf-traces/* ${D}${PTEST_PATH}/tests/ctf-traces/ |
| 55 | |
| 56 | # Copy the tests directory tree and the executables and |
| 57 | # Makefiles found within. |
| 58 | install -D "${B}/tests/Makefile" "${D}${PTEST_PATH}/tests/" |
| 59 | for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do |
| 60 | install -d "${D}${PTEST_PATH}/tests/$d" |
| 61 | find "${B}/tests/$d" -maxdepth 1 -executable -type f \ |
| 62 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + |
| 63 | test -r "${B}/tests/$d/Makefile" && \ |
| 64 | install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile" |
| 65 | find "${B}/tests/$d" -maxdepth 1 -name *.sh \ |
| 66 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; |
| 67 | done |
| 68 | |
| 69 | for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do |
| 70 | for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do |
| 71 | cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f |
| 72 | done |
| 73 | done |
| 74 | |
| 75 | install -D ${B}/formats/ctf/metadata/.libs/ctf-parser-test \ |
| 76 | ${D}${PTEST_PATH}/formats/ctf/metadata/ctf-parser-test |
| 77 | |
| 78 | # Prevent attempts to update Makefiles during test runs, and |
| 79 | # silence "Making check in $SUBDIR" messages. |
| 80 | find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ |
| 81 | sed -i \ |
| 82 | -e '/Makefile:/,/^$/d' \ |
| 83 | -e '/$(check_SCRIPTS)/s/^/#/' \ |
| 84 | -e '/%: %.in/,/^$/d' \ |
| 85 | -e '/echo "Making $$target in $$subdir"; \\/d' \ |
| 86 | -e 's/^srcdir = \(.*\)/srcdir = ./' \ |
| 87 | -e 's/^builddir = \(.*\)/builddir = ./' \ |
| 88 | -e 's/^all-am:.*/all-am:/' \ |
| 89 | {} + |
| 90 | |
| 91 | # Remove path to babeltrace. |
| 92 | for f in $(grep -l -r "^BABELTRACE_BIN" ${D}${PTEST_PATH}); do |
| 93 | sed -i 's:^BABELTRACE_BIN.*:BABELTRACE_BIN=/usr/bin/babeltrace:' ${f} |
| 94 | done |
| 95 | for f in $(grep -l -r "^BTBIN" ${D}${PTEST_PATH}); do |
| 96 | sed -i 's:^BTBIN.*:BTBIN=/usr/bin/babeltrace:' ${f} |
| 97 | done |
| 98 | } |