<table><tr><td style="">graesslin created this revision.<br />graesslin added reviewers: KWin, Plasma.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8776" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The addition of the test infrastructure is motivated by the regressions<br />
caused by adding mode switching and transformation support.<br />
A contributing factor to these regression is the fact that the DRM<br />
platform does not have any tests. It is difficult to test this code as<br />
it needs to work with hardware, thus we cannot use the real DRM library.<br />
Instead we need to use mocking.</p>

<p>This change sets up some first basic tests with the help of a mockDrm<br />
library. In order to better test the code as units the Drm classes are<br />
slightly refactored. Most importantly the dependency to DrmBackend is<br />
removed wherever possible and replaced by a simple int fd which is mostly<br />
the only element used by the classes.</p>

<p>This first test introduces basic testing of a DrmObject. It is intended<br />
to extend this to at least also test DrmPlane as a central piece of our<br />
Drm platform plugin. This will also extend the tests of DrmObject.</p></div></div><br /><div><strong>BRANCH</strong><div><div>drm-autotests</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8776" rel="noreferrer">https://phabricator.kde.org/D8776</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/CMakeLists.txt<br />
autotests/drm/CMakeLists.txt<br />
autotests/drm/mock_drm.cpp<br />
autotests/drm/mock_drm.h<br />
autotests/drm/objecttest.cpp<br />
cmake/modules/FindLibdrm.cmake<br />
plugins/platforms/drm/drm_backend.cpp<br />
plugins/platforms/drm/drm_buffer.cpp<br />
plugins/platforms/drm/drm_buffer.h<br />
plugins/platforms/drm/drm_buffer_gbm.cpp<br />
plugins/platforms/drm/drm_buffer_gbm.h<br />
plugins/platforms/drm/drm_object.cpp<br />
plugins/platforms/drm/drm_object.h<br />
plugins/platforms/drm/drm_object_connector.cpp<br />
plugins/platforms/drm/drm_object_connector.h<br />
plugins/platforms/drm/drm_object_crtc.cpp<br />
plugins/platforms/drm/drm_object_crtc.h<br />
plugins/platforms/drm/drm_object_plane.cpp<br />
plugins/platforms/drm/drm_object_plane.h</div></div></div><br /><div><strong>To: </strong>graesslin, KWin, Plasma<br /><strong>Cc: </strong>plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>