test/drm-lease: Create helper functions to reduce boilerplate 26/27326/1
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>
Tue, 28 Sep 2021 08:07:32 +0000 (17:07 +0900)
committerDamian Hobson-Garcia <dhobsong@igel.co.jp>
Mon, 4 Apr 2022 06:45:01 +0000 (15:45 +0900)
commite39cb4f5d10e162bc7a5a5a173581c1924d475ea
tree639eb95df655c349b8c8c16aecad23d667922df2
parente81466892689b6814d5e9bf0e80b792bfee47c83
test/drm-lease: Create helper functions to reduce boilerplate

Most of the test cases use very similar setup code to configure
the test DRM device and leases.  Refactor this out into separate
functions to help keep the focus on the relevant parts of each
test.

The helpers set up a basic DRM device with one 1:1 mapping of
encoders, CRTCs, and connectors, with support for planes.

Tests that don't adhere to this pattern are likely testing for a
specific configuration, so should be open coding their setup.

Bug-AGL: SPEC-3815

Change-Id: I0adbed04246ff6af0060692fa4c1e5897b903237
Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
drm-lease-manager/test/lease-manager-test.c
drm-lease-manager/test/test-drm-device.c
drm-lease-manager/test/test-drm-device.h