tests: skip color-icc-output if we don't have cmsGetToneCurveSegment()

When we don't have cmsGetToneCurveSegment() at disposal, we are not able
to inspect the LittleCMS color curves and convert them to Weston's
internal representation of color curves. In such case, we need to
fallback to a more generic solution (using LUT's).

For now we always fallback to the LUT's, but in the next commits we'll
add support to inspect the curves and convert them to the internal
representations that we'll add.

This will allow us to tweak the tolerance in the color-icc-output tests.
But if we continue running these tests for systems without
cmsGetToneCurveSegment() at disposal, they may fail.

We already have a LittleCMS version in the CI that has
cmsGetToneCurveSegment(). So skip color-icc-output when we don't have
this function.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2024-02-27 16:18:22 -03:00 committed by Pekka Paalanen
parent efec55cf62
commit 5ddbdb7a4f

View file

@ -225,6 +225,17 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
struct compositor_setup setup;
char *file_name;
#if !HAVE_CMS_GET_TONE_CURVE_SEGMENT
/* When cmsGetToneCurveSegment() is at disposal, Weston is able to
* inspect the LittleCMS color curves and convert them to Weston's
* internal representation of color curves. In such case, we don't need
* to fallback to a more generic solution (usage of LUT's), which is
* less precise. Thanks to that, we are able to decrease the
* tolerance in this test. We already have cmsGetToneCurveSegment() in
* our CI, so simply skip this test when this is not available. */
return RESULT_SKIP;
#endif
cmsSetLogErrorHandler(test_lcms_error_logger);
compositor_setup_defaults(&setup);