Merge ~bettyl/plainbox-provider-checkbox:modify-graphics-tests into plainbox-provider-checkbox:master

Proposed by Betty Lin
Status: Merged
Approved by: Pierre Equoy
Approved revision: 0e017d59d7664941eb68decb810df1b4b5a45782
Merged at revision: c516d49f09775132f34eb2103087bd2b22679e37
Proposed branch: ~bettyl/plainbox-provider-checkbox:modify-graphics-tests
Merge into: plainbox-provider-checkbox:master
Diff against target: 265 lines (+83/-67)
2 files modified
units/graphics/test-plan.pxu (+72/-41)
units/suspend/suspend-graphics.pxu (+11/-26)
Reviewer Review Type Date Requested Status
Devices Certification Bot Needs Fixing
Pierre Equoy Approve
Betty Lin (community) Needs Resubmitting
Jonathan Cave (community) Approve
Review via email: mp+370810@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Betty Lin (bettyl) wrote :

@Jonathan

I think this MR can fix the two related bugs.
Please help to review, thanks!

review: Needs Resubmitting
Revision history for this message
Jonathan Cave (jocave) wrote :

I still think it would be good practice to split the one existing commit up in to a number of smaller commits to make it easier to follow the changes.

For instance the changing job ID suffixes from _auto to _graphics and the accompanying test plan changes could go in one commit on their are own.

Then following on from this, you could have a second commit that splits up the test plan in to smaller test plans.

One request below to not remove the job summary.

review: Needs Fixing
Revision history for this message
Betty Lin (bettyl) wrote :

@Jonathan

I split the commit. This one focus on suffix problem.
The others will propose MR soon.
Thanks!

review: Needs Resubmitting
Revision history for this message
Jonathan Cave (jocave) wrote :

Looks mostly fine. One question below..

review: Needs Information
Revision history for this message
Betty Lin (bettyl) wrote :

@Jonathan

Actually, I don't know why ... It was there before I modified the test plan:
https://git.launchpad.net/plainbox-provider-checkbox/tree/units/graphics/test-plan.pxu

I will move "suspend/2_resolution_before_suspend_.*_auto" to the test plan "graphics-discrete-gpu-cert-automated" in the next commit I send.

Thanks!

review: Needs Resubmitting
Revision history for this message
Betty Lin (bettyl) wrote :
Revision history for this message
Jonathan Cave (jocave) wrote :

Ok, thanks for reworking the MR. Let's land it.

review: Approve
Revision history for this message
Devices Certification Bot (ce-certification-qa) wrote :

The merge was fine but running tests failed.

[xenial] [09:02:34] starting container
Device project added to xenial-testing
[xenial] [09:02:43] provisioning container
[bionic] [09:02:55] starting container
Device project added to bionic-testing
[xenial] [09:03:05] Starting tests...
[xenial] Found a test script: ./requirements/container-tests-provider-checkbox
[bionic] [09:03:07] provisioning container
[bionic] [09:03:23] Starting tests...
[bionic] Found a test script: ./requirements/container-tests-provider-checkbox
[xenial] [09:04:48] container-tests-provider-checkbox: FAIL
[xenial] output: https://paste.ubuntu.com/p/s4NsqmKjKy/
[xenial] [09:04:51] Fixing file permissions in source directory
[xenial] [09:04:51] Destroying container
[bionic] [09:05:17] container-tests-provider-checkbox: FAIL
[bionic] output: https://paste.ubuntu.com/p/CK3pxDq2Z2/
[bionic] [09:05:20] Fixing file permissions in source directory
[bionic] [09:05:20] Destroying container

review: Needs Fixing
Revision history for this message
Betty Lin (bettyl) wrote :

Fixed the error which reported by validation of provider

review: Needs Resubmitting
Revision history for this message
Pierre Equoy (pieq) wrote :

LGTM. Thanks!!!

review: Approve
Revision history for this message
Pierre Equoy (pieq) wrote :

OK, there was an extra space below an "estimated_duration" line, causing issues with the provider validation. Betty removed it and checked it locally, so this time it should be all good!

review: Approve
Revision history for this message
Devices Certification Bot (ce-certification-qa) wrote :

The merge was fine but running tests failed.

[xenial] [02:53:29] starting container
Device project added to xenial-testing
[xenial] [02:53:38] provisioning container
[xenial] [02:53:58] Starting tests...
[xenial] Found a test script: ./requirements/container-tests-provider-checkbox
[bionic] [02:54:34] starting container
Device project added to bionic-testing
[bionic] [02:54:46] provisioning container
[bionic] [02:55:02] Starting tests...
[bionic] Found a test script: ./requirements/container-tests-provider-checkbox
[bionic] [02:57:02] container-tests-provider-checkbox: FAIL
[xenial] [02:57:02] container-tests-provider-checkbox: FAIL
[bionic] output: https://paste.ubuntu.com/p/x8RJgfJTrt/
[xenial] output: https://paste.ubuntu.com/p/3PGQrB35BB/
[xenial] [02:57:05] Fixing file permissions in source directory
[bionic] [02:57:05] Fixing file permissions in source directory
[xenial] [02:57:05] Destroying container
[bionic] [02:57:05] Destroying container

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/units/graphics/test-plan.pxu b/units/graphics/test-plan.pxu
2index 9085cb8..4537dfd 100644
3--- a/units/graphics/test-plan.pxu
4+++ b/units/graphics/test-plan.pxu
5@@ -51,8 +51,8 @@ include:
6 bootstrap_include:
7 graphics_card
8 nested_part:
9- com.canonical.certification::graphics-discrete-gpu-cert-manual
10 com.canonical.certification::graphics-discrete-gpu-cert-automated
11+ com.canonical.certification::graphics-discrete-gpu-cert-manual
12
13 id: graphics-discrete-gpu-cert-manual
14 unit: test plan
15@@ -60,7 +60,6 @@ _name: Graphics tests (discrete GPU) (Manual)
16 _description:
17 Graphics tests (discrete GPU) (Manual)
18 include:
19- graphics/2_auto_switch_card_.* certification-status=blocker
20 graphics/2_maximum_resolution_.* certification-status=blocker
21 graphics/2_glxgears_.* certification-status=blocker
22 graphics/2_rotation_.* certification-status=blocker
23@@ -75,37 +74,58 @@ _name: Graphics tests (discrete GPU) (Automated)
24 _description:
25 Graphics tests (discrete GPU) (Automated)
26 include:
27- graphics/2_valid_opengl_renderer_.* certification-status=blocker
28- graphics/2_driver_version_.* certification-status=blocker
29- graphics/2_compiz_check_.* certification-status=blocker
30+ graphics/2_auto_switch_card_.* certification-status=blocker
31+ graphics/2_valid_opengl_renderer_.* certification-status=blocker
32+ graphics/2_driver_version_.* certification-status=blocker
33+ graphics/2_compiz_check_.* certification-status=blocker
34 graphics/2_minimum_resolution_.*
35+ suspend/2_resolution_before_suspend_.*_auto certification-status=blocker
36 bootstrap_include:
37 graphics_card
38
39-
40 id: after-suspend-graphics-integrated-gpu-cert-full
41 unit: test plan
42 _name: After suspend tests (integrated GPU)
43 _description: After suspend tests (integrated GPU)
44 include:
45- graphics/1_auto_switch_card_.* certification-status=blocker
46- suspend/1_resolution_before_suspend_.*_auto certification-status=blocker
47+nested_part:
48+ com.canonical.certification::after-suspend-graphics-integrated-gpu-cert-automated
49+ com.canonical.certification::after-suspend-graphics-integrated-gpu-cert-manual
50+
51+id: after-suspend-graphics-integrated-gpu-cert-automated
52+unit: test plan
53+_name: After suspend tests (integrated GPU automated)
54+_description: After suspend tests (integrated GPU automated)
55+include:
56+ graphics/1_auto_switch_card_.* certification-status=blocker
57+ suspend/1_resolution_before_suspend_.*_auto certification-status=blocker
58+ suspend/1_suspend_after_switch_to_card_.*_auto certification-status=blocker
59 # The following after suspend jobs will automatically select the right suspend job
60 # depending on the amount of graphic cards available on the SUT:
61 # suspend/suspend_advanced (one GPU)
62 # or suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto (two GPUs)
63- suspend/1_suspend-time-check_.*_auto certification-status=non-blocker
64- suspend/1_suspend-single-log-attach_.*_auto
65- power-management/lid certification-status=blocker
66- power-management/lid_close certification-status=blocker
67- power-management/lid_open certification-status=blocker
68- suspend/1_compiz_check_after_suspend_.*_auto certification-status=blocker
69- suspend/1_driver_version_after_suspend_.*_auto certification-status=blocker
70- suspend/1_resolution_after_suspend_.*_auto certification-status=blocker
71- suspend/1_display_after_suspend_.*_auto certification-status=blocker
72- suspend/1_glxgears_after_suspend_.*_auto certification-status=blocker
73- suspend/1_video_after_suspend_.*_auto certification-status=blocker
74- suspend/1_cycle_resolutions_after_suspend_.*_auto certification-status=non-blocker
75+ suspend/1_suspend-time-check_.*_auto certification-status=non-blocker
76+ suspend/1_suspend-single-log-attach_.*_auto certification-status=non-blocker
77+ suspend/1_compiz_check_after_suspend_.*_auto certification-status=blocker
78+ suspend/1_driver_version_after_suspend_.*_auto certification-status=blocker
79+ suspend/1_resolution_after_suspend_.*_auto certification-status=blocker
80+
81+id: after-suspend-graphics-integrated-gpu-cert-manual
82+unit: test plan
83+_name: After suspend tests (integrated GPU manual)
84+_description: After suspend tests (integrated GPU manual)
85+include:
86+ # The following after suspend jobs will automatically select the right suspend job
87+ # depending on the amount of graphic cards available on the SUT:
88+ # suspend/suspend_advanced (one GPU)
89+ # or suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto (two GPUs)
90+ power-management/lid certification-status=blocker
91+ power-management/lid_close certification-status=blocker
92+ power-management/lid_open certification-status=blocker
93+ suspend/1_display_after_suspend_.*_graphics certification-status=blocker
94+ suspend/1_glxgears_after_suspend_.*_graphics certification-status=blocker
95+ suspend/1_video_after_suspend_.*_graphics certification-status=blocker
96+ suspend/1_cycle_resolutions_after_suspend_.*_graphics certification-status=non-blocker
97 suspend/1_xrandr_screens_after_suspend.tar.gz_auto
98
99 id: after-suspend-graphics-discrete-gpu-cert-full
100@@ -113,19 +133,32 @@ unit: test plan
101 _name: After suspend tests (discrete GPU)
102 _description: After suspend tests (discrete GPU)
103 include:
104- suspend/2_resolution_before_suspend_.*_auto certification-status=blocker
105- suspend/2_suspend_after_switch_to_card_.*_auto certification-status=blocker
106- suspend/2_suspend-time-check_.*_auto certification-status=non-blocker
107- suspend/2_suspend-single-log-attach_.*_auto
108- suspend/2_compiz_check_after_suspend_.*_auto certification-status=blocker
109- suspend/2_driver_version_after_suspend_.*_auto certification-status=blocker
110- suspend/2_resolution_after_suspend_.*_auto certification-status=blocker
111- suspend/2_display_after_suspend_.*_auto certification-status=blocker
112- suspend/2_glxgears_after_suspend_.*_auto certification-status=blocker
113- suspend/2_video_after_suspend_.*_auto certification-status=blocker
114- suspend/2_cycle_resolutions_after_suspend_.*_auto certification-status=non-blocker
115+nested_part:
116+ com.canonical.certification::after-suspend-graphics-discrete-gpu-cert-automated
117+ com.canonical.certification::after-suspend-graphics-discrete-gpu-cert-manual
118+
119+id: after-suspend-graphics-discrete-gpu-cert-automated
120+unit: test plan
121+_name: After suspend tests (discrete GPU automated)
122+_description: After suspend tests (discrete GPU automated)
123+include:
124+ suspend/2_suspend_after_switch_to_card_.*_auto certification-status=blocker
125+ suspend/2_suspend-time-check_.*_auto certification-status=non-blocker
126+ suspend/2_suspend-single-log-attach_.*_auto certification-status=non-blocker
127+ suspend/2_compiz_check_after_suspend_.*_auto certification-status=blocker
128+ suspend/2_driver_version_after_suspend_.*_auto certification-status=blocker
129+ suspend/2_resolution_after_suspend_.*_auto certification-status=blocker
130+
131+id: after-suspend-graphics-discrete-gpu-cert-manual
132+unit: test plan
133+_name: After suspend tests (discrete GPU manual)
134+_description: After suspend tests (discrete GPU manual)
135+include:
136+ suspend/2_display_after_suspend_.*_graphics certification-status=blocker
137+ suspend/2_glxgears_after_suspend_.*_graphics certification-status=blocker
138+ suspend/2_video_after_suspend_.*_graphics certification-status=blocker
139+ suspend/2_cycle_resolutions_after_suspend_.*_graphics certification-status=non-blocker
140 suspend/2_xrandr_screens_after_suspend_.*.tar.gz_auto
141- after-suspend-manual-monitor/2_dim_brightness_.* certification-status=blocker
142
143 id: graphics-integrated-gpu-cert-blockers
144 unit: test plan
145@@ -175,10 +208,9 @@ include:
146 suspend/1_compiz_check_after_suspend_.*_auto certification-status=blocker
147 suspend/1_driver_version_after_suspend_.*_auto certification-status=blocker
148 suspend/1_resolution_after_suspend_.*_auto certification-status=blocker
149- suspend/1_display_after_suspend_.*_auto certification-status=blocker
150- suspend/1_glxgears_after_suspend_.*_auto certification-status=blocker
151- suspend/1_video_after_suspend_.*_auto certification-status=blocker
152- after-suspend-manual-monitor/1_dim_brightness_.* certification-status=blocker
153+ suspend/1_display_after_suspend_.*_graphics certification-status=blocker
154+ suspend/1_glxgears_after_suspend_.*_graphics certification-status=blocker
155+ suspend/1_video_after_suspend_.*_graphics certification-status=blocker
156
157 id: after-suspend-graphics-discrete-gpu-cert-blockers
158 unit: test plan
159@@ -186,11 +218,10 @@ _name: After suspend tests (discrete GPU, certification blockers only)
160 _description: After suspend tests (discrete GPU, certification blockers only)
161 include:
162 suspend/2_resolution_before_suspend_.*_auto certification-status=blocker
163- suspend/2_suspend_after_switch_to_card_.*_auto certification-status=blocker
164+ suspend/2_suspend_after_switch_to_card_.*_graphics certification-status=blocker
165 suspend/2_compiz_check_after_suspend_.*_auto certification-status=blocker
166 suspend/2_driver_version_after_suspend_.*_auto certification-status=blocker
167 suspend/2_resolution_after_suspend_.*_auto certification-status=blocker
168- suspend/2_display_after_suspend_.*_auto certification-status=blocker
169- suspend/2_glxgears_after_suspend_.*_auto certification-status=blocker
170- suspend/2_video_after_suspend_.*_auto certification-status=blocker
171- after-suspend-manual-monitor/2_dim_brightness_.* certification-status=blocker
172+ suspend/2_display_after_suspend_.*_graphics certification-status=blocker
173+ suspend/2_glxgears_after_suspend_.*_graphics certification-status=blocker
174+ suspend/2_video_after_suspend_.*_graphics certification-status=blocker
175diff --git a/units/suspend/suspend-graphics.pxu b/units/suspend/suspend-graphics.pxu
176index be820a7..d4fe923 100644
177--- a/units/suspend/suspend-graphics.pxu
178+++ b/units/suspend/suspend-graphics.pxu
179@@ -14,7 +14,7 @@ command:
180 unit: template
181 template-resource: graphics_card
182 template-filter: graphics_card.prime_gpu_offload == 'Off'
183-plugin: user-interact-verify
184+plugin: shell
185 category_id: com.canonical.plainbox::suspend
186 id: suspend/{index}_suspend_after_switch_to_card_{product_slug}_auto
187 requires:
188@@ -24,27 +24,12 @@ after: graphics/{index}_auto_switch_card_{product_slug}
189 user: root
190 environ: PLAINBOX_SESSION_SHARE
191 command:
192- if type -P fwts >/dev/null; then
193- echo "Calling fwts"
194- set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log
195- else
196- echo "Calling sleep_test"
197- set -o pipefail; sleep_test -p | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log
198+ if [[ -v SNAP ]]; then
199+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
200 fi
201-estimated_duration: 90.0
202-_summary: Test suspend/resume after switching to {vendor} {product}
203-_description:
204- PURPOSE:
205- This test will check suspend and resume after switching to {vendor} {product} graphics card.
206- STEPS:
207- 1. Ensure you have switched to {vendor} {product} graphics card.
208- 2. Click "Test" and your system will suspend for about 30 - 60 seconds
209- 3. Observe the Power LED to see if it blinks or changes color during suspend
210- 4. If your system does not wake itself up after 60 seconds, please press the power button momentarily to wake the system manually
211- 5. If your system fails to wake at all and must be rebooted, restart System Testing after reboot and mark this test as Failed
212- VERIFICATION:
213- Did your system suspend and resume correctly after switching to {vendor} {product} graphics card?
214- (NOTE: Please only consider whether the system successfully suspended and resumed. Power/Suspend LED verification will occur after this test is completed.)
215+ set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log
216+estimated_duration: 1m30s
217+_summary: Test auto suspend/resume after switching to {vendor} {product}
218
219 unit: template
220 template-resource: graphics_card
221@@ -72,7 +57,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off'
222 template-engine: jinja2
223 plugin: manual
224 category_id: com.canonical.plainbox::suspend
225-id: suspend/{{ index }}_display_after_suspend_{{ product_slug }}_auto
226+id: suspend/{{ index }}_display_after_suspend_{{ product_slug }}_graphics
227 depends:
228 {%- if gpu_count > "1" %}
229 suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto
230@@ -94,7 +79,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off'
231 template-engine: jinja2
232 plugin: user-interact-verify
233 category_id: com.canonical.plainbox::suspend
234-id: suspend/{{ index }}_cycle_resolutions_after_suspend_{{ product_slug }}_auto
235+id: suspend/{{ index }}_cycle_resolutions_after_suspend_{{ product_slug }}_graphics
236 requires: package.name == 'xorg'
237 depends:
238 {%- if gpu_count > "1" %}
239@@ -120,7 +105,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off'
240 plugin: attachment
241 category_id: com.canonical.plainbox::suspend
242 id: suspend/{index}_xrandr_screens_after_suspend.tar.gz_auto
243-depends: suspend/{index}_cycle_resolutions_after_suspend_{product_slug}_auto
244+depends: suspend/{index}_cycle_resolutions_after_suspend_{product_slug}_graphics
245 command: [ -f $PLAINBOX_SESSION_SHARE/{index}_xrandr_screens_after_suspend.tgz ] && cat $PLAINBOX_SESSION_SHARE/{index}_xrandr_screens_after_suspend.tgz
246 _description: This attaches screenshots from the suspend/cycle_resolutions_after_suspend test to the results submission.
247
248@@ -150,7 +135,7 @@ template-resource: graphics_card
249 template-engine: jinja2
250 plugin: user-interact-verify
251 category_id: com.canonical.plainbox::suspend
252-id: suspend/{{ index }}_glxgears_after_suspend_{{ product_slug }}_auto
253+id: suspend/{{ index }}_glxgears_after_suspend_{{ product_slug }}_graphics
254 depends:
255 {%- if gpu_count > "1" %}
256 suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto
257@@ -176,7 +161,7 @@ _description:
258 unit: template
259 template-resource: graphics_card
260 template-engine: jinja2
261-id: suspend/{{ index }}_video_after_suspend_{{ product_slug }}_auto
262+id: suspend/{{ index }}_video_after_suspend_{{ product_slug }}_graphics
263 depends:
264 {%- if gpu_count > "1" %}
265 suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto

Subscribers

People subscribed via source and target branches