From: Babanpreet Singh <bbnpreetsingh@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>,
Babanpreet Singh <bbnpreetsingh@gmail.com>
Subject: [meta-oe][PATCH] ptest-pgxs.bbclass: read the tests from a subdirectory
Date: Thu, 3 Dec 2026 18:34:56 +0000 [thread overview]
Message-ID: <20261203183457.7-1-bbnpreetsingh@gmail.com> (raw)
Some extensions keep their regression tests in a subdirectory with its
own Makefile. PTEST_PGXS_DIR lets the recipe name that subdirectory.
Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
---
A pg-repack recipe that uses this will follow once this is merged.
meta-oe/classes/ptest-pgxs.bbclass | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/meta-oe/classes/ptest-pgxs.bbclass b/meta-oe/classes/ptest-pgxs.bbclass
index 8e1eda3602..fd2832085a 100644
--- a/meta-oe/classes/ptest-pgxs.bbclass
+++ b/meta-oe/classes/ptest-pgxs.bbclass
@@ -17,6 +17,8 @@ inherit pgxs ptest
PTEST_PGXS_CONF ?= ""
PTEST_PGXS_CONF[doc] = "Extra postgresql.conf lines for the test server, separated by \\n."
+PTEST_PGXS_DIR ?= "."
+PTEST_PGXS_DIR[doc] = "Directory, relative to ${S}, whose Makefile lists the regression tests."
do_install_ptest() {
cat > ${T}/ptest-pgxs.mk << 'EOF'
@@ -24,7 +26,7 @@ ptest-pgxs-vars:
@echo "REGRESS=$(REGRESS)"
@echo "REGRESS_OPTS=$(REGRESS_OPTS)"
EOF
- vars=$(oe_runmake -s -C ${B} -f Makefile -f ${T}/ptest-pgxs.mk ptest-pgxs-vars)
+ vars=$(oe_runmake -s -C ${B}/${PTEST_PGXS_DIR} -f Makefile -f ${T}/ptest-pgxs.mk ptest-pgxs-vars)
regress=$(echo "$vars" | sed -n 's/^REGRESS=//p')
conf=""
opts=""
@@ -47,17 +49,17 @@ EOF
install -d ${D}${PTEST_PATH}/tests/$inputdir
for d in sql expected input output data; do
- if [ -d ${S}/$inputdir/$d ]; then
- cp -r ${S}/$inputdir/$d ${D}${PTEST_PATH}/tests/$inputdir/
+ if [ -d ${S}/${PTEST_PGXS_DIR}/$inputdir/$d ]; then
+ cp -r ${S}/${PTEST_PGXS_DIR}/$inputdir/$d ${D}${PTEST_PATH}/tests/$inputdir/
fi
done
for s in $schedules; do
- install -m 0644 ${S}/$s ${D}${PTEST_PATH}/tests/
+ install -m 0644 ${S}/${PTEST_PGXS_DIR}/$s ${D}${PTEST_PATH}/tests/
done
: > ${D}${PTEST_PATH}/tests/ptest.conf
- if [ -n "$conf" ] && [ -f ${S}/$conf ]; then
- cat ${S}/$conf >> ${D}${PTEST_PATH}/tests/ptest.conf
+ if [ -n "$conf" ] && [ -f ${S}/${PTEST_PGXS_DIR}/$conf ]; then
+ cat ${S}/${PTEST_PGXS_DIR}/$conf >> ${D}${PTEST_PATH}/tests/ptest.conf
fi
if [ -n "${PTEST_PGXS_CONF}" ]; then
printf '%b\n' "${PTEST_PGXS_CONF}" >> ${D}${PTEST_PATH}/tests/ptest.conf
--
2.43.0
reply other threads:[~2026-12-03 18:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261203183457.7-1-bbnpreetsingh@gmail.com \
--to=bbnpreetsingh@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.