diff options
-rw-r--r-- | meta-oe/recipes-support/poco/poco/run-ptest | 21 | ||||
-rw-r--r-- | meta-oe/recipes-support/poco/poco_1.13.3.bb | 16 |
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 |
8 | fi | 8 | fi |
9 | 9 | ||
10 | setup_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 | |||
10 | export POCO_BASE=/usr/lib/poco/ptest | 29 | export POCO_BASE=/usr/lib/poco/ptest |
11 | export LD_LIBRARY_PATH=${POCO_BASE}/bin:${LD_LIBRARY_PATH} | 30 | export LD_LIBRARY_PATH=${POCO_BASE}/bin:${LD_LIBRARY_PATH} |
12 | i=0 | 31 | i=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 |
20 | done < testrunners | 41 | done < 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 |
27 | PACKAGECONFIG ??= "XML JSON PDF Util Net NetSSL Crypto JWT Data DataSQLite Zip Encodings Prometheus" | 27 | PACKAGECONFIG ??= "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 |
30 | PACKAGECONFIG:remove:riscv32 = "MongoDB" | 30 | PACKAGECONFIG:remove:riscv32 = "MongoDB" |
@@ -32,7 +32,7 @@ PACKAGECONFIG:remove:riscv64 = "MongoDB" | |||
32 | PACKAGECONFIG:remove:mipsarch = "MongoDB" | 32 | PACKAGECONFIG:remove:mipsarch = "MongoDB" |
33 | PACKAGECONFIG:remove:powerpc = "MongoDB" | 33 | PACKAGECONFIG: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 |
35 | PACKAGECONFIG:remove:class-native = "MongoDB DataODBC" | 35 | PACKAGECONFIG:remove:class-native = "MongoDB DataODBC DataPostgreSQL" |
36 | 36 | ||
37 | PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" | 37 | PACKAGECONFIG[XML] = "-DENABLE_XML=ON,-DENABLE_XML=OFF,expat" |
38 | PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" | 38 | PACKAGECONFIG[JSON] = "-DENABLE_JSON=ON,-DENABLE_JSON=OFF" |
@@ -43,6 +43,7 @@ PACKAGECONFIG[NetSSL] = "-DENABLE_NETSSL=ON,-DENABLE_NETSSL=OFF,openssl" | |||
43 | PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" | 43 | PACKAGECONFIG[Crypto] = "-DENABLE_CRYPTO=ON,-DENABLE_CRYPTO=OFF,openssl" |
44 | PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl" | 44 | PACKAGECONFIG[JWT] = "-DENABLE_JWT=ON,-DENABLE_JWT=OFF,openssl" |
45 | PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" | 45 | PACKAGECONFIG[Data] = "-DENABLE_DATA=ON,-DENABLE_DATA=OFF" |
46 | PACKAGECONFIG[DataPostgreSQL] = "-DENABLE_DATA_POSTGRESQL=ON,-DENABLE_DATA_POSTGRESQL=OFF,postgresql,postgresql" | ||
46 | PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON,-DENABLE_DATA_SQLITE=OFF,sqlite3" | 47 | PACKAGECONFIG[DataSQLite] = "-DENABLE_DATA_SQLITE=ON,-DENABLE_DATA_SQLITE=OFF,sqlite3" |
47 | PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" | 48 | PACKAGECONFIG[Zip] = "-DENABLE_ZIP=ON,-DENABLE_ZIP=OFF" |
48 | PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" | 49 | PACKAGECONFIG[Encodings] = "-DENABLE_ENCODINGS=ON,-DENABLE_ENCODINGS=OFF" |
@@ -94,6 +95,9 @@ python populate_packages:prepend () { | |||
94 | do_install_ptest () { | 95 | do_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 |
109 | ALLOW_EMPTY:${PN} = "1" | 113 | ALLOW_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 |
112 | PACKAGES =+ "${PN}-cppunit" | 116 | PACKAGES =+ "${PN}-cppunit ${PN}-datatest" |
113 | FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*" | 117 | FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*" |
114 | ALLOW_EMPTY:${PN}-cppunit = "1" | 118 | ALLOW_EMPTY:${PN}-cppunit = "1" |
119 | FILES:${PN}-datatest += "${libdir}/libPocoDataTest.so*" | ||
120 | ALLOW_EMPTY:${PN}-datatest = "1" | ||
115 | 121 | ||
116 | RDEPENDS:${PN}-ptest += "${PN}-cppunit" | 122 | RDEPENDS:${PN}-ptest += "${PN}-cppunit ${PN}-datatest" |
117 | RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'MongoDB', 'mongodb', '', d)}" | 123 | RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'MongoDB', 'mongodb', '', d)}" |
118 | RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'Redis', 'redis', '', d)}" | 124 | RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PACKAGECONFIG', 'Redis', 'redis', '', d)}" |
119 | 125 | ||