tests: Add rudimentary color device test

Tests that test case EDID is setup correctly, and that color devices for
monitors are created.

tests/color: Add hotplugging tests

Checks that changing the number of connected monitors reflects the
number of current color devices, and that we end up with the correct end
state.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2164>
This commit is contained in:
Jonas Ådahl
2021-11-29 17:27:27 +01:00
parent 8826b29329
commit f4be29eec7
8 changed files with 284 additions and 0 deletions

View File

@ -380,3 +380,12 @@ meta_color_manager_is_ready (MetaColorManager *color_manager)
return priv->is_ready;
}
int
meta_color_manager_get_num_color_devices (MetaColorManager *color_manager)
{
MetaColorManagerPrivate *priv =
meta_color_manager_get_instance_private (color_manager);
return g_hash_table_size (priv->devices);
}