* [OE-core][master][PATCH -v2] libpcre2: Enabling Ptest support
@ 2026-03-19 18:14 Shaik Moin
2026-03-19 18:16 ` Shaik Moin
0 siblings, 1 reply; 3+ messages in thread
From: Shaik Moin @ 2026-03-19 18:14 UTC (permalink / raw)
To: openembedded-core; +Cc: careers.myinfo
Install libpcre2 test suite and run it as ptest.
Add tests for POSIX wrapper (pcre2posix_test), core PCRE2 engine (RunTest), and grep utility (RunGrepTest).
pcre2posix_test: Verifies the POSIX wrapper API
RunTest: Executes the core PCRE2 test suite through pcre2test
RunGrepTest: Checks pcre2grep to ensure its grepping style matching works as expected with various patterns and input files.
Signed-off-by: Shaik Moin <moins@kpit.com>
---
.../libpcre/libpcre2/run-ptest | 32 +++++++++++++++++++
.../recipes-support/libpcre/libpcre2_10.47.bb | 18 +++++++++--
2 files changed, 48 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-support/libpcre/libpcre2/run-ptest
diff --git a/meta/recipes-support/libpcre/libpcre2/run-ptest b/meta/recipes-support/libpcre/libpcre2/run-ptest
new file mode 100644
index 0000000000..2acfd17b17
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre2/run-ptest
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+TESTS="RunGrepTest RunTest"
+total=0
+pass=0
+fail=0
+
+for T in $TESTS; do
+ if [ -x "./$T" ]; then
+ echo "Running $T"
+ total=$((total + 1))
+ if "./$T"; then
+ echo "PASS: $T"
+ pass=$((pass + 1))
+ else
+ echo "FAIL: $T"
+ fail=$((fail + 1))
+ fi
+ else
+ echo "SKIP: $T (not found or not executable)"
+ fi
+done
+
+# Summary
+echo "============================================================================"
+echo "# TOTAL: $total"
+echo "# PASS: $pass"
+echo "# FAIL: $fail"
+echo "============================================================================"
+
+# Exit code based on failures
+[ "$fail" -eq 0 ] && exit 0 || exit 1
diff --git a/meta/recipes-support/libpcre/libpcre2_10.47.bb b/meta/recipes-support/libpcre/libpcre2_10.47.bb
index 217a60aae9..70079e0b65 100644
--- a/meta/recipes-support/libpcre/libpcre2_10.47.bb
+++ b/meta/recipes-support/libpcre/libpcre2_10.47.bb
@@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://LICENCE.md;md5=6720bf3bcff57543b915c2b22e526df0 \
file://deps/sljit/LICENSE;md5=97268427d235c41c0be238ce8e5fda17 \
"
-SRC_URI = "${GITHUB_BASE_URI}/download/pcre2-${PV}/pcre2-${PV}.tar.bz2"
+SRC_URI = "${GITHUB_BASE_URI}/download/pcre2-${PV}/pcre2-${PV}.tar.bz2 \
+ file://run-ptest \
+"
GITHUB_BASE_URI = "https://github.com/PCRE2Project/pcre2/releases"
UPSTREAM_CHECK_REGEX = "releases/tag/pcre2-(?P<pver>\d+(\.\d+)+)$"
@@ -28,7 +30,7 @@ DEPENDS += "bzip2 zlib"
BINCONFIG = "${bindir}/pcre2-config"
-inherit autotools binconfig-disabled github-releases
+inherit autotools binconfig-disabled github-releases ptest
EXTRA_OECONF = "\
--enable-newline-is-lf \
@@ -57,3 +59,15 @@ FILES:pcre2test = "${bindir}/pcre2test"
FILES:pcre2test-doc = "${mandir}/man1/pcre2test.1"
BBCLASSEXTEND = "native nativesdk"
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ cp -r ${S}/testdata $t
+
+ for i in pcre2posix_test pcre2grep pcre2test; do
+ "${B}/libtool" --mode=install install "${B}/$i" "$t"
+ done
+ for i in RunTest RunGrepTest test-driver; \
+ do cp ${S}/$i $t; \
+ done
+}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core][master][PATCH -v2] libpcre2: Enabling Ptest support
2026-03-19 18:14 [OE-core][master][PATCH -v2] libpcre2: Enabling Ptest support Shaik Moin
@ 2026-03-19 18:16 ` Shaik Moin
0 siblings, 0 replies; 3+ messages in thread
From: Shaik Moin @ 2026-03-19 18:16 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 3475 bytes --]
Hi,
Please ignore the above patch
Regards,
Moin
On Thu, 19 Mar 2026, 11:45 pm Shaik Moin, <careers.myinfo@gmail.com> wrote:
> Install libpcre2 test suite and run it as ptest.
>
> Add tests for POSIX wrapper (pcre2posix_test), core PCRE2 engine
> (RunTest), and grep utility (RunGrepTest).
>
> pcre2posix_test: Verifies the POSIX wrapper API
> RunTest: Executes the core PCRE2 test suite through pcre2test
> RunGrepTest: Checks pcre2grep to ensure its grepping style matching works
> as expected with various patterns and input files.
>
> Signed-off-by: Shaik Moin <moins@kpit.com>
> ---
> .../libpcre/libpcre2/run-ptest | 32 +++++++++++++++++++
> .../recipes-support/libpcre/libpcre2_10.47.bb | 18 +++++++++--
> 2 files changed, 48 insertions(+), 2 deletions(-)
> create mode 100644 meta/recipes-support/libpcre/libpcre2/run-ptest
>
> diff --git a/meta/recipes-support/libpcre/libpcre2/run-ptest
> b/meta/recipes-support/libpcre/libpcre2/run-ptest
> new file mode 100644
> index 0000000000..2acfd17b17
> --- /dev/null
> +++ b/meta/recipes-support/libpcre/libpcre2/run-ptest
> @@ -0,0 +1,32 @@
> +#!/bin/sh
> +
> +TESTS="RunGrepTest RunTest"
> +total=0
> +pass=0
> +fail=0
> +
> +for T in $TESTS; do
> + if [ -x "./$T" ]; then
> + echo "Running $T"
> + total=$((total + 1))
> + if "./$T"; then
> + echo "PASS: $T"
> + pass=$((pass + 1))
> + else
> + echo "FAIL: $T"
> + fail=$((fail + 1))
> + fi
> + else
> + echo "SKIP: $T (not found or not executable)"
> + fi
> +done
> +
> +# Summary
> +echo
> "============================================================================"
> +echo "# TOTAL: $total"
> +echo "# PASS: $pass"
> +echo "# FAIL: $fail"
> +echo
> "============================================================================"
> +
> +# Exit code based on failures
> +[ "$fail" -eq 0 ] && exit 0 || exit 1
> diff --git a/meta/recipes-support/libpcre/libpcre2_10.47.bb
> b/meta/recipes-support/libpcre/libpcre2_10.47.bb
> index 217a60aae9..70079e0b65 100644
> --- a/meta/recipes-support/libpcre/libpcre2_10.47.bb
> +++ b/meta/recipes-support/libpcre/libpcre2_10.47.bb
> @@ -12,7 +12,9 @@ LIC_FILES_CHKSUM =
> "file://LICENCE.md;md5=6720bf3bcff57543b915c2b22e526df0 \
>
> file://deps/sljit/LICENSE;md5=97268427d235c41c0be238ce8e5fda17 \
> "
>
> -SRC_URI = "${GITHUB_BASE_URI}/download/pcre2-${PV}/pcre2-${PV}.tar.bz2"
> +SRC_URI = "${GITHUB_BASE_URI}/download/pcre2-${PV}/pcre2-${PV}.tar.bz2 \
> + file://run-ptest \
> +"
>
> GITHUB_BASE_URI = "https://github.com/PCRE2Project/pcre2/releases"
> UPSTREAM_CHECK_REGEX = "releases/tag/pcre2-(?P<pver>\d+(\.\d+)+)$"
> @@ -28,7 +30,7 @@ DEPENDS += "bzip2 zlib"
>
> BINCONFIG = "${bindir}/pcre2-config"
>
> -inherit autotools binconfig-disabled github-releases
> +inherit autotools binconfig-disabled github-releases ptest
>
> EXTRA_OECONF = "\
> --enable-newline-is-lf \
> @@ -57,3 +59,15 @@ FILES:pcre2test = "${bindir}/pcre2test"
> FILES:pcre2test-doc = "${mandir}/man1/pcre2test.1"
>
> BBCLASSEXTEND = "native nativesdk"
> +
> +do_install_ptest() {
> + t=${D}${PTEST_PATH}
> + cp -r ${S}/testdata $t
> +
> + for i in pcre2posix_test pcre2grep pcre2test; do
> + "${B}/libtool" --mode=install install "${B}/$i" "$t"
> + done
> + for i in RunTest RunGrepTest test-driver; \
> + do cp ${S}/$i $t; \
> + done
> +}
> --
> 2.34.1
>
>
[-- Attachment #2: Type: text/html, Size: 5151 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [OE-core][master][PATCH -v2] libpcre2: Enabling Ptest support
@ 2026-03-19 18:23 Shaik Moin
0 siblings, 0 replies; 3+ messages in thread
From: Shaik Moin @ 2026-03-19 18:23 UTC (permalink / raw)
To: openembedded-core; +Cc: careers.myinfo
Install libpcre2 test suite and run it as ptest.
Add tests for POSIX wrapper (pcre2posix_test), core PCRE2 engine (RunTest), and grep utility (RunGrepTest).
pcre2posix_test: Verifies the POSIX wrapper API
RunTest: Executes the core PCRE2 test suite through pcre2test
RunGrepTest: Checks pcre2grep to ensure its grepping style matching works as expected with various patterns and input files.
Signed-off-by: Shaik Moin <moins@kpit.com>
---
.../distro/include/ptest-packagelists.inc | 1 +
.../libpcre/libpcre2/run-ptest | 32 +++++++++++++++++++
.../recipes-support/libpcre/libpcre2_10.47.bb | 18 +++++++++--
3 files changed, 49 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-support/libpcre/libpcre2/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index d0c2c2816c..a2d7a56e79 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -39,6 +39,7 @@ PTESTS_FAST = "\
libmd \
libnl \
libpcre \
+ libpcre2 \
librsvg \
libsolv \
libssh2 \
diff --git a/meta/recipes-support/libpcre/libpcre2/run-ptest b/meta/recipes-support/libpcre/libpcre2/run-ptest
new file mode 100644
index 0000000000..2acfd17b17
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre2/run-ptest
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+TESTS="RunGrepTest RunTest"
+total=0
+pass=0
+fail=0
+
+for T in $TESTS; do
+ if [ -x "./$T" ]; then
+ echo "Running $T"
+ total=$((total + 1))
+ if "./$T"; then
+ echo "PASS: $T"
+ pass=$((pass + 1))
+ else
+ echo "FAIL: $T"
+ fail=$((fail + 1))
+ fi
+ else
+ echo "SKIP: $T (not found or not executable)"
+ fi
+done
+
+# Summary
+echo "============================================================================"
+echo "# TOTAL: $total"
+echo "# PASS: $pass"
+echo "# FAIL: $fail"
+echo "============================================================================"
+
+# Exit code based on failures
+[ "$fail" -eq 0 ] && exit 0 || exit 1
diff --git a/meta/recipes-support/libpcre/libpcre2_10.47.bb b/meta/recipes-support/libpcre/libpcre2_10.47.bb
index 217a60aae9..70079e0b65 100644
--- a/meta/recipes-support/libpcre/libpcre2_10.47.bb
+++ b/meta/recipes-support/libpcre/libpcre2_10.47.bb
@@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://LICENCE.md;md5=6720bf3bcff57543b915c2b22e526df0 \
file://deps/sljit/LICENSE;md5=97268427d235c41c0be238ce8e5fda17 \
"
-SRC_URI = "${GITHUB_BASE_URI}/download/pcre2-${PV}/pcre2-${PV}.tar.bz2"
+SRC_URI = "${GITHUB_BASE_URI}/download/pcre2-${PV}/pcre2-${PV}.tar.bz2 \
+ file://run-ptest \
+"
GITHUB_BASE_URI = "https://github.com/PCRE2Project/pcre2/releases"
UPSTREAM_CHECK_REGEX = "releases/tag/pcre2-(?P<pver>\d+(\.\d+)+)$"
@@ -28,7 +30,7 @@ DEPENDS += "bzip2 zlib"
BINCONFIG = "${bindir}/pcre2-config"
-inherit autotools binconfig-disabled github-releases
+inherit autotools binconfig-disabled github-releases ptest
EXTRA_OECONF = "\
--enable-newline-is-lf \
@@ -57,3 +59,15 @@ FILES:pcre2test = "${bindir}/pcre2test"
FILES:pcre2test-doc = "${mandir}/man1/pcre2test.1"
BBCLASSEXTEND = "native nativesdk"
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ cp -r ${S}/testdata $t
+
+ for i in pcre2posix_test pcre2grep pcre2test; do
+ "${B}/libtool" --mode=install install "${B}/$i" "$t"
+ done
+ for i in RunTest RunGrepTest test-driver; \
+ do cp ${S}/$i $t; \
+ done
+}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-19 19:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 18:14 [OE-core][master][PATCH -v2] libpcre2: Enabling Ptest support Shaik Moin
2026-03-19 18:16 ` Shaik Moin
-- strict thread matches above, loose matches on Subject: below --
2026-03-19 18:23 Shaik Moin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox