@@ -31,6 +31,7 @@ EOF
conf=""
opts=""
inputdir=.
+ expecteddir=.
schedules=""
# REGRESS_OPTS is split on whitespace, so an option whose value
# contains spaces or quotes is not supported
@@ -39,6 +40,7 @@ EOF
--temp-config=*) conf=$(basename "${o#--temp-config=}") ;;
--temp-instance=*|--dbname=*) ;;
--inputdir=*) inputdir="${o#--inputdir=}"; opts="$opts $o" ;;
+ --expecteddir=*) expecteddir="${o#--expecteddir=}"; opts="$opts $o" ;;
--schedule=*)
schedules="$schedules ${o#--schedule=}"
opts="$opts --schedule=$(basename "${o#--schedule=}")"
@@ -53,6 +55,10 @@ EOF
cp -r ${S}/${PTEST_PGXS_DIR}/$inputdir/$d ${D}${PTEST_PATH}/tests/$inputdir/
fi
done
+ if [ "$expecteddir" != "$inputdir" ] && [ -d ${S}/${PTEST_PGXS_DIR}/$expecteddir/expected ]; then
+ install -d ${D}${PTEST_PATH}/tests/$expecteddir
+ cp -r ${S}/${PTEST_PGXS_DIR}/$expecteddir/expected ${D}${PTEST_PATH}/tests/$expecteddir/
+ fi
for s in $schedules; do
install -m 0644 ${S}/${PTEST_PGXS_DIR}/$s ${D}${PTEST_PATH}/tests/
done
pg_regress takes expected output from --expecteddir, by default the directory it runs in, and only then from --inputdir. An extension that keeps its expected output there, apart from the SQL in --inputdir, got no expected files in its ptest. Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com> --- meta-oe/classes/ptest-pgxs.bbclass | 6 ++++++ 1 file changed, 6 insertions(+)