* [PATCH] babeltrace2: added ptest
@ 2020-02-18 13:26 Anders Wallin
2020-02-18 13:32 ` ✗ patchtest: failure for " Patchwork
2020-02-18 13:58 ` [PATCH] " Alexander Kanavin
0 siblings, 2 replies; 3+ messages in thread
From: Anders Wallin @ 2020-02-18 13:26 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Anders Wallin <wallinux@gmail.com>
---
...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
diff --git a/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch b/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch
new file mode 100644
index 0000000000..d1dbabab44
--- /dev/null
+++ b/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch
@@ -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 <anders.wallin@windriver.com>
+Date: Thu, 13 Feb 2020 10:49:28 +0100
+Subject: [PATCH] test_plugin: do not test in .libs
+
+Signed-off-by: Anders Wallin <anders.wallin@windriver.com>
+---
+ 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
+
diff --git a/meta/recipes-kernel/lttng/babeltrace2/run-ptest b/meta/recipes-kernel/lttng/babeltrace2/run-ptest
new file mode 100755
index 0000000000..72fe223436
--- /dev/null
+++ b/meta/recipes-kernel/lttng/babeltrace2/run-ptest
@@ -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
diff --git a/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb b/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
index d49a96faff..43748b760a 100644
--- a/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
+++ b/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
@@ -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 \
+ 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 = ""
+
+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/
+
+ # 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
+ 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"
+ 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✗ patchtest: failure for babeltrace2: added ptest
2020-02-18 13:26 [PATCH] babeltrace2: added ptest Anders Wallin
@ 2020-02-18 13:32 ` Patchwork
2020-02-18 13:58 ` [PATCH] " Alexander Kanavin
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2020-02-18 13:32 UTC (permalink / raw)
To: Anders Wallin; +Cc: openembedded-core
== 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 (openembedded-core@lists.openembedded.org) 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] babeltrace2: added ptest
2020-02-18 13:26 [PATCH] babeltrace2: added ptest Anders Wallin
2020-02-18 13:32 ` ✗ patchtest: failure for " Patchwork
@ 2020-02-18 13:58 ` Alexander Kanavin
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Kanavin @ 2020-02-18 13:58 UTC (permalink / raw)
To: Anders Wallin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 7128 bytes --]
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
On Tue, 18 Feb 2020 at 14:26, Anders Wallin <wallinux@gmail.com> wrote:
> Signed-off-by: Anders Wallin <wallinux@gmail.com>
> ---
> ...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
>
> diff --git
> a/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch
> b/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch
> new file mode 100644
> index 0000000000..d1dbabab44
> --- /dev/null
> +++
> b/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch
> @@ -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 <anders.wallin@windriver.com>
> +Date: Thu, 13 Feb 2020 10:49:28 +0100
> +Subject: [PATCH] test_plugin: do not test in .libs
> +
> +Signed-off-by: Anders Wallin <anders.wallin@windriver.com>
> +---
> + 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
> +
> diff --git a/meta/recipes-kernel/lttng/babeltrace2/run-ptest
> b/meta/recipes-kernel/lttng/babeltrace2/run-ptest
> new file mode 100755
> index 0000000000..72fe223436
> --- /dev/null
> +++ b/meta/recipes-kernel/lttng/babeltrace2/run-ptest
> @@ -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
> diff --git a/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
> b/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
> index d49a96faff..43748b760a 100644
> --- a/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
> +++ b/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb
> @@ -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 \
> + 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 = ""
> +
> +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/
> +
> + # 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
> + 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"
> + 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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 9668 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-18 13:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-18 13:26 [PATCH] babeltrace2: added ptest Anders Wallin
2020-02-18 13:32 ` ✗ patchtest: failure for " Patchwork
2020-02-18 13:58 ` [PATCH] " Alexander Kanavin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox