summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Ribeiro <leandro.ribeiro@collabora.com>2024-02-27 16:18:22 -0300
committerPekka Paalanen <pq@iki.fi>2024-03-26 11:23:26 +0000
commit5ddbdb7a4f82af58848056e6fe2b4b15e5d1d33d (patch)
tree1754fb3721ae20843eb2e90d0567f720f5d2082a
parentefec55cf62f798e6a4ec1fa7fc177be6720cf061 (diff)
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>
-rw-r--r--tests/color-icc-output-test.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/color-icc-output-test.c b/tests/color-icc-output-test.c
index aae852af..700da141 100644
--- a/tests/color-icc-output-test.c
+++ b/tests/color-icc-output-test.c
@@ -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);