summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/inotify-tools/files/run-ptest21
-rw-r--r--meta-oe/recipes-support/inotify-tools/inotify-tools_4.25.9.0.bb16
2 files changed, 36 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/inotify-tools/files/run-ptest b/meta-oe/recipes-support/inotify-tools/files/run-ptest
new file mode 100644
index 0000000000..f3b23d86f0
--- /dev/null
+++ b/meta-oe/recipes-support/inotify-tools/files/run-ptest
@@ -0,0 +1,21 @@
1#!/bin/sh
2# run-ptest for inotify-tools
3
4set -e
5
6# Run the test binary and capture output
7output=$(./test)
8
9# Print the output for logging
10echo "$output"
11
12# Extract the summary line
13summary=$(echo "$output" | tail -n 1)
14
15# Check if any tests failed
16if echo "$summary" | grep -q "0 failed"; then
17 exit 0
18else
19 echo "Some tests failed!"
20 exit 1
21fi
diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools_4.25.9.0.bb b/meta-oe/recipes-support/inotify-tools/inotify-tools_4.25.9.0.bb
index a107925ce1..a03b835641 100644
--- a/meta-oe/recipes-support/inotify-tools/inotify-tools_4.25.9.0.bb
+++ b/meta-oe/recipes-support/inotify-tools/inotify-tools_4.25.9.0.bb
@@ -7,10 +7,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ac6c26e52aea428ee7f56dc2c56424c6"
7SRCREV = "81c6c9881edf4844f2b8250e63f82da9cb7f5444" 7SRCREV = "81c6c9881edf4844f2b8250e63f82da9cb7f5444"
8 8
9SRC_URI = "git://github.com/${BPN}/${BPN};branch=master;protocol=https \ 9SRC_URI = "git://github.com/${BPN}/${BPN};branch=master;protocol=https \
10 file://run-ptest \
10 " 11 "
11 12
12 13
13inherit autotools 14inherit autotools ptest
14 15
15EXTRA_OECONF = "--disable-doxygen" 16EXTRA_OECONF = "--disable-doxygen"
16 17
@@ -21,3 +22,16 @@ CFLAGS += "-Wno-error"
21PACKAGES =+ "libinotifytools" 22PACKAGES =+ "libinotifytools"
22 23
23FILES:libinotifytools = "${libdir}/lib*.so.*" 24FILES:libinotifytools = "${libdir}/lib*.so.*"
25
26do_compile_ptest() {
27 cd libinotifytools/src
28 oe_runmake
29 oe_runmake test
30}
31
32do_install_ptest() {
33 install -d ${D}${PTEST_PATH}
34 cp -r ${B}/libinotifytools/src/.libs/test ${D}${PTEST_PATH}/
35}
36
37FILES:${PN}-ptest += "${PTEST_PATH}"