diff options
author | Pierre Equoy <pierre.equoy@canonical.com> | 2022-06-08 12:00:46 +0800 |
---|---|---|
committer | Pierre Equoy <pierre.equoy@canonical.com> | 2022-06-15 15:31:17 +0800 |
commit | a028a44bb18f0f2e9e26c91c3e7f216c70911509 (patch) | |
tree | 53048351b8fdc350e3ba5049cd65715d80272200 | |
parent | 73af3e72d7d859f5151e75e1bf885bd978d4c1c7 (diff) |
Remove: graphics_modes_info.py script and related jobs
The graphics_modes_info.py script is used in two jobs that are not called in any of our test plans. Moreover, since it uses xrandr, the output might be incorrect on recent versions of Ubuntu (22.04+) using Wayland as default.
-rwxr-xr-x | bin/graphics_modes_info.py | 74 | ||||
-rw-r--r-- | units/graphics/jobs.pxu | 10 | ||||
-rw-r--r-- | units/graphics/legacy.pxu | 8 |
3 files changed, 0 insertions, 92 deletions
diff --git a/bin/graphics_modes_info.py b/bin/graphics_modes_info.py deleted file mode 100755 index f92cd76..0000000 --- a/bin/graphics_modes_info.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# graphics_modes_info.py -# -# This file is part of Checkbox. -# -# Copyright 2012 Canonical Ltd. -# -# Authors: Alberto Milone <alberto.milone@canonical.com> -# -# Checkbox is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 3, -# as published by the Free Software Foundation. - -# -# Checkbox is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Checkbox. If not, see <http://www.gnu.org/licenses/>. - -from __future__ import print_function -from __future__ import unicode_literals -import sys - -from checkbox_support.contrib import xrandr - - -def print_modes_info(screen): - """Print some information about the detected screen and its outputs""" - xrandr._check_required_version((1, 0)) - print("Screen %s: minimum %s x %s, current %s x %s, maximum %s x %s" % - (screen._screen, - screen._width_min, screen._height_min, - screen._width, screen._height, - screen._width_max, screen._height_max)) - print(" %smm x %smm" % (screen._width_mm, screen._height_mm)) - print("Outputs:") - for o in list(screen.outputs.keys()): - output = screen.outputs[o] - print(" %s" % o, end=' ') - if output.is_connected(): - print("(%smm x %smm)" % (output.get_physical_width(), - output.get_physical_height())) - modes = output.get_available_modes() - print(" Modes:") - for m in range(len(modes)): - mode = modes[m] - refresh = mode.dotClock / (mode.hTotal * mode.vTotal) - print( - " [%s] %s x %s @ %s Hz" % - (m, mode.width, mode.height, refresh), end=' ') - if mode.id == output._mode: - print("(current)", end=' ') - if m == output.get_preferred_mode(): - print("(preferred)", end=' ') - print("") - else: - print("(not connected)") - - -def main(): - screen = xrandr.get_current_screen() - try: - print_modes_info(screen) - except(xrandr.UnsupportedRRError): - print('Error: RandR version lower than 1.0', file=sys.stderr) - - -if __name__ == '__main__': - main() diff --git a/units/graphics/jobs.pxu b/units/graphics/jobs.pxu index f18aa07..8206f1a 100644 --- a/units/graphics/jobs.pxu +++ b/units/graphics/jobs.pxu @@ -148,16 +148,6 @@ _description: unit: template template-resource: graphics_card -id: graphics/{index}_modes_{product_slug} -plugin: shell -category_id: com.canonical.plainbox::graphics -command: graphics_modes_info.py -estimated_duration: 0.250 -_description: Collect info on graphics modes (screen resolution and refresh rate) for {vendor} {product} -_summary: Test graphic modes info for {vendor} {product} - -unit: template -template-resource: graphics_card id: graphics/{index}_color_depth_{product_slug} plugin: shell category_id: com.canonical.plainbox::graphics diff --git a/units/graphics/legacy.pxu b/units/graphics/legacy.pxu index 14969b0..2b9545d 100644 --- a/units/graphics/legacy.pxu +++ b/units/graphics/legacy.pxu @@ -96,14 +96,6 @@ _description: VERIFICATION: Is this the display's maximum resolution? -id: graphics/modes -plugin: shell -category_id: com.canonical.plainbox::graphics -command: graphics_modes_info.py -estimated_duration: 0.250 -_description: Collect info on graphics modes (screen resolution and refresh rate) -_summary: Collect info on graphics modes - id: graphics/color_depth plugin: shell category_id: com.canonical.plainbox::graphics |