mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-08-11 11:42:23 +00:00
hiredis: add ptest
Use internal test from hiredis project as ptest. If ptest is in DISTRO_FEATURES tests are enabled default but can be handled individually through PACKAGECONFIG. Test config 'testssl' requires 'ssl' option but is not enabled default as the redis recipe does not build it with ssl support. Tested on qemux86_64 and qemuarm64. Signed-off-by: Peter Bergin <peter.bergin@windriver.com> Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
e1c579be28
commit
b818cc6084
@ -982,6 +982,7 @@ RDEPENDS:packagegroup-meta-oe-ptest-packages = "\
|
||||
poco-ptest \
|
||||
cmocka-ptest \
|
||||
minicoredumper-ptest \
|
||||
hiredis-ptest \
|
||||
"
|
||||
RDEPENDS:packagegroup-meta-oe-ptest-packages:append:x86 = " mcelog-ptest"
|
||||
RDEPENDS:packagegroup-meta-oe-ptest-packages:append:x86-64 = " mcelog-ptest"
|
||||
|
||||
3
meta-oe/recipes-extended/hiredis/hiredis/run-ptest
Normal file
3
meta-oe/recipes-extended/hiredis/hiredis/run-ptest
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
TEST_SSL=0 TEST_ASYNC=0 ./test.sh
|
||||
@ -4,16 +4,36 @@ SECTION = "libs"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
|
||||
|
||||
SRC_URI = "git://github.com/redis/hiredis;protocol=https;branch=master"
|
||||
SRC_URI = " \
|
||||
git://github.com/redis/hiredis;protocol=https;branch=master \
|
||||
file://run-ptest \
|
||||
"
|
||||
SRCREV = "c14775b4e48334e0262c9f168887578f4a368b5d"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit cmake
|
||||
inherit cmake ptest
|
||||
|
||||
PACKAGECONFIG ??= "ssl"
|
||||
# 'testssl' is not enabled by default as redis recipe does not build with ssl support
|
||||
# option 'testssl' requires 'ssl'
|
||||
PACKAGECONFIG ??= "ssl ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'test testasync', '', d)}"
|
||||
PACKAGECONFIG[ssl] = "-DENABLE_SSL=ON, -DENABLE_SSL=OFF, openssl"
|
||||
PACKAGECONFIG[test] = "-DDISABLE_TESTS=OFF, -DDISABLE_TESTS=ON"
|
||||
PACKAGECONFIG[testssl] = "-DENABLE_SSL_TESTS=ON, -DENABLE_SSL_TESTS=OFF, openssl"
|
||||
PACKAGECONFIG[testasync] = "-DENABLE_ASYNC_TESTS=ON, -DENABLE_ASYNC_TESTS=OFF, libevent"
|
||||
|
||||
do_install_ptest() {
|
||||
install ${S}/test.sh ${D}${PTEST_PATH}/
|
||||
install ${B}/hiredis-test ${D}${PTEST_PATH}/
|
||||
if ${@bb.utils.contains('PACKAGECONFIG','testssl','true','false',d)}; then
|
||||
sed -i 's/TEST_SSL=0/TEST_SSL=1/g' ${D}${PTEST_PATH}/run-ptest
|
||||
fi
|
||||
if ${@bb.utils.contains('PACKAGECONFIG','testasync','true','false',d)}; then
|
||||
sed -i 's/TEST_ASYNC=0/TEST_ASYNC=1/g' ${D}${PTEST_PATH}/run-ptest
|
||||
fi
|
||||
}
|
||||
|
||||
FILES:${PN}-dev += "${datadir}/hiredis_ssl ${prefix}/build"
|
||||
|
||||
RDEPENDS:${PN} = "redis"
|
||||
RDEPENDS:${PN}-ptest = "${@bb.utils.contains('PACKAGECONFIG', 'testssl', 'openssl-bin', '', d)}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user