Commit graph

2 commits

Author SHA1 Message Date
Derek Foreman 4def21c196 tests: prevent tests from breaking when they use invalid weston_compositor
The color-metadata-errors test inits outputs with a NULL compositor, and
makes a compositor that's entirely 0s except for the bits it's interested
in.

This makes a mess in a future where the primary_plane is split up per
output, as initializing the primary plane tries to add it to the
compositor's plane_list.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-07-11 07:26:43 -05:00
Pekka Paalanen ccb4c383d7 tests: add color-metadata-errors test
'color_characteristics_config_error' test ensures that all code paths in
parse_color_characteristics() and wet_output_set_color_characteristics()
get exercised.  The return value and logged error messages are checked.

Other cases test the weston_hdr_metadata_type1 validation.

These are for the sake of test coverage, but also an example of how to
test a function from main.c, and how to capture messages from
weston_log().

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-05-27 10:30:35 +00:00