summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb
diff options
context:
space:
mode:
authorZeming LIU <zeming.liu@windriver.com>2026-04-16 10:53:05 +0800
committerKhem Raj <khem.raj@oss.qualcomm.com>2026-04-15 22:45:58 -0700
commitf23c00b163f3980c78e815dc78c7cc3c86ed99e6 (patch)
treeba87c614bcb3ba09e2ee2c1dd603ef381e031c6d /meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb
parent2f1a9776c7af323eea2a1d99ef260d45a5b7fa4a (diff)
downloadmeta-openembedded-f23c00b163f3980c78e815dc78c7cc3c86ed99e6.tar.gz
jsoncpp: add ptest support
Add ptest support for jsoncpp to enable automated testing of the JSON C++ library functionality. Note: - Tested on: WRLinux master-wr (based on meta-openembedded master) - jsoncpp version: 1.9.7 - Unable to test on pure upstream due to poky/meta-oe branch mismatch Test Result: root@qemux86-64:~# ptest-runner jsoncpp START: ptest-runner 2026-04-15T14:04 BEGIN: /usr/lib64/jsoncpp/ptest PASS: jsoncpp_readerwriter PASS: jsoncpp_readerwriter_json_checker PASS: jsoncpp_test DURATION: 122 END: /usr/lib64/jsoncpp/ptest 2026-04-15T14:06 STOP: ptest-runner TOTAL: 1 FAIL: 0 Signed-off-by: Zeming LIU <zeming.liu@windriver.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Diffstat (limited to 'meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb')
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb34
1 files changed, 28 insertions, 6 deletions
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb
index b70a84304f..797f093f33 100644
--- a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb
@@ -14,11 +14,33 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926"
14PE = "1" 14PE = "1"
15 15
16SRCREV = "3455302847cf1e4671f1d8f5fa953fd46a7b1404" 16SRCREV = "3455302847cf1e4671f1d8f5fa953fd46a7b1404"
17SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https;tag=${PV}" 17SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https;tag=${PV} \
18 18 file://run-ptest \
19 19 "
20inherit cmake 20
21 21inherit cmake ptest
22EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DBUILD_OBJECT_LIBS=OFF -DJSONCPP_WITH_TESTS=OFF" 22
23EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DBUILD_OBJECT_LIBS=OFF \
24 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DJSONCPP_WITH_TESTS=ON -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF', '-DJSONCPP_WITH_TESTS=OFF', d)} \
25 "
26
27DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)}"
28RDEPENDS:${PN}-ptest += "cmake python3-core"
29
30do_install_ptest () {
31 cp -r ${B}/bin ${D}${PTEST_PATH}
32 cp -r ${S}/test ${D}${PTEST_PATH}
33
34 rsync -a ${B}/src ${D}${PTEST_PATH} \
35 --exclude CMakeFiles \
36 --exclude cmake_install.cmake \
37 --exclude Makefile \
38 --exclude generated
39 sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
40 sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
41 sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
42 sed -i -e 's#${PYTHON}#/usr/bin/python3#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
43 sed -i -e 's#${WORKDIR}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
44}
23 45
24BBCLASSEXTEND = "native nativesdk" 46BBCLASSEXTEND = "native nativesdk"