← Back to team overview

cloud-certification-team team mailing list archive

[Merge] lp:~bladernr/cloud-testing/cloudbox-remove-display_resource into lp:cloud-testing/cloudbox

 

Jeff Lane has proposed merging lp:~bladernr/cloud-testing/cloudbox-remove-display_resource into lp:cloud-testing/cloudbox.

Requested reviews:
  Jeff Lane (bladernr)

For more details, see:
https://code.launchpad.net/~bladernr/cloud-testing/cloudbox-remove-display_resource/+merge/196955

Removes display_resource job that is not needed for this package
-- 
https://code.launchpad.net/~bladernr/cloud-testing/cloudbox-remove-display_resource/+merge/196955
Your team Cloud Certification is subscribed to branch lp:cloud-testing/cloudbox.
=== modified file 'jobs/resource.txt.in'
--- jobs/resource.txt.in	2013-04-27 05:56:14 +0000
+++ jobs/resource.txt.in	2013-11-27 17:50:09 +0000
@@ -80,12 +80,6 @@
 command: block_device_resource
 description: Create resource info for removable block devices 
 
-name: display
-plugin: resource
-command: display_resource
-requires: package.name == "x11-xserver-utils"
-description: Creates display resource info from xrandr output
-
 name: usb
 plugin: resource
 description: Creates resource info for supported USB versions

=== removed file 'scripts/display_resource'
--- scripts/display_resource	2013-04-27 05:56:14 +0000
+++ scripts/display_resource	1970-01-01 00:00:00 +0000
@@ -1,84 +0,0 @@
-#!/usr/bin/python3
-
-import re
-import sys
-import subprocess
-
-CONNECTOR_RE = re.compile(
-    r"\n(?P<Name>[\w\-]+)"
-    r"(?:\s+.*?"
-    r"SignalFormat:\s+(?P<SignalFormat>[\w\-_]+)\s+.*?"
-    r"ConnectorType:\s+(?P<ConnectorType>[\w\-_]+))?", re.S)
-SVIDEO_RE = re.compile(r"s\-?video|din|cv", re.I)
-DP_RE = re.compile(r"dp|displayport", re.I)
-
-
-def main():
-    try:
-        xrandr_output = subprocess.check_output(
-            ["xrandr", "-q", "--verbose"], universal_newlines=True)
-    except subprocess.CalledProcessError:
-        return 0
-
-    xrandr_output = "\n" + ''.join(xrandr_output.splitlines(True)[1:])
-    supported_connections = dict()
-
-    for m in CONNECTOR_RE.finditer(xrandr_output):
-        name = m.group('Name').lower()
-        signal_format = connector_type = ''  # RandR 1.3 only
-        if m.group('SignalFormat'):
-            signal_format = m.group('SignalFormat').lower()
-        if m.group('ConnectorType'):
-            connector_type = m.group('ConnectorType').lower()
-
-        if name.startswith('vga'):
-            supported_connections['vga'] = 'supported'
-
-        elif name.startswith('dvi'):
-            supported_connections['dvi'] = 'supported'
-
-        elif DP_RE.match(name):
-            # HDMI uses TMDS links, DisplayPort (DP) uses LVDS pairs (lanes)
-            # to transmit micro data packets.
-            # Reported by NVIDIA proprietary drivers (version >= 302.17)
-            if signal_format == 'tmds':
-                supported_connections['hdmi'] = 'supported'
-            else:
-                supported_connections['dp'] = 'supported'
-
-        elif name.startswith('hdmi'):
-            supported_connections['hdmi'] = 'supported'
-
-        elif SVIDEO_RE.match(name):
-            supported_connections['svideo'] = 'supported'
-
-        elif name.startswith('rca'):
-            supported_connections['rca'] = 'supported'
-
-        elif name.startswith('tv'):
-            if SVIDEO_RE.match(signal_format):
-                supported_connections['svideo'] = 'supported'
-            else:
-                supported_connections['tv'] = 'supported'
-
-        # ATI/AMD proprietary FGLRX graphics driver codenames:
-        elif name.startswith('crt') or name.startswith('dfp'):
-            if connector_type.startswith('dvi'):
-                supported_connections['dvi'] = 'supported'
-            elif connector_type.startswith('vga'):
-                supported_connections['vga'] = 'supported'
-            elif DP_RE.match(connector_type) and DP_RE.match(signal_format):
-                supported_connections['dp'] = 'supported'
-            else:
-                # HDMI ports may appear as unknown
-                # (for both signal format and connector type).
-                supported_connections['hdmi'] = 'supported'
-
-    for connector in supported_connections.keys():
-        print("%s: supported" % connector)
-
-    return 0
-
-
-if __name__ == "__main__":
-    sys.exit(main())


References