* [meta-oe][PATCH] ptest-pgxs.bbclass: read the tests from a subdirectory
@ 2026-12-03 18:34 Babanpreet Singh
0 siblings, 0 replies; only message in thread
From: Babanpreet Singh @ 2026-12-03 18:34 UTC (permalink / raw)
To: openembedded-devel; +Cc: Khem Raj, Babanpreet Singh
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-03 18:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 18:34 [meta-oe][PATCH] ptest-pgxs.bbclass: read the tests from a subdirectory Babanpreet Singh
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.