lcms: add ptest support

Test results on qemux86-64:
START: ptest-runner
BEGIN: /usr/lib/lcms/ptest
PASS: Base types ...Ok.
PASS: quick floor ...Ok.
PASS: Fixed point 15.16 representation ...Ok.
PASS: D50 roundtrip ...Ok.
PASS: 1D interpolation in 2pt tables ...Ok.
PASS: 1D interpolation in 4pt tables ...Ok.
PASS: 1D interpolation in 18pt tables ...Ok.
PASS: 1D interpolation in descending 3pt tables ...Ok.
PASS: 1D interpolation in descending 18pt tables ...Ok.
PASS: 3D interpolation Trilinear (float)  ...Ok.
PASS: 3D interpolation Trilinear (16)  ...Ok.
PASS: Reverse interpolation 4 -> 3 ......Ok.
PASS: 3D interpolation with granularity ...Ok.
PASS: 4D interpolation with granularity ...Ok.
PASS: 6D interpolation with granularity ...Ok.
PASS: 8D interpolation with granularity ...Ok.
PASS: Lab to XYZ and back (float only)  ...Ok.
PASS: Lab V2 encoding ...Ok.
PASS: Blackbody radiator ...Ok.
PASS: Linear gamma curves (float) ....Ok.
PASS: Curve 2.2 (float) ...|Err|<0.001953 .Ok.
PASS: Curve 1.8 (table) ...|Err|<0.053287 .Ok.
PASS: Curve 3.0 (table) ...|Err|<0.049726 .Ok.
PASS: Curve 2.2 (word table) ...|Err|<0.972654 .Ok.
PASS: Parametric curves ...Ok.
PASS: Join curves descending ...Ok.
PASS: Join curves sRGB (Float) ...Ok.
PASS: Join curves sigmoidal ...Ok.
PASS: 1 Stage LUT  ...Ok.
PASS: 2 Stage LUT (16 bits) ...Ok.
PASS: 3 Stage LUT (16 bits) ...Ok.
PASS: 4 Stage LUT (16 bits) ...Ok.
PASS: 5 Stage LUT (16 bits)  ...Ok.
PASS: 6 Stage LUT (16 bits)  ...Ok.
PASS: XYZ to XYZ LUT (float only)  ...Ok.
PASS: Named Color LUT ...Ok.
PASS: Floating point formatters ...Ok.
PASS: ChangeBuffersFormat ...Ok.
PASS: Multilocalized Unicode (II) ...Ok.
PASS: Create named color profile ...Ok.
PASS: Header version ...Ok.
PASS: Error reporting on bad profiles ...Ok.
PASS: Curves only transforms .........Ok.
PASS: Encoded Lab->Lab transforms ...Ok.
PASS: Matrix-shaper transform (float) ...Ok.
PASS: Matrix-shaper transform (8 bits) ...Ok.
PASS: Known values across matrix-shaper ...Ok.
PASS: Gray Lab input profile ...Ok.
PASS: Gray Lab output profile ...Ok.
PASS: Matrix-shaper proofing transform (16 bits) ...Ok.
PASS: CMYK roundtrip on perceptual transform ...Ok.
PASS: Black ink only preservation ...Ok.
PASS: Deciding curve types ...Ok.
PASS: TAC detection ...Ok.
PASS: CGATS parser on junk ...Ok.
PASS: PostScript generator ...Ok.
PASS: MD5 digest ...Ok.
PASS: floating point tags on XYZ ...Ok.
PASS: Parametric curve on Rec709 ...Ok.
PASS: Floating Point segmented curve with short sampled segment ...Ok.
PASS: Check MetaTag ...Ok.
PASS: Set free a tag ...Ok.
PASS: Planar 8 optimization ...Ok.
PASS: Swap endian feature ...Ok.
PASS: Forged MPE profile ...Ok.
PASS: Empty MLUC ...Ok.
PASS: OkLab color space ...Ok.
PASS: centering of Lab16 ...Ok.
PASS: Unbounded mode w/ integer output ...Ok.
PASS: Bad CGATS file ...Ok.
PASS: Gamut check on floats ...Ok.
PASS: Context memory handling ...Ok.
PASS: Alarm codes context ...Ok.
PASS: 1D interpolation plugin ...Ok.
PASS: Parametric curve plugin ...Ok.
PASS: Tag type plugin ...Ok.
PASS: Optimization plugin ...Ok.
PASS: Full transform plugin ...Ok.
PASS: Double from float ...Ok.
DURATION: 10
END: /usr/lib/lcms/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: Jiao Song <sjiao@windriver.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Shilong Jiao
2026-06-01 16:21:55 +08:00
committed by Khem Raj
parent bd45ae6ece
commit 42dcb0197e
3 changed files with 21 additions and 2 deletions
@@ -27,6 +27,7 @@ PTESTS_FAST_META_OE = "\
imagemagick \
jemalloc \
jq \
lcms \
leveldb \
libcereal \
libdbi-perl \
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
cd $(dirname $0)
./testcms 2>&1 | awk '/^Checking/{test=substr($0,10); sub(/ \.\.\.$/,"",test); getline; print (/FAIL!/ ? "FAIL: " : "PASS: ") test}'
+16 -2
View File
@@ -3,7 +3,9 @@ SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e9ce323c4b71c943a785db90142b228a"
SRC_URI = "${SOURCEFORGE_MIRROR}/lcms/lcms2-${PV}.tar.gz"
SRC_URI = "${SOURCEFORGE_MIRROR}/lcms/lcms2-${PV}.tar.gz \
file://run-ptest \
"
SRC_URI[sha256sum] = "bfc54f7bab59fbc921012014a8032e4cba4abd46db47d46b76416a8c0b2815c8"
DEPENDS = "tiff"
@@ -12,6 +14,18 @@ BBCLASSEXTEND = "native nativesdk"
S = "${UNPACKDIR}/lcms2-${PV}"
inherit autotools sourceforge-releases
inherit autotools sourceforge-releases ptest
do_compile_ptest() {
oe_runmake -C ${B}/testbed testcms
}
do_install_ptest() {
install -d ${D}${PTEST_PATH}
install -m 0755 ${B}/testbed/testcms ${D}${PTEST_PATH}/
install -m 0644 ${S}/testbed/*.icc ${D}${PTEST_PATH}/
}
RDEPENDS:${PN}-ptest += "bash"
CVE_PRODUCT += "littlecms:little_cms_color_engine"