Merge lp:~roadmr/checkbox/graphics_card_resource into lp:checkbox

Proposed by Daniel Manrique
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 2908
Merged at revision: 2906
Proposed branch: lp:~roadmr/checkbox/graphics_card_resource
Merge into: lp:checkbox
Diff against target: 150 lines (+61/-28)
5 files modified
plainbox-provider-certification-client/provider_whitelists/client-cert.whitelist (+1/-0)
plainbox-provider-certification-client/provider_whitelists/client-selftest.whitelist (+1/-0)
providers/plainbox-provider-checkbox/jobs/graphics.txt.in (+45/-28)
providers/plainbox-provider-resource-generic/bin/graphics_card_resource (+6/-0)
providers/plainbox-provider-resource-generic/jobs/resource.txt (+8/-0)
To merge this branch: bzr merge lp:~roadmr/checkbox/graphics_card_resource
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+214834@code.launchpad.net

Commit message

Adds a graphics_card_resource to enumerate graphics cards, converts a few jobs to use the resource to test multi-GPU systems.

Description of the change

Adds a graphics_card_resource to enumerate graphics cards, converts a few jobs to use the resource to test multi-GPU systems.

Generated job names look like:

graphics/1_maximum_resolution_Haswell-ULT_Integrated_Graphics_Controller

Jobs generated have the card index at the beginning, so for a given card you can add this to the whitelist to ensure all its tests run first:

graphics/1_.*

Or if you want all cards to test resolution, something like this works:

graphics/\d_resolution_change.*

Using the first syntax, we can ensure that per-card tests are clustered together, so that they can be run for card 1, then enabling card 2 and testing that:

graphics/1_.*
graphics/2_.*

I converted a few sample jobs to illustrate this mechanism and hopefully get the underlying code merged, but we'll probably need another MR to convert all the jobs we actually want to run per-card to this format, as well as updating the whitelists.

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks good to me, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plainbox-provider-certification-client/provider_whitelists/client-cert.whitelist'
2--- plainbox-provider-certification-client/provider_whitelists/client-cert.whitelist 2014-04-08 10:16:22 +0000
3+++ plainbox-provider-certification-client/provider_whitelists/client-cert.whitelist 2014-04-08 20:07:34 +0000
4@@ -85,6 +85,7 @@
5 graphics/display
6 graphics/minimum_resolution
7 graphics/maximum_resolution
8+graphics/\d_maximum_resolution.*
9 graphics/xorg-failsafe
10 graphics/xorg-process
11 graphics/cycle_resolution
12
13=== modified file 'plainbox-provider-certification-client/provider_whitelists/client-selftest.whitelist'
14--- plainbox-provider-certification-client/provider_whitelists/client-selftest.whitelist 2014-04-08 10:16:22 +0000
15+++ plainbox-provider-certification-client/provider_whitelists/client-selftest.whitelist 2014-04-08 20:07:34 +0000
16@@ -82,6 +82,7 @@
17 graphics/display
18 graphics/minimum_resolution
19 graphics/maximum_resolution
20+graphics/\d_maximum_resolution.*
21 graphics/xorg-failsafe
22 graphics/xorg-process
23 graphics/cycle_resolution
24
25=== modified file 'providers/plainbox-provider-checkbox/jobs/graphics.txt.in'
26--- providers/plainbox-provider-checkbox/jobs/graphics.txt.in 2014-04-07 16:49:50 +0000
27+++ providers/plainbox-provider-checkbox/jobs/graphics.txt.in 2014-04-08 20:07:34 +0000
28@@ -11,20 +11,28 @@
29 estimated_duration: 0.018
30 _description: Test to output the Xorg version
31
32-plugin: manual
33 id: graphics/resolution-change
34-depends: graphics/xorg-version
35-_description:
36- PURPOSE:
37- This test will verify that the GUI is usable after manually changing resolution
38- STEPS:
39- 1. Open the Displays application
40- 2. Select a new resolution from the dropdown list
41- 3. Click on Apply
42- 4. Select the original resolution from the dropdown list
43- 5. Click on Apply
44- VERIFICATION:
45- Did the resolution change as expected?
46+requires: device.category == 'VIDEO'
47+_description: Resolution change tests
48+plugin: local
49+command:
50+ cat <<'EOF' | run_templates -t -s 'graphics_card_resource'
51+ plugin: user-interact-verify
52+ id: graphics/`echo ${index}`_resolution-change_`echo "${product}" | sed 's/ /_/g;s/[^_a-zA-Z0-9-]//g'`
53+ depends: graphics/xorg-version
54+ _description:
55+ PURPOSE:
56+ This test will verify that the GUI is usable after manually changing resolution on the $product graphics card.
57+ STEPS:
58+ 1. Select the $product graphics card (a reboot may be necessary)
59+ 2. Open the Displays application
60+ 3. Select a new resolution from the dropdown list
61+ 4. Click on Apply
62+ 5. Select the original resolution from the dropdown list
63+ 6. Click on Apply
64+ VERIFICATION:
65+ Did the resolution on the $product graphics card change as expected?
66+ EOF
67
68 plugin: shell
69 id: graphics/xorg-process
70@@ -64,7 +72,7 @@
71 device.category == 'VIDEO'
72 package.name == 'qmlscene'
73 command: timeout 5 qmlscene --transparent --fullscreen $PLAINBOX_PROVIDER_DATA/resolution_test.qml
74-estimated_duration: 10
75+estimated_duration: 10.0
76 _description:
77 PURPOSE:
78 This test will verify the default display resolution
79@@ -85,21 +93,30 @@
80 .
81 https://help.ubuntu.com/community/Installation/SystemRequirements
82
83-plugin: user-verify
84 id: graphics/maximum_resolution
85-requires:
86- device.category == 'VIDEO'
87- package.name == 'zenity'
88-command: zenity --info --text "Maximum resolution: $(xrandr -q |grep -A 1 "connected\( primary\)* [0-9]" |tail -1 |awk '{print $1}')"
89-estimated_duration: 10
90-_description:
91- PURPOSE:
92- This test will verify the display is operating at its maximum supported resolution
93- STEPS:
94- 1. Consult the system's specifications and locate the screen's maximum supported resolution.
95- 2. Click on Test to display the maximum resolution that can be used by Ubuntu on the current display.
96- VERIFICATION:
97- Is this the display's maximum resolution?
98+requires: device.category == 'VIDEO'
99+_description: Maximum resolution tests
100+estimated_duration: 0.10
101+plugin: local
102+command:
103+ cat <<'EOF' | run_templates -t -s 'graphics_card_resource'
104+ plugin: user-verify
105+ id: graphics/`echo $index`_maximum_resolution_`echo "${product}" | sed 's/ /_/g;s/[^_a-zA-Z0-9-]//g'`
106+ requires:
107+ device.category == 'VIDEO'
108+ package.name == 'zenity'
109+ command: zenity --info --text "Maximum resolution: $(xrandr -q |grep -A 1 "connected\( primary\)* [0-9]" |tail -1 |awk '{print $1}')"
110+ estimated_duration: 10.0
111+ _description:
112+ PURPOSE:
113+ This test will verify the display is operating at its maximum supported resolution on the $product graphics card.
114+ STEPS:
115+ 1. Select the $product graphics card (a reboot may be necessary)
116+ 2. Consult the system's specifications and locate the screen's maximum supported resolution.
117+ 3. Click on Test to display the maximum resolution that can be used by Ubuntu on the current display.
118+ VERIFICATION:
119+ Is this the maximum resolution for the display connected to the $product graphics card?
120+ EOF
121
122 id: graphics/modes
123 plugin: shell
124
125=== added file 'providers/plainbox-provider-resource-generic/bin/graphics_card_resource'
126--- providers/plainbox-provider-resource-generic/bin/graphics_card_resource 1970-01-01 00:00:00 +0000
127+++ providers/plainbox-provider-resource-generic/bin/graphics_card_resource 2014-04-08 20:07:34 +0000
128@@ -0,0 +1,6 @@
129+#!/bin/bash
130+# graphics_card_resource was done as a script to be able to reuse it in
131+# graphics tests that need to be generated per-card.
132+udev_resource | filter_templates -w "category=VIDEO" | \
133+awk "BEGIN {RS=\"\"; FS=\"\n\"} { print \"index:\", NR; print; print \"\" }"
134+
135
136=== modified file 'providers/plainbox-provider-resource-generic/jobs/resource.txt'
137--- providers/plainbox-provider-resource-generic/jobs/resource.txt 2014-04-03 20:26:47 +0000
138+++ providers/plainbox-provider-resource-generic/jobs/resource.txt 2014-04-08 20:07:34 +0000
139@@ -196,3 +196,11 @@
140 1- Write a job that places a suitably-formatted file in $PLAINBOX_SESSION_SHARE
141 2- Update their whitelists to run that job *before* miscellanea/submission-resources
142 or the "requirements" resource job.
143+
144+id: graphics_card
145+estimated_duration: 0.05
146+plugin: resource
147+_description:
148+ Generate an entry for each graphics card present in the system.
149+command: graphics_card_resource
150+

Subscribers

People subscribed via source and target branches