Merge ~teknoraver/snappy-hwe-snaps/+git/engineering-tests:bluez into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
- Git
- lp:~teknoraver/snappy-hwe-snaps/+git/engineering-tests
- bluez
- Merge into master
Status: | Merged |
---|---|
Approved by: | Simon Fels |
Approved revision: | bb7c92960b5e2ea60dd2c0cca23485b5e59e033e |
Merged at revision: | bcc21e5db99025cb02bea05df9d68472b9a23d2f |
Proposed branch: | ~teknoraver/snappy-hwe-snaps/+git/engineering-tests:bluez |
Merge into: | ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master |
Diff against target: |
585 lines (+406/-155) 4 files modified
bluez/units/general.pxu (+237/-0) bluez/units/hid.pxu (+87/-0) bluez/units/setup.pxu (+82/-0) dev/null (+0/-155) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Simon Fels | continuous-integration | Approve | |
System Enablement Bot | continuous-integration | Needs Fixing | |
Konrad Zapałowicz (community) | code | Approve | |
Jim Hodapp (community) | Needs Fixing | ||
Review via email: mp+316752@code.launchpad.net |
Commit message
Description of the change
Add bluez tests
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:8766f34a2c6
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Konrad Zapałowicz (kzapalowicz) wrote : | # |
It would be nice to have test category from .xls document map to a unit in plainbox - a separate pxu file. Also to keep it away from snap-related tests as these in the .xls have much more wider scope. Basically how the system with bluez installed behaves.
Im thinking of sth like:
general.pxu
|
+-- id: bluez/general/xxx1
+-- id: bluez/general/xxx2
hid.pxu
|
+-- id: bluez/hid/xxx1
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:d0b7575c0b4
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Jim Hodapp (jhodapp) wrote : | # |
> It would be nice to have test category from .xls document map to a unit in
> plainbox - a separate pxu file. Also to keep it away from snap-related tests
> as these in the .xls have much more wider scope. Basically how the system with
> bluez installed behaves.
>
> Im thinking of sth like:
>
> general.pxu
> |
> +-- id: bluez/general/xxx1
> +-- id: bluez/general/xxx2
>
> hid.pxu
> |
> +-- id: bluez/hid/xxx1
I agree with this Konrad, I think it's a very good idea to structure it this way.
Jim Hodapp (jhodapp) wrote : | # |
Looks good overall. Some changes inline below. Also, please make sure your use of a period at the end of a sentence is consistent for every sentence. Either use periods or don't use periods.
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2df9d2b27e7
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:ac8c9f55ff5
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Simon Fels (morphis) : | # |
Matteo Croce (teknoraver) : | # |
Konrad Zapałowicz (kzapalowicz) wrote : | # |
Looks good overall, better than previously however still needs some improvements. Comments inline below but in general
- Please focus on not mixing this tests sets/units with the previous, snap-related tests. The reason is that the test plan has a much wider scope and serves a different purpose. The snap-related tests are here for making sure that the snap itself works; The test plan is to make sure that the system with BT installed (either as a snap or as a .deb) behaves in a correct way. This is done on multiple layers, from the kernel through bluetoothctl to the UI.
- Make sure that the test id reflects the intent of the test case as well as uses the BT vocabulary so that it is easy to understand what the test is doing. we will be publishing the tests results therefore we would like the readers of such report be able to have the basic understanding without the need of reading the .pxu files.
- Please do not put multiple verification criteria in a single tests (like for HID). This is to provide a good granularity so that a test report can provide a meaningful results what exactly is and is not working.
- Please make the test id include the category name (from .xls) like bluez/general/
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:dbfadf59b7c
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:8c6db358522
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Konrad Zapałowicz (kzapalowicz) wrote : | # |
This is much better now, approving. That said I'm still a little bit concerned with the audio tests being present here [general] but this does not prevent this MR from being approved. I believe this is something we can solve later with when the investigation of how we structure tests story is completed, perhaps by introducing test plans and suits.
Simon Fels (morphis) wrote : | # |
Added a few comments. Generally there are instructions missing how certain things can be verified. We need to write these tests with the guideline that people not used to bluetooth/
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:5ccb8fef243
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Simon Fels (morphis) : | # |
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:bb7c92960b5
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Simon Fels (morphis) wrote : | # |
Approving for CI
Preview Diff
1 | diff --git a/bluez/units/bluez.pxu b/bluez/units/bluez.pxu |
2 | deleted file mode 100644 |
3 | index 682bb31..0000000 |
4 | --- a/bluez/units/bluez.pxu |
5 | +++ /dev/null |
6 | @@ -1,155 +0,0 @@ |
7 | -# Copyright 2016 Canonical Ltd. |
8 | -# All rights reserved. |
9 | -# |
10 | -# Written by: |
11 | -# Jim Hodapp <jim.hodapp@canonical.com> |
12 | - |
13 | -unit: category |
14 | -id: bluez |
15 | -_name: Bluez |
16 | - |
17 | -id: bluez/setup/ensure_interface_connection_setup |
18 | -category_id: bluez |
19 | -_description: Ensure that the bluez interface is connected |
20 | -plugin: manual |
21 | -_steps: |
22 | - 1. Connect required bluez slot/plug |
23 | - . |
24 | - $ sudo snap connect bluez:client bluez:service |
25 | - . |
26 | -_verification: |
27 | - Verify that you see the following when running snap interfaces bluez: |
28 | - bluez:service bluez:client |
29 | - |
30 | -id: bluez/scan/get_all |
31 | -category_id: bluez |
32 | -plugin: manual |
33 | -depends: bluez/setup/ensure_interface_connection_setup |
34 | -_summary: All Bluetooth devices in range are listed |
35 | -_purpose: |
36 | - Check if all powered on devices that are within range as listed. |
37 | -_steps: |
38 | - 1. Execute the following command to retrieve the list of all Bluetooth devices: |
39 | - . |
40 | - $ /snap/bin/bluez.bluetoothctl |
41 | - [bluetooth]# scan on |
42 | - . |
43 | -_verification: |
44 | - Your expected Bluetooth device(s) is/are shown in the output list such as: |
45 | - [NEW] Device 04:52:C7:0D:0C:03 QC 35s |
46 | - |
47 | -id: bluez/connection/pair_and_connect |
48 | -category_id: bluez |
49 | -plugin: manual |
50 | -depends: bluez/setup/ensure_interface_connection_setup |
51 | -_summary: A Bluetooth device of choice is paired and connected |
52 | -_purpose: |
53 | - Check if your Bluetooth device of choice can be paired to the host system. |
54 | -_steps: |
55 | - 1. Execute the following command to pair and connect your device to the host |
56 | - system using the address listed in the previous scan test: |
57 | - . |
58 | - [bluetooth]# pair <device_address> |
59 | - [bluetooth]# connect <device_address> |
60 | - . |
61 | -_verification: |
62 | - You should see output similar to the following: |
63 | - Attempting to pair with 04:52:C7:0D:0C:03 |
64 | - [CHG] Device 04:52:C7:0D:0C:03 Connected: yes |
65 | - [CHG] Device 04:52:C7:0D:0C:03 Modalias: bluetooth:v009Ep400Cd0106 |
66 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff |
67 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb |
68 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb |
69 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb |
70 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb |
71 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb |
72 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb |
73 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb |
74 | - [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes |
75 | - [CHG] Device 04:52:C7:0D:0C:03 Paired: yes |
76 | - Pairing successful |
77 | - [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no |
78 | - [CHG] Device 04:52:C7:0D:0C:03 Connected: no |
79 | - Attempting to connect to 04:52:C7:0D:0C:03 |
80 | - [CHG] Device 04:52:C7:0D:0C:03 Connected: yes |
81 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff |
82 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb |
83 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb |
84 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb |
85 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb |
86 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb |
87 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb |
88 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb |
89 | - [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb |
90 | - Connection successful |
91 | - [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes |
92 | - |
93 | -id: bluez/audio/a2dp_ubuntu_classic |
94 | -category_id: bluez |
95 | -plugin: manual |
96 | -depends: bluez/connection/pair_and_connect |
97 | -_summary: Stream audio to Bluetooth headset |
98 | -_purpose: |
99 | - Verify that you can stream music to a Bluetooth headset via A2DP on Ubuntu |
100 | - Classic. Note: Skip this test if not running Ubuntu Classic. |
101 | -_steps: |
102 | - 1. Follow the previous tests to list, pair and connect your headset. |
103 | - Navigate to the Sound panel in System Settings, select your headset device |
104 | - in the Output tab, and make sure that Mode is set to A2DP. Then press the |
105 | - Test Sound button and test each speaker. |
106 | -_verification: |
107 | - Verify that you can hear the test sound "Front left", "Front right" in each |
108 | - speaker respectively. |
109 | - |
110 | -id: bluez/audio/a2dp_disconnect |
111 | -category_id: bluez |
112 | -plugin: manual |
113 | -depends: bluez/audio/a2dp_ubuntu_classic |
114 | -_summary: Disconnect Bluetooth headset |
115 | -_purpose: |
116 | - Verify that you can disconnect Bluetooth headset while streaming and audio |
117 | - playback switches back to the device's primary speaker. |
118 | -_steps: |
119 | - 1. Follow the previous tests to start streaming audio to the headset via |
120 | - A2DP. Then execute the following command to disconnect the headset from |
121 | - active A2DP streaming: |
122 | - . |
123 | - [<device_name>]# disconnect <device_address> |
124 | -_verification: |
125 | - Verify that you see output similar to the following: |
126 | - Attempting to disconnect from 04:52:C7:0D:0C:03 |
127 | - [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no |
128 | - Successful disconnected |
129 | - [CHG] Device 04:52:C7:0D:0C:03 Connected: no |
130 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Key: 0x0110 |
131 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x40 |
132 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x0c |
133 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x02 |
134 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x41 |
135 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x00 |
136 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x61 |
137 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x71 |
138 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0xcd |
139 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x92 |
140 | - [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x6c |
141 | - |
142 | -id: bluez/connection/pair_and_connect_hid |
143 | -category_id: bluez |
144 | -plugin: manual |
145 | -depends: bluez/setup/ensure_interface_connection_setup |
146 | -_summary: A Bluetooth HID device (e.g. keyboard, mouse) is connected and paired |
147 | -_purpose: |
148 | - Check if your Bluetooth HID device of choice (e.g. keyboard, mouse) can be |
149 | - paired to the host system. |
150 | -_steps: |
151 | - 1. Execute the following command to pair and connect your HID device to the |
152 | - host system: |
153 | - . |
154 | - [bluetooth]# scan on |
155 | - [bluetooth]# pair <device_address> |
156 | - [bluetooth]# connect <device_address> |
157 | - . |
158 | -_verification: |
159 | - Open a text editor and make sure you can type text from the HID keyboard |
160 | - into the text box. If testing a mouse, ensure that the cursor moves when |
161 | - moving your HID mouse. |
162 | diff --git a/bluez/units/general.pxu b/bluez/units/general.pxu |
163 | new file mode 100644 |
164 | index 0000000..0bc60d3 |
165 | --- /dev/null |
166 | +++ b/bluez/units/general.pxu |
167 | @@ -0,0 +1,237 @@ |
168 | +# Copyright 2017 Canonical Ltd. |
169 | +# All rights reserved. |
170 | +# |
171 | +# Written by: |
172 | +# Jim Hodapp <jim.hodapp@canonical.com> |
173 | +# Matteo Croce <matteo.croce@canonical.com> |
174 | + |
175 | +unit: category |
176 | +id: bluez |
177 | +_name: Bluez |
178 | + |
179 | +id: bluez/setup/enabled_on_boot |
180 | +category_id: bluez |
181 | +_description: Ensure that Bluetooth is enabled on boot |
182 | +plugin: manual |
183 | +_steps: |
184 | + 1. Power on the DUT |
185 | + 2. If Bluetooth isn't enabled on first boot, enable it and reboot |
186 | + 3. Use "bluetoothctl" to check if there is an active adapter |
187 | + . |
188 | + $ bluetoothctl |
189 | +_verification: |
190 | + 1. Check that there is a Controller in the output, eg. |
191 | + [NEW] Controller 00:10:20:30:40:50 pi [default] |
192 | + |
193 | +id: bluez/setup/discoverable_by_default |
194 | +category_id: bluez |
195 | +_description: Ensure that DUT is discoverable by default |
196 | +plugin: manual |
197 | +_steps: |
198 | + 1. Type: |
199 | + . |
200 | + $ bluetoothctl |
201 | + [bluetooth]# show |
202 | + 2. Scan for devices from a smartphone |
203 | +_verification: |
204 | + 1. Verify that the DUT is discoverable by default, eg. |
205 | + . |
206 | + $ bluetoothctl |
207 | + [bluetooth]# show |
208 | + . |
209 | + contains the "Discoverable: yes" line |
210 | + 2. Check that the DUT can be discovered on the smartphone |
211 | + |
212 | +id: bluez/setup/bt_name_correct |
213 | +category_id: bluez |
214 | +_description: Ensure that the Bluetooth DUT name is correct |
215 | +plugin: manual |
216 | +_steps: |
217 | + 1. Type: |
218 | + . |
219 | + $ bluetoothctl |
220 | + [bluetooth]# show |
221 | +_verification: |
222 | + 1. Verify that the Bluetooth DUT name is correct: equals to the Ubuntu Touch |
223 | + device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch, |
224 | + or to the hostname for desktop |
225 | + . |
226 | + Name: Ubuntu |
227 | + |
228 | +id: bluez/setup/bt_name_correct_from_gadget |
229 | +category_id: bluez |
230 | +_description: Ensure that the Bluetooth DUT name advertise correctly |
231 | +plugin: manual |
232 | +_steps: |
233 | + 1. Scan for devices from a smartphone |
234 | +_verification: |
235 | + 1. Verify that the Bluetooth DUT name is correct as seen from an external device |
236 | + |
237 | +id: bluez/connection/gadget_reconnect_after_power_cycle |
238 | +category_id: bluez |
239 | +_description: Verify that gadgets will reconnect after power cycle |
240 | +plugin: manual |
241 | +_steps: |
242 | + 1. Connect a gadget with the DUT: |
243 | + . |
244 | + $ bluetoothctl |
245 | + bluetooth]# scan on |
246 | + Discovery started |
247 | + [NEW] Device 01:02:03:04:05:06 device |
248 | + [bluetooth]# pair 01:02:03:04:05:06 |
249 | + Pairing successful |
250 | + [bluetooth]# trust 01:02:03:04:05:06 |
251 | + Trusted |
252 | + [bluetooth]# connect 01:02:03:04:05:06 |
253 | + . |
254 | + 2. Power off the gadget |
255 | + 3. Power on the gadget |
256 | +_verification: |
257 | + 1. Verify that the paired gadget will reconnect automatically |
258 | + . |
259 | + $ bluetoothctl |
260 | + bluetooth]# info 01:02:03:04:05:06 |
261 | + . |
262 | + and check for "Connected: Yes" |
263 | + |
264 | +id: bluez/connection/reconnect_after_dut_reboot |
265 | +category_id: bluez |
266 | +_description: Verify that gadgets will reconnect after reboot |
267 | +plugin: manual |
268 | +depends: bluez/connection/gadget_reconnect_after_power_cycle |
269 | +_steps: |
270 | + 1. Pair a gadget with the DUT |
271 | + 2. Reboot the DUT |
272 | +_verification: |
273 | + 1. Verify that the paired gadget will reconnect after reboot |
274 | + |
275 | +id: bluez/connection/gadget_disconnect |
276 | +category_id: bluez |
277 | +_description: Verify that the connected gadget can be disconnected |
278 | +plugin: manual |
279 | +depends: bluez/connection/gadget_reconnect_after_power_cycle |
280 | +_steps: |
281 | + 1. Connect a gadget with the DUT |
282 | + 2. Disconnect it with: |
283 | + . |
284 | + $ bluetoothctl |
285 | + [bluetooth]# disconnect 01:02:03:04:05:06 |
286 | + . |
287 | +_verification: |
288 | + 1. Verify that the gadget is disconnected |
289 | + . |
290 | + $ bluetoothctl |
291 | + bluetooth]# info 01:02:03:04:05:06 |
292 | + . |
293 | + and check for "Connected: no" |
294 | + |
295 | +id: bluez/connection/gadget_can_be_forgotten |
296 | +category_id: bluez |
297 | +_description: Verify that the paired gadget can be forgotten |
298 | +plugin: manual |
299 | +depends: bluez/connection/gadget_reconnect_after_power_cycle |
300 | +_steps: |
301 | + 1. Pair a gadget with the DUT |
302 | + 2. Remove the pairing |
303 | + . |
304 | + $ bluetoothctl |
305 | + [bluetooth]# remove 01:02:03:04:05:06 |
306 | +_verification: |
307 | + 1. Verify that the paired gadget no longer appears in the gadgets list |
308 | + . |
309 | + $ bluetoothctl |
310 | + bluetooth]# info 01:02:03:04:05:06 |
311 | + . |
312 | + and check for "Paired: no" |
313 | + |
314 | +id: bluez/connection/gadget_paired_again |
315 | +category_id: bluez |
316 | +_description: Verify that forgotten gadgets can be paired again |
317 | +plugin: manual |
318 | +depends: bluez/connection/gadget_can_be_forgotten |
319 | +_steps: |
320 | + 1. Pair a gadget with the DUT |
321 | + 2. Remove the pairing |
322 | + 4. Pair the gadget a second time |
323 | +_verification: |
324 | + 1. Ensure that the gadget be paired again: |
325 | + . |
326 | + $ bluetoothctl |
327 | + bluetooth]# info 01:02:03:04:05:06 |
328 | + . |
329 | + and check for "Paired: yes" |
330 | + |
331 | +id: bluez/discoverable/dut_not_discoverable |
332 | +category_id: bluez |
333 | +_description: Verify that the DUT can disable discovery |
334 | +plugin: manual |
335 | +_steps: |
336 | + 1. Toggle the DUT Bluetooth visibility off: |
337 | + . |
338 | + $ bluetoothctl |
339 | + bluetooth]# discoverable off |
340 | + . |
341 | +_verification: |
342 | + 1. Ensure that the DUT can't be discovered from any other gadget |
343 | + |
344 | +id: bluez/discoverable/dut_discoverable |
345 | +category_id: bluez |
346 | +_description: Verify that the DUT can enable discovery |
347 | +plugin: manual |
348 | +_steps: |
349 | + 1. Toggle the DUT Bluetooth visibility on |
350 | + . |
351 | + $ bluetoothctl |
352 | + bluetooth]# discoverable on |
353 | + . |
354 | +_verification: |
355 | + 1. Ensure that the DUT can be discovered from other gadgets |
356 | + |
357 | +id: bluez/audio/a2dp_ubuntu_classic |
358 | +category_id: bluez |
359 | +plugin: manual |
360 | +depends: bluez/connection/pair_and_connect |
361 | +_summary: Stream audio to Bluetooth headset |
362 | +_purpose: |
363 | + Verify that you can stream music to a Bluetooth headset via A2DP on Ubuntu |
364 | + Classic. Note: Skip this test if not running Ubuntu Classic |
365 | +_steps: |
366 | + 1. Follow the previous tests to list, pair and connect your headset |
367 | + Navigate to the Sound panel in System Settings, select your headset device |
368 | + in the Output tab, and make sure that Mode is set to A2DP |
369 | + Then press the Test Sound button and test each speaker |
370 | +_verification: |
371 | + Verify that you can hear the test sound "Front left", "Front right" in each |
372 | + speaker respectively. |
373 | + |
374 | +id: bluez/audio/a2dp_disconnect |
375 | +category_id: bluez |
376 | +plugin: manual |
377 | +depends: bluez/audio/a2dp_ubuntu_classic |
378 | +_summary: Disconnect Bluetooth headset |
379 | +_purpose: |
380 | + Verify that you can disconnect Bluetooth headset while streaming and audio |
381 | + playback switches back to the DUT's primary speaker |
382 | +_steps: |
383 | + 1. Follow the previous tests to start streaming audio to the headset via |
384 | + A2DP. Then execute the following command to disconnect the headset from |
385 | + active A2DP streaming: |
386 | + . |
387 | + [<dut_name>]# disconnect <gadget_address> |
388 | +_verification: |
389 | + Verify that you see output similar to the following: |
390 | + Attempting to disconnect from 04:52:C7:0D:0C:03 |
391 | + [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no |
392 | + Successful disconnected |
393 | + [CHG] Device 04:52:C7:0D:0C:03 Connected: no |
394 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Key: 0x0110 |
395 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x40 |
396 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x0c |
397 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x02 |
398 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x41 |
399 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x00 |
400 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x61 |
401 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x71 |
402 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0xcd |
403 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x92 |
404 | + [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x6c |
405 | diff --git a/bluez/units/hid.pxu b/bluez/units/hid.pxu |
406 | new file mode 100644 |
407 | index 0000000..fda46e3 |
408 | --- /dev/null |
409 | +++ b/bluez/units/hid.pxu |
410 | @@ -0,0 +1,87 @@ |
411 | +# Copyright 2017 Canonical Ltd. |
412 | +# All rights reserved. |
413 | +# |
414 | +# Written by: |
415 | +# Matteo Croce <matteo.croce@canonical.com> |
416 | + |
417 | +unit: category |
418 | +id: bluez |
419 | +_name: Bluez |
420 | + |
421 | +id: bluez/hid/pair_and_connect_hid |
422 | +category_id: bluez |
423 | +plugin: manual |
424 | +depends: bluez/setup/ensure_interface_connection_setup |
425 | +_summary: A Bluetooth HID gadget (e.g. keyboard, mouse) is connected and paired |
426 | +_purpose: |
427 | + Check if your Bluetooth HID gadget of choice (e.g. keyboard, mouse) can be |
428 | + paired to the host system. |
429 | +_steps: |
430 | + 1. Execute the following command to pair and connect your HID gadget to the |
431 | + host system: |
432 | + . |
433 | + [bluetooth]# scan on |
434 | + [bluetooth]# scan off |
435 | + [bluetooth]# pair 01:02:03:04:05:06 |
436 | + [bluetooth]# connect 01:02:03:04:05:06 |
437 | + . |
438 | +_verification: |
439 | + Open a text editor and make sure you can type text from the HID keyboard |
440 | + into the text box. If testing a mouse, ensure that the cursor moves when |
441 | + moving your HID mouse |
442 | + |
443 | +id: bluez/hid/bt_mouse_works |
444 | +category_id: bluez |
445 | +_description: Verify that Bluetooth mice do work |
446 | +plugin: manual |
447 | +depends: bluez/setup/pair_and_connect_hid |
448 | +_steps: |
449 | + 1. Scan for a BT mouse and connect it to the DUT |
450 | +_verification: |
451 | + 1. Verify that the paired mouse can move the pointer |
452 | + 2. Verify that the device is automatically connected at boot |
453 | + 3. Verify that the device is automatically connected after resume from sleep |
454 | + |
455 | +id: bluez/hid/bt_keyboard_works |
456 | +category_id: bluez |
457 | +_description: Verify that Bluetooth keyboards do work |
458 | +plugin: manual |
459 | +_steps: |
460 | + 1. Scan for a BT keyboard and connect it to the DUT, eg. |
461 | + . |
462 | + $ bluetoothctl |
463 | + [bluetooth]# scan on |
464 | + [bluetooth]# scan off |
465 | + [bluetooth]# pair 01:02:03:04:05:06 |
466 | + Pairing successful |
467 | + [bluetooth]# trust 01:02:03:04:05:06 |
468 | + [bluetooth]# connect 01:02:03:04:05:06 |
469 | + Trusted |
470 | +_verification: |
471 | + 1. Verify that the paired keyboard can write in a text editor |
472 | + 2. Verify that the device is automatically connected at boot |
473 | + 3. Verify that the device is automatically connected after resume from sleep |
474 | + 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly |
475 | + |
476 | +id: bluez/hid/ble_mouse_works |
477 | +category_id: bluez |
478 | +_description: Verify that BLE mices do work |
479 | +plugin: manual |
480 | +_steps: |
481 | + 1. Pair a BLE mouse with the DUT. |
482 | +_verification: |
483 | + 1. Verify that the paired mouse can move the pointer |
484 | + 2. Verify that the device is automatically connected at boot |
485 | + 3. Verify that the device is automatically connected after resume from sleep |
486 | + |
487 | +id: bluez/hid/ble_keyboard_works |
488 | +category_id: bluez |
489 | +_description: Verify that BLE keyboards do work |
490 | +plugin: manual |
491 | +_steps: |
492 | + 1. Pair a BLE keyboard with the DUT. |
493 | +_verification: |
494 | + 1. Verify that the paired keyboard can write in a text editor |
495 | + 2. Verify that the device is automatically connected at boot |
496 | + 3. Verify that the device is automatically connected after resume from sleep |
497 | + 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly |
498 | diff --git a/bluez/units/setup.pxu b/bluez/units/setup.pxu |
499 | new file mode 100644 |
500 | index 0000000..ff42f94 |
501 | --- /dev/null |
502 | +++ b/bluez/units/setup.pxu |
503 | @@ -0,0 +1,82 @@ |
504 | +# Copyright 2017 Canonical Ltd. |
505 | +# All rights reserved. |
506 | +# |
507 | +# Written by: |
508 | +# Matteo Croce <matteo.croce@canonical.com> |
509 | + |
510 | +id: bluez/setup/ensure_interface_connection_setup |
511 | +category_id: bluez |
512 | +_description: Ensure that the bluez interface is connected |
513 | +plugin: manual |
514 | +_steps: |
515 | + 1. Connect required bluez slot/plug |
516 | + . |
517 | + $ sudo snap connect bluez:client bluez:service |
518 | + . |
519 | +_verification: |
520 | + Verify that you see the following when running snap interfaces bluez: |
521 | + bluez:service bluez:client |
522 | + |
523 | +id: bluez/scan/get_all |
524 | +category_id: bluez |
525 | +plugin: manual |
526 | +depends: bluez/setup/ensure_interface_connection_setup |
527 | +_summary: All Bluetooth gadgets in range are listed |
528 | +_purpose: |
529 | + Check if all powered on gadgets that are within range as listed. |
530 | +_steps: |
531 | + 1. Execute the following command to retrieve the list of all Bluetooth gadgets: |
532 | + . |
533 | + $ /snap/bin/bluez.bluetoothctl |
534 | + [bluetooth]# scan on |
535 | + . |
536 | +_verification: |
537 | + Your expected Bluetooth gadget(s) is/are shown in the output list such as: |
538 | + [NEW] Device 04:52:C7:0D:0C:03 QC 35s |
539 | + |
540 | +id: bluez/connection/pair_and_connect |
541 | +category_id: bluez |
542 | +plugin: manual |
543 | +depends: bluez/setup/ensure_interface_connection_setup |
544 | +_summary: A Bluetooth gadget of choice is paired and connected |
545 | +_purpose: |
546 | + Check if your Bluetooth gadget of choice can be paired to the host system. |
547 | +_steps: |
548 | + 1. Execute the following command to pair and connect your gadget to the host |
549 | + system using the address listed in the previous scan test: |
550 | + . |
551 | + [bluetooth]# pair <gadget_address> |
552 | + [bluetooth]# connect <gadget_address> |
553 | + . |
554 | +_verification: |
555 | + You should see output similar to the following: |
556 | + Attempting to pair with 04:52:C7:0D:0C:03 |
557 | + [CHG] Device 04:52:C7:0D:0C:03 Connected: yes |
558 | + [CHG] Device 04:52:C7:0D:0C:03 Modalias: bluetooth:v009Ep400Cd0106 |
559 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff |
560 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb |
561 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb |
562 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb |
563 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb |
564 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb |
565 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb |
566 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb |
567 | + [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes |
568 | + [CHG] Device 04:52:C7:0D:0C:03 Paired: yes |
569 | + Pairing successful |
570 | + [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no |
571 | + [CHG] Device 04:52:C7:0D:0C:03 Connected: no |
572 | + Attempting to connect to 04:52:C7:0D:0C:03 |
573 | + [CHG] Device 04:52:C7:0D:0C:03 Connected: yes |
574 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff |
575 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb |
576 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb |
577 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb |
578 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb |
579 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb |
580 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb |
581 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb |
582 | + [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb |
583 | + Connection successful |
584 | + [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes |
585 | + |
FAILED: Continuous integration, rev:ebf91453d9e 78da1d658f64e96 f2cd79d536b26c /jenkins. canonical. com/system- enablement/ job/generic- build-snap/ 878/ /jenkins. canonical. com/system- enablement/ job/generic- update- snap-mp/ 786/console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/system- enablement/ job/generic- build-snap/ 878/rebuild
https:/