summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/poco/poco/run-ptest21
-rw-r--r--meta-oe/recipes-support/poco/poco_1.13.3.bb16
2 files changed, 32 insertions, 5 deletions
diff --git a/meta-oe/recipes-support/poco/poco/run-ptest b/meta-oe/recipes-support/poco/poco/run-ptest
index 95fd988e48..5721ca39e4 100644
--- a/meta-oe/recipes-support/poco/poco/run-ptest
+++ b/meta-oe/recipes-support/poco/poco/run-ptest
@@ -7,6 +7,25 @@ if ! nslookup secure.appinf.com >/dev/null 2>&1; then
7 echo 'nameserver 8.8.8.8' > /etc/resolv.conf 7 echo 'nameserver 8.8.8.8' > /etc/resolv.conf
8fi 8fi
9 9
10setup_test() {
11 case "$1" in
12 "DataPostgreSQL-testrunner")
13 if [ "$2" = "start" ]; then
14 # init database
15 postgresql-setup initdb
16 # do not require authentication for tests
17 mv /var/lib/postgresql/data/pg_hba.conf /var/lib/postgresql/data/pg_hba.conf.backup
18 sed s:ident$:trust: /var/lib/postgresql/data/pg_hba.conf.backup > /var/lib/postgresql/data/pg_hba.conf
19 # start as in combination of posgresql.service and posgresql.init
20 su -l postgres -c 'pg_ctl start -D /var/lib/postgresql/data -s -o "-p 5432" -w -t 300'
21 else
22 su -l postgres -c 'pg_ctl stop -D /var/lib/postgresql/data -s -m fast'
23 mv /var/lib/postgresql/data/pg_hba.conf.backup /var/lib/postgresql/data/pg_hba.conf
24 fi
25 ;;
26 esac
27}
28
10export POCO_BASE=/usr/lib/poco/ptest 29export POCO_BASE=/usr/lib/poco/ptest
11export LD_LIBRARY_PATH=${POCO_BASE}/bin:${LD_LIBRARY_PATH} 30export LD_LIBRARY_PATH=${POCO_BASE}/bin:${LD_LIBRARY_PATH}
12i=0 31i=0
@@ -14,7 +33,9 @@ while read runner; do
14 oldpath=`pwd` >/dev/null 33 oldpath=`pwd` >/dev/null
15 cd bin 34 cd bin
16 echo Testing $runner 35 echo Testing $runner
36 setup_test $runner start
17 ./$runner -ignore $oldpath/cppignore.lnx -all 37 ./$runner -ignore $oldpath/cppignore.lnx -all
38 setup_test $runner stop
18 export res$((i++))=$? 39 export res$((i++))=$?
19 cd $oldpath >/dev/null 40 cd $oldpath >/dev/null
20done < testrunners 41done < testrunners
diff --git a/meta-oe/recipes-support/poco/poco_1.13.3.bb b/meta-oe/recipes-support/poco/poco_1.13.3.bb
index 6d93ca4b08..c57c207f82 100644
--- a/meta-oe/recipes-support/poco/poco_1.13.3.bb
+++ b/meta-oe/recipes-support/poco/poco_1.13.3.bb
@@ -24,7 +24,7 @@ inherit cmake ptest
24# By default the most commonly used poco components are built 24# By default the most commonly used poco components are built
25# Foundation is built anyway and doesn't need to be listed explicitly 25# Foundation is built anyway and doesn't need to be listed explicitly
26# these don't have dependencies outside oe-core 26# these don't have dependencies outside oe-core
27PACKAGECONFIG ??= "XML JSON PDF Util Net NetSSL Crypto JWT Data DataSQLite Zip Encodings Prometheus" 27PACKAGECONFIG ??= "XML JSON PDF Util Net NetSSL Crypto JWT Data DataPostgreSQL DataSQLite Zip Encodings Prometheus"
28# MongoDB does not build for all architectures yet keep in sync with COMPATIBLE_HOST list in mongodb recipe 28# MongoDB does not build for all architectures yet keep in sync with COMPATIBLE_HOST list in mongodb recipe
29# and mongodb needs meta-python enabled as well 29# and mongodb needs meta-python enabled as well
30PACKAGECONFIG:remove:riscv32 = "MongoDB" 30PACKAGECONFIG:remove:riscv32 = "MongoDB"
@@ -32,7 +32,7 @@ PACKAGECONFIG:remove:riscv64 = "MongoDB"
32PACKAGECONFIG:remove:mipsarch = "MongoDB" 32PACKAGECONFIG:remove:mipsarch = "MongoDB"
33PACKAGECONFIG:remove:powerpc = "MongoDB" 33PACKAGECONFIG:remove:powerpc = "MongoDB"
34# Following options have dependencies on recipes which don't have native variant 34# Following options have dependencies on recipes which don't have native variant
35PACKAGECONFIG:remove:class-native = "MongoDB DataODBC" 35PACKAGECONFIG:remove:class-native = "MongoDB DataODBC DataPostgreSQL"
36 36
37PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" 37PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat"
38PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" 38PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF"
@@ -43,6 +43,7 @@ PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl"
43PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" 43PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl"
44PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl" 44PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl"
45PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" 45PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF"
46PACKAGECONFIG[DataPostgreSQL] = "-DENABLE_DATA_POSTGRESQL=ON,-DENABLE_DATA_POSTGRESQL=OFF,postgresql,postgresql"
46PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON,-DENABLE_DATA_SQLITE=OFF,sqlite3" 47PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON,-DENABLE_DATA_SQLITE=OFF,sqlite3"
47PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" 48PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF"
48PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" 49PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF"
@@ -94,6 +95,9 @@ python populate_packages:prepend () {
94do_install_ptest () { 95do_install_ptest () {
95 cp -rf ${B}/bin/ ${D}${PTEST_PATH} 96 cp -rf ${B}/bin/ ${D}${PTEST_PATH}
96 cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} 97 cp -f ${B}/lib/libCppUnit.so* ${D}${libdir}
98 if ${@bb.utils.contains('PACKAGECONFIG', 'DataPostgreSQL', 'true', 'false', d)}; then
99 cp -f ${B}/lib/libPocoDataTest.so* ${D}${libdir}
100 fi
97 cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ 101 cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/
98 find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; 102 find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \;
99 rm -f ${D}${PTEST_PATH}/testrunners 103 rm -f ${D}${PTEST_PATH}/testrunners
@@ -108,12 +112,14 @@ PACKAGES_DYNAMIC = "poco-.*"
108# "poco" is a metapackage which pulls in all Poco components 112# "poco" is a metapackage which pulls in all Poco components
109ALLOW_EMPTY:${PN} = "1" 113ALLOW_EMPTY:${PN} = "1"
110 114
111# cppunit is only built if tests are enabled 115# cppunit and datatest is only built if tests are enabled
112PACKAGES =+ "${PN}-cppunit" 116PACKAGES =+ "${PN}-cppunit ${PN}-datatest"
113FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*" 117FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*"
114ALLOW_EMPTY:${PN}-cppunit = "1" 118ALLOW_EMPTY:${PN}-cppunit = "1"
119FILES:${PN}-datatest += "${libdir}/libPocoDataTest.so*"
120ALLOW_EMPTY:${PN}-datatest = "1"
115 121
116RDEPENDS:${PN}-ptest += "${PN}-cppunit" 122RDEPENDS:${PN}-ptest += "${PN}-cppunit ${PN}-datatest"
117RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'MongoDB', 'mongodb', '', d)}" 123RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'MongoDB', 'mongodb', '', d)}"
118RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'Redis', 'redis', '', d)}" 124RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'Redis', 'redis', '', d)}"
119 125