summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikhil R <nikhil.r@bmwtechworks.in>2025-10-24 15:46:46 +0530
committerKhem Raj <raj.khem@gmail.com>2025-10-24 09:06:24 -0700
commit66ed465cc19a00f7fe8d95ef68c24d8ced71f040 (patch)
tree75074d5003fa1c48308db88cacd8d47bc2b55a8a
parentf8c9aa83e70ee9084b44dd58cf994d1849714b2d (diff)
downloadmeta-openembedded-66ed465cc19a00f7fe8d95ef68c24d8ced71f040.tar.gz
inotify-tools: add ptest support for inotify-tools
Add ptest support for inotify-tools by introducing a run-ptest script. The ptest verifies the correct functioning of inotify event handling and related utilities. Test coverage includes: - File creation, modification, and deletion event monitoring - Event handling and command-line option parsing - Basic consistency and behavior of inotify event queues The ptest completes in under 20 seconds Signed-off-by: Nikhil R <nikhil.r@bmwtechworks.in> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-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}"