summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/postgresql/postgresql.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-dbs/postgresql/postgresql.inc')
-rw-r--r--meta-oe/recipes-dbs/postgresql/postgresql.inc44
1 files changed, 42 insertions, 2 deletions
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc
index 040b3d5e34..07cd121511 100644
--- a/meta-oe/recipes-dbs/postgresql/postgresql.inc
+++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc
@@ -29,6 +29,7 @@ SRC_URI = "https://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \
29 file://postgresql.pam \ 29 file://postgresql.pam \
30 file://postgresql-setup \ 30 file://postgresql-setup \
31 file://postgresql.service \ 31 file://postgresql.service \
32 file://run-ptest \
32" 33"
33 34
34LEAD_SONAME = "libpq.so" 35LEAD_SONAME = "libpq.so"
@@ -37,7 +38,7 @@ LEAD_SONAME = "libpq.so"
37export LDFLAGS_SL = "${LDFLAGS}" 38export LDFLAGS_SL = "${LDFLAGS}"
38export LDFLAGS_EX_BE = "-Wl,--export-dynamic" 39export LDFLAGS_EX_BE = "-Wl,--export-dynamic"
39 40
40inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext perl-version multilib_header 41inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext perl-version multilib_header ptest
41 42
42CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR}" 43CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR}"
43 44
@@ -77,7 +78,7 @@ EXTRA_OECONF += "--disable-rpath \
77 --datadir=${datadir}/${BPN} \ 78 --datadir=${datadir}/${BPN} \
78 --sysconfdir=${sysconfdir}/${BPN} \ 79 --sysconfdir=${sysconfdir}/${BPN} \
79" 80"
80EXTRA_OECONF:sh4 += "--disable-spinlocks" 81EXTRA_OECONF:append:sh4 = " --disable-spinlocks"
81 82
82DEBUG_OPTIMIZATION:remove:mips = " -Og" 83DEBUG_OPTIMIZATION:remove:mips = " -Og"
83DEBUG_OPTIMIZATION:append:mips = " -O" 84DEBUG_OPTIMIZATION:append:mips = " -O"
@@ -184,6 +185,45 @@ do_compile:append() {
184 done 185 done
185} 186}
186 187
188do_compile_ptest() {
189 oe_runmake -C src/test/regress all
190}
191
192do_install_ptest() {
193 mkdir -p ${D}${PTEST_PATH}/test
194
195 # Install pg_regress binary
196 install -m 0755 ${B}/src/test/regress/pg_regress ${D}${PTEST_PATH}/test/
197
198 # Install test schedules and resultmap
199 for f in parallel_schedule serial_schedule resultmap; do
200 [ -f ${S}/src/test/regress/$f ] && install -m 0644 ${S}/src/test/regress/$f ${D}${PTEST_PATH}/test/
201 done
202
203 # Install SQL, expected, input, output, and data files
204 for d in sql expected input output data; do
205 if [ -d ${S}/src/test/regress/$d ]; then
206 cp -r ${S}/src/test/regress/$d ${D}${PTEST_PATH}/test/
207 fi
208 done
209
210 # Install the regress test shared library into the standard PostgreSQL
211 # package library directory (PKGLIBDIR) alongside contrib modules such
212 # as autoinc.so and refint.so. This allows pg_regress --dlpath to
213 # resolve all required shared libraries from a single location.
214 install -d ${D}${libdir}/${BPN}
215 install -m 0755 ${B}/src/test/regress/regress.so ${D}${libdir}/${BPN}/
216
217 # Install run-ptest
218 install -m 0755 ${UNPACKDIR}/run-ptest ${D}${PTEST_PATH}/
219
220 # Set ownership to postgres user for running tests
221 chown -R postgres:postgres ${D}${PTEST_PATH}
222}
223
224RDEPENDS:${PN}-ptest += "${PN}-client ${PN}-contrib perl"
225FILES:${PN}-ptest += "${libdir}/${BPN}/regress.so"
226
187# server needs to configure user and group 227# server needs to configure user and group
188usernum = "28" 228usernum = "28"
189groupnum = "28" 229groupnum = "28"