blob: 25fc5dc8f60ee35e1d1c14af77d4f737f0f7f51a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/python3
import kmstest
import pykms
class ConnectorsTest(kmstest.KMSTest):
"""Perform sanity checks on all connectors."""
def main(self):
for connector in self.card.connectors:
self.start("connector %s" % connector.fullname)
# Every connector should have at least one suitable CRTC
crtcs = connector.get_possible_crtcs()
if len(crtcs) == 0:
self.fail("no possible CRTC")
continue
# Connected connectors should have at least one mode
if connector.connected():
modes = connector.get_modes()
if len(modes) == 0:
self.fail("no mode available")
continue
self.success()
ConnectorsTest().execute()
|