<div dir="ltr">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).<div>(I don&#39;t remember the exact filename in oe-core where the lists are defined but you can easily grep for it)</div><div><br></div><div>Alex</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 18 Feb 2020 at 14:26, Anders Wallin &lt;<a href="mailto:wallinux@gmail.com">wallinux@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Signed-off-by: Anders Wallin &lt;<a href="mailto:wallinux@gmail.com" target="_blank">wallinux@gmail.com</a>&gt;<br>
---<br>
 ...001-test_plugin-do-not-test-in-.libs.patch | 24 +++++++<br>
 .../lttng/babeltrace2/run-ptest               |  9 +++<br>
 .../recipes-kernel/lttng/<a href="http://babeltrace2_2.0.1.bb" rel="noreferrer" target="_blank">babeltrace2_2.0.1.bb</a> | 70 ++++++++++++++++++-<br>
 3 files changed, 101 insertions(+), 2 deletions(-)<br>
 create mode 100644 meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch<br>
 create mode 100755 meta/recipes-kernel/lttng/babeltrace2/run-ptest<br>
<br>
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<br>
new file mode 100644<br>
index 0000000000..d1dbabab44<br>
--- /dev/null<br>
+++ b/meta/recipes-kernel/lttng/babeltrace2/0001-test_plugin-do-not-test-in-.libs.patch<br>
@@ -0,0 +1,24 @@<br>
+From 49edc1efa64d7597f492c78b2b7c4b115c0a0ef7 Mon Sep 17 00:00:00 2001<br>
+Message-Id: &lt;<a href="mailto:49edc1efa64d7597f492c78b2b7c4b115c0a0ef7.1581587378.git.anders.wallin@windriver.com" target="_blank">49edc1efa64d7597f492c78b2b7c4b115c0a0ef7.1581587378.git.anders.wallin@windriver.com</a>&gt;<br>
+From: Anders Wallin &lt;<a href="mailto:anders.wallin@windriver.com" target="_blank">anders.wallin@windriver.com</a>&gt;<br>
+Date: Thu, 13 Feb 2020 10:49:28 +0100<br>
+Subject: [PATCH] test_plugin: do not test in .libs<br>
+<br>
+Signed-off-by: Anders Wallin &lt;<a href="mailto:anders.wallin@windriver.com" target="_blank">anders.wallin@windriver.com</a>&gt;<br>
+---<br>
+ tests/lib/test_plugin | 2 +-<br>
+ 1 file changed, 1 insertion(+), 1 deletion(-)<br>
+<br>
+diff --git a/tests/lib/test_plugin b/tests/lib/test_plugin<br>
+index 652c90cc..1f817c50 100755<br>
+--- a/tests/lib/test_plugin<br>
++++ b/tests/lib/test_plugin<br>
+@@ -26,4 +26,4 @@ fi<br>
+ # shellcheck source=../utils/utils.sh<br>
+ source &quot;$UTILSSH&quot;<br>
+ <br>
+-&quot;${BT_TESTS_BUILDDIR}/lib/plugin&quot; &quot;${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins/.libs&quot;<br>
++&quot;${BT_TESTS_BUILDDIR}/lib/plugin&quot; &quot;${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins&quot;<br>
+-- <br>
+2.25.0<br>
+<br>
diff --git a/meta/recipes-kernel/lttng/babeltrace2/run-ptest b/meta/recipes-kernel/lttng/babeltrace2/run-ptest<br>
new file mode 100755<br>
index 0000000000..72fe223436<br>
--- /dev/null<br>
+++ b/meta/recipes-kernel/lttng/babeltrace2/run-ptest<br>
@@ -0,0 +1,9 @@<br>
+#!/bin/sh<br>
+# use target=recheck if you want to recheck failing tests<br>
+[ &quot;$target&quot; = &quot;&quot; ] &amp;&amp; target=check<br>
+<br>
+# Without --ignore-exit, the tap harness causes any FAILs within a<br>
+# test plan to raise ERRORs; this is just noise.<br>
+makeargs=&quot;LOG_DRIVER_FLAGS=--ignore-exit abs_top_srcdir=$PWD abs_top_builddir=$PWD GREP=grep SED=sed PYTHON=python3&quot;<br>
+<br>
+exec make -C tests -k -s $makeargs $target 2&gt;/dev/null<br>
diff --git a/meta/recipes-kernel/lttng/<a href="http://babeltrace2_2.0.1.bb" rel="noreferrer" target="_blank">babeltrace2_2.0.1.bb</a> b/meta/recipes-kernel/lttng/<a href="http://babeltrace2_2.0.1.bb" rel="noreferrer" target="_blank">babeltrace2_2.0.1.bb</a><br>
index d49a96faff..43748b760a 100644<br>
--- a/meta/recipes-kernel/lttng/<a href="http://babeltrace2_2.0.1.bb" rel="noreferrer" target="_blank">babeltrace2_2.0.1.bb</a><br>
+++ b/meta/recipes-kernel/lttng/<a href="http://babeltrace2_2.0.1.bb" rel="noreferrer" target="_blank">babeltrace2_2.0.1.bb</a><br>
@@ -7,13 +7,16 @@ LIC_FILES_CHKSUM = &quot;file://LICENSE;md5=a6a458c13f18385b7bc5069a6d7b176e&quot;<br>
<br>
 DEPENDS = &quot;glib-2.0 util-linux popt bison-native flex-native&quot;<br>
<br>
-SRC_URI = &quot;git://<a href="http://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-2.0" rel="noreferrer" target="_blank">git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-2.0</a>&quot;<br>
+SRC_URI = &quot;git://<a href="http://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-2.0" rel="noreferrer" target="_blank">git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-2.0</a> \<br>
+          file://run-ptest \<br>
+          file://0001-test_plugin-do-not-test-in-.libs.patch \<br>
+         &quot;<br>
 SRCREV = &quot;06df58f89ee51b1a2c6a2c187ec3f15691633910&quot;<br>
 UPSTREAM_CHECK_GITTAGREGEX = &quot;v(?P&lt;pver&gt;\d+(\.\d+)+)$&quot;<br>
<br>
 S = &quot;${WORKDIR}/git&quot;<br>
<br>
-inherit autotools pkgconfig<br>
+inherit autotools pkgconfig ptest<br>
<br>
 EXTRA_OECONF = &quot;--disable-debug-info&quot;<br>
<br>
@@ -24,3 +27,66 @@ FILES_${PN}-staticdev += &quot;${libdir}/babeltrace2/plugins/*.a&quot;<br>
 FILES_${PN} += &quot;${libdir}/babeltrace2/plugins/*.so&quot;<br>
<br>
 ASNEEDED = &quot;&quot;<br>
+<br>
+RDEPENDS_${PN}-ptest += &quot;bash gawk python3&quot;<br>
+<br>
+do_compile_ptest () {<br>
+    make -C tests all<br>
+}<br>
+<br>
+do_install_ptest () {<br>
+    install -d &quot;${D}${PTEST_PATH}/tests&quot;<br>
+<br>
+    # Copy required files from source directory<br>
+    for d in $(find &quot;${S}/tests&quot; -type d -printf &#39;%P &#39;) ; do<br>
+       install -d &quot;${D}${PTEST_PATH}/tests/$d&quot;<br>
+       find &quot;${S}/tests/$d&quot; -maxdepth 1 -executable -type f \<br>
+            -exec install -t &quot;${D}${PTEST_PATH}/tests/$d&quot; {} +<br>
+       find &quot;${S}/tests/$d&quot; -maxdepth 1 -name *.sh \<br>
+            -exec install -t &quot;${D}${PTEST_PATH}/tests/$d&quot; {} \;<br>
+       find &quot;${S}/tests/$d&quot; -maxdepth 1 -name *.py \<br>
+            -exec install -t &quot;${D}${PTEST_PATH}/tests/$d&quot; {} \;<br>
+       find &quot;${S}/tests/$d&quot; -maxdepth 1 -name *.expect \<br>
+            -exec install -t &quot;${D}${PTEST_PATH}/tests/$d&quot; {} \;<br>
+    done<br>
+    install -d &quot;${D}${PTEST_PATH}/tests/data/ctf-traces/&quot;<br>
+    cp -a ${S}/tests/data/ctf-traces/* ${D}${PTEST_PATH}/tests/data/ctf-traces/<br>
+<br>
+    # Copy the tests directory tree and the executables and<br>
+    # Makefiles found within.<br>
+    install -D &quot;${B}/tests/Makefile&quot; &quot;${D}${PTEST_PATH}/tests/&quot;<br>
+    for d in $(find &quot;${B}/tests&quot; -type d -not -name .libs -printf &#39;%P &#39;) ; do<br>
+       install -d &quot;${D}${PTEST_PATH}/tests/$d&quot;<br>
+       find &quot;${B}/tests/$d&quot; -maxdepth 1 -executable -type f \<br>
+            -exec install -t &quot;${D}${PTEST_PATH}/tests/$d&quot; {} +<br>
+       test -r &quot;${B}/tests/$d/Makefile&quot; &amp;&amp; \<br>
+           install -t &quot;${D}${PTEST_PATH}/tests/$d&quot; &quot;${B}/tests/$d/Makefile&quot;<br>
+       find &quot;${B}/tests/$d&quot; -maxdepth 1 -name *.sh \<br>
+            -exec install -t &quot;${D}${PTEST_PATH}/tests/$d&quot; {} \;<br>
+    done<br>
+<br>
+    for d in $(find &quot;${B}/tests&quot; -type d -name .libs -printf &#39;%P &#39;) ; do<br>
+       for f in $(find &quot;${B}/tests/$d&quot; -maxdepth 1 -executable -type f -printf &#39;%P &#39;) ; do<br>
+           cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f<br>
+       done<br>
+    done<br>
+<br>
+    # Prevent attempts to update Makefiles during test runs, and<br>
+    # silence &quot;Making check in $SUBDIR&quot; messages.<br>
+    find &quot;${D}${PTEST_PATH}&quot; -name Makefile -type f -exec \<br>
+        sed -i \<br>
+        -e &#39;/Makefile:/,/^$/d&#39; \<br>
+        -e &#39;/%: %.in/,/^$/d&#39; \<br>
+        -e &#39;/echo &quot;Making $$target in $$subdir&quot;; \\/d&#39; \<br>
+        -e &#39;s/^srcdir = \(.*\)/srcdir = ./&#39; \<br>
+        -e &#39;s/^builddir = \(.*\)/builddir = ./&#39; \<br>
+        -e &#39;s/^all-am:.*/all-am:/&#39; \<br>
+        {} +<br>
+<br>
+    # Substitute links to installed binaries.<br>
+    install -d &quot;${D}${PTEST_PATH}/src/cli/&quot;<br>
+    ln -s &quot;${bindir}/babeltrace2&quot; ${D}${PTEST_PATH}/src/cli/<br>
+<br>
+    # Remove architechture specific testfiles<br>
+    rm -rf ${D}${PTEST_PATH}/tests/data/plugins/flt.lttng-utils.debug-info/*<br>
+}<br>
-- <br>
2.25.0<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>