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>
This commit is contained in:
Zeming LIU
2026-04-16 10:53:05 +08:00
committed by Khem Raj
parent 2f1a9776c7
commit f23c00b163
3 changed files with 30 additions and 3 deletions
@@ -0,0 +1,4 @@
#!/bin/sh
cd src
ctest --force-new-ctest-process | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}'