babeltrace2: added ptest
PATCH 1/1 babeltrace2: added ptest
--- ...001-test_plugin-do-not-test-in-.libs.patch | 24 +++++++ .../lttng/babeltrace2/run-ptest | 9 +++ .../recipes-kernel/lttng/babeltrace2_2.0.1.bb | 70 ++++++++++++++++++- 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch create mode 100755 meta/recipes-kernel/lttng/babeltrace2/run-ptest
meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch new file +24 -0
@@ -0,0 +1,24 @@ +From 49edc1efa64d7597f492c78b2b7c4b115c0a0ef7 Mon Sep 17 00:00:00 2001 +Message-Id: <49edc1efa64d7597f492c78b2b7c4b115c0a0ef7.1581587378.git.anders.wallin@windriver.com> +From: Anders Wallin <[email protected]> +Date: Thu, 13 Feb 2020 10:49:28 +0100 +Subject: [PATCH] test_plugin: do not test in .libs + +Signed-off-by: Anders Wallin <[email protected]> +--- + tests/lib/test_plugin | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/lib/test_plugin b/tests/lib/test_plugin +index 652c90cc..1f817c50 100755 +--- a/tests/lib/test_plugin ++++ b/tests/lib/test_plugin +@@ -26,4 +26,4 @@ fi + # shellcheck source=../utils/utils.sh + source "$UTILSSH" + +-"${BT_TESTS_BUILDDIR}/lib/plugin" "${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins/.libs" ++"${BT_TESTS_BUILDDIR}/lib/plugin" "${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins" +-- +2.25.0 +
meta/recipes-kernel/lttng/babeltrace2/run-ptest new file +9 -0
@@ -0,0 +1,9 @@ +#!/bin/sh +# use target=recheck if you want to recheck failing tests +[ "$target" = "" ] && target=check + +# Without --ignore-exit, the tap harness causes any FAILs within a +# test plan to raise ERRORs; this is just noise. +makeargs="LOG_DRIVER_FLAGS=--ignore-exit abs_top_srcdir=$PWD abs_top_builddir=$PWD GREP=grep SED=sed PYTHON=python3" + +exec make -C tests -k -s $makeargs $target 2>/dev/null
meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb +68 -2
84 lines not on this page · raw message
Signature · 1 line
2.25.0
✗ patchtest: failure for babeltrace2: added ptest
== Series Details ==
Series: babeltrace2: added ptest
Revision: 1
URL : https://patchwork.openembedded.org/series/22727/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at c9b5802bbe)
* Issue Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format]
Suggested fix Add Upstream-Status: <Valid status> to the header of meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch Standard format Upstream-Status: <Valid status> Valid status Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
You need to at the same time add the ptest package to PTESTS_FAST or PTESTS_SLOW (depending on whether tests takes less or more than 30 seconds to complete).
(I don't remember the exact filename in oe-core where the lists are defined but you can easily grep for it)
Alex
Quoted 173 lines · Anders Wallin
Signed-off-by Anders Wallin <[email protected]>--- ...001-test_plugin-do-not-test-in-.libs.patch | 24 +++++++ .../lttng/babeltrace2/run-ptest | 9 +++ .../recipes-kernel/lttng/babeltrace2_2.0.1.bb | 70 ++++++++++++++++++- 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch create mode 100755 meta/recipes-kernel/lttng/babeltrace2/run-ptestdiff --git
a/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patchb/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patchnew file mode 100644
index 0000000000..d1dbabab44
---/dev/null
+++b/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch(quoted diff) +2
-0@@ -0,0 +1,24 @@ +From 49edc1efa64d7597f492c78b2b7c4b115c0a0ef7 Mon Sep 17 00:00:00 2001 +Message-Id: <49edc1efa64d7597f492c78b2b7c4b115c0a0ef7.1581587378.git.anders.wallin@windriver.com
Quoted 1 line
meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch new file +18
-0+From: Anders Wallin <[email protected]> +Date: Thu, 13 Feb 2020 10:49:28 +0100 +Subject: [PATCH] test_plugin: do not test in .libs + +Signed-off-by: Anders Wallin <[email protected]> +--- + tests/lib/test_plugin | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/lib/test_plugin b/tests/lib/test_plugin +index 652c90cc..1f817c50 100755 +--- a/tests/lib/test_plugin ++++ b/tests/lib/test_plugin +@@ -26,4 +26,4 @@ fi + # shellcheck source=../utils/utils.sh + source "$UTILSSH" + +-"${BT_TESTS_BUILDDIR}/lib/plugin""${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins/.libs" ++"${BT_TESTS_BUILDDIR}/lib/plugin" "${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins"
+--
+2.25.0(quoted diff) +1
-0+meta/recipes-kernel/lttng/babeltrace2/run-ptest new file +7
-0@@ -0,0 +1,9 @@ +#!/bin/sh +# use target=recheck if you want to recheck failing tests +[ "$target" = "" ] && target=check + +# Without --ignore-exit, the tap harness causes any FAILs within a +# test plan to raise ERRORs; this is just noise. +makeargs="LOG_DRIVER_FLAGS=--ignore-exit abs_top_srcdir=$PWDabs_top_builddir=$PWD GREP=grep SED=sed PYTHON=python3"
meta/recipes-kernel/lttng/babeltrace2/run-ptest new file +2
-0+ +exec make -C tests -k -s $makeargs $target 2>/dev/nullmeta/recipes-kernel/lttng/babeltrace2_2.0.1.bb +0
-0@@ -7,13 +7,16 @@ LIC_FILES_CHKSUM ="file://LICENSE;md5=a6a458c13f18385b7bc5069a6d7b176e"
DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-SRC_URI = "
git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-2.0" +SRC_URI = "git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-2.0 \meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb +4
-1+ file://run-ptest \ + file://0001-test_plugin-do-not-test-in-.libs.patch \ + " SRCREV = "06df58f89ee51b1a2c6a2c187ec3f15691633910" UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)$" S = "${WORKDIR}/git" -inherit autotools pkgconfig +inherit autotools pkgconfig ptest EXTRA_OECONF = "--disable-debug-info"@@ -24,3 +27,66 @@ FILES_${PN}-staticdev +="${libdir}/babeltrace2/plugins/*.a"
FILES_${PN} += "${libdir}/babeltrace2/plugins/*.so"ASNEEDED = ""
meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb +24
-0+ +RDEPENDS_${PN}-ptest += "bash gawk python3" + +do_compile_ptest () { + make -C tests all +} + +do_install_ptest () { + install -d "${D}${PTEST_PATH}/tests" + + # Copy required files from source directory + for d in $(find "${S}/tests" -type d -printf '%P ') ; do + install -d "${D}${PTEST_PATH}/tests/$d" + find "${S}/tests/$d" -maxdepth 1 -executable -type f \ + -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + + find "${S}/tests/$d" -maxdepth 1 -name *.sh \ + -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; + find "${S}/tests/$d" -maxdepth 1 -name *.py \ + -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; + find "${S}/tests/$d" -maxdepth 1 -name *.expect \ + -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; + done + install -d "${D}${PTEST_PATH}/tests/data/ctf-traces/" + cp -a ${S}/tests/data/ctf-traces/*${D}${PTEST_PATH}/tests/data/ctf-traces/
meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb +5
-0+ + # Copy the tests directory tree and the executables and + # Makefiles found within. + install -D "${B}/tests/Makefile" "${D}${PTEST_PATH}/tests/" + for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P '); do
meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb +5
-0+ install -d "${D}${PTEST_PATH}/tests/$d" + find "${B}/tests/$d" -maxdepth 1 -executable -type f \ + -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"
meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb +28
-1+ find "${B}/tests/$d" -maxdepth 1 -name *.sh \ + -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; + 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 + done + done + + # 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:/' \ + {} + + + # Substitute links to installed binaries. + install -d "${D}${PTEST_PATH}/src/cli/" + ln -s "${bindir}/babeltrace2" ${D}${PTEST_PATH}/src/cli/ + + # Remove architechture specific testfiles + rm -rf${D}${PTEST_PATH}/tests/data/plugins/flt.lttng-utils.debug-info/* +}
--
2.25.0--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core