Merge ~gary-wzl77/snappy-hwe-snaps/+git/engineering-tests:easy-openvpn into ~snappy-hwe-team/snappy-hwe-snaps/+git/easy-openvpn:master
- Git
- lp:~gary-wzl77/snappy-hwe-snaps/+git/engineering-tests
- easy-openvpn
- Merge into master
Status: | Superseded |
---|---|
Proposed branch: | ~gary-wzl77/snappy-hwe-snaps/+git/engineering-tests:easy-openvpn |
Merge into: | ~snappy-hwe-team/snappy-hwe-snaps/+git/easy-openvpn:master |
Diff against target: |
4931 lines (+4565/-0) (has conflicts) 56 files modified
.ci_tests_disabled (+1/-0) .gitignore (+7/-0) COPYING (+674/-0) MAINTAINERS (+5/-0) README.md (+82/-0) bin/plainbox-wrapper (+3/-0) bin/run-alsa-utils-tests (+5/-0) bin/run-bluez-tests (+5/-0) bin/run-captive-redirect-tests (+5/-0) bin/run-easy-openvpn-tests (+5/-0) bin/run-media-hub-tests (+5/-0) bin/run-modem-manager-tests (+5/-0) bin/run-network-manager-tests (+5/-0) bin/run-pulseaudio-tests (+5/-0) bin/run-serial-vault-tests (+5/-0) bin/run-snapweb-tests (+5/-0) bin/run-tests (+5/-0) bin/run-tpm-tests (+5/-0) bin/run-udisks2-tests (+5/-0) bin/run-upower-tests (+5/-0) bin/run-wifi-ap-tests (+5/-0) bin/run-wifi-connect-tests (+5/-0) bin/run-wireless-tools-tests (+5/-0) bin/run-wpa-supplicant-tests (+5/-0) com.canonical.se:engineering-tests/manage.py (+21/-0) com.canonical.se:engineering-tests/units/alsa/base.pxu (+47/-0) com.canonical.se:engineering-tests/units/alsa/device.pxu (+15/-0) com.canonical.se:engineering-tests/units/alsa/playback.pxu (+1/-0) com.canonical.se:engineering-tests/units/bluez/desktop.pxu (+142/-0) com.canonical.se:engineering-tests/units/bluez/general.pxu (+302/-0) com.canonical.se:engineering-tests/units/bluez/hid.pxu (+83/-0) com.canonical.se:engineering-tests/units/bluez/setup.pxu (+140/-0) com.canonical.se:engineering-tests/units/captive-redirect/captive-redirect.pxu (+102/-0) com.canonical.se:engineering-tests/units/easy-openvpn/easy-openvpn.pxu (+163/-0) com.canonical.se:engineering-tests/units/media-hub/media-hub-snap.pxu (+73/-0) com.canonical.se:engineering-tests/units/media-hub/media-hub.pxu (+65/-0) com.canonical.se:engineering-tests/units/modem-manager/modem-manager.pxu (+103/-0) com.canonical.se:engineering-tests/units/network-manager/network-manager.pxu (+379/-0) com.canonical.se:engineering-tests/units/network-manager/power_management.pxu (+31/-0) com.canonical.se:engineering-tests/units/network-manager/snap.pxu (+101/-0) com.canonical.se:engineering-tests/units/network-manager/wireless.pxu (+54/-0) com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu (+106/-0) com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu (+132/-0) com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu (+182/-0) com.canonical.se:engineering-tests/units/test-plan.pxu (+9/-0) com.canonical.se:engineering-tests/units/tpm/tpm.pxu (+135/-0) com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu (+319/-0) com.canonical.se:engineering-tests/units/upower/00_general.pxu (+52/-0) com.canonical.se:engineering-tests/units/upower/10_battery_powered.pxu (+129/-0) com.canonical.se:engineering-tests/units/upower/20_ac_powered.pxu (+49/-0) com.canonical.se:engineering-tests/units/wifi-ap/wifi-ap.pxu (+213/-0) com.canonical.se:engineering-tests/units/wifi-connect/wifi.connect.pxu (+202/-0) com.canonical.se:engineering-tests/units/wireless-tools/wireless-tools.pxu (+100/-0) com.canonical.se:engineering-tests/units/wpa-supplicant/00_general.pxu (+99/-0) com.canonical.se:engineering-tests/units/wpa-supplicant/10_network_manager.pxu (+74/-0) snapcraft.yaml (+80/-0) Conflict in .gitignore Conflict in MAINTAINERS Conflict in README.md Conflict in snapcraft.yaml |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Snappy HWE Team | Pending | ||
Review via email: mp+330324@code.launchpad.net |
This proposal has been superseded by a proposal from 2017-09-07.
Commit message
*.Add easy-openvpn plainbox test cases.
*.Unify tests launch command.
Description of the change
*.Add easy-openvpn plainbox test cases.
*.Unify tests launch command.
Unmerged commits
- 53ec506... by Gary.Wang
-
Add easy-openvpn plainbox test cases.
*.Add easy-openvpn plainbox test cases.
*.Unify tests launch command. - f7f5a4a... by System Enablement CI Bot <email address hidden>
-
Merge remote tracking branch serial-
vault-correctio ns Merge-Proposal: https:/
/code.launchpad .net/~rmescando n/snappy- hwe-snaps/ +git/engineerin g-tests/ +merge/ 330265 Author: Roberto Mier Escandón <email address hidden>
- Renamed back serial-vault-server to serial-vault
- Padding adjustment
- Updated some not correct tests content
- Verified manually everything - 943b774... by Roberto Mier Escandon
-
simplifying operation of checking connected interfaces
- 62e542a... by Roberto Mier Escandon
-
corrections of padding and some content in the tests after manually verifying
- 9d7d0c0... by System Enablement CI Bot <email address hidden>
-
Merge remote tracking branch serial-vault-ones
Merge-Proposal: https:/
/code.launchpad .net/~rmescando n/snappy- hwe-snaps/ +git/engineerin g-tests/ +merge/ 330071 Author: Roberto Mier Escandón <email address hidden>
Serial vault plainbox tests
- 7c24479... by System Enablement CI Bot <email address hidden>
-
Merge remote tracking branch nm-debug-
config- test Merge-Proposal: https:/
/code.launchpad .net/~rmescando n/snappy- hwe-snaps/ +git/engineerin g-tests/ +merge/ 327102 Author: Roberto Mier Escandón <email address hidden>
Plainbox tests for network manager debug enable/disable config option
- ec12899... by Roberto Mier Escandon
-
added serial vault plainbox tests
- a09e2d8... by Roberto Mier Escandon
-
Merge branch 'master' into nm-debug-
config- test - fe7eda6... by Roberto Mier Escandon
-
fixed typo
- 85bcdb9... by System Enablement CI Bot <email address hidden>
-
Merge remote tracking branch one-provider
Merge-Proposal: https:/
/code.launchpad .net/~kissiel/ snappy- hwe-snaps/ +git/engineerin g-tests/ +merge/ 328813 Author: Maciej Kisielewski <email address hidden>
Merge all the providers into one provider.
In order to empower reuse of the tests from engineering-tests, it's easier to have them in one plainbox-provider. They are all _provided_ by the same repository, so it IMHO makes more sense to have them grouped like that. Other (minor) benefit is having a lot less parts in snapcraft.yaml.
From a user's perspective nothing should change. I modified all the 'apps' to reflect the change in namespaces.
For your reviewing pleasure I baked a snap with what's on this branch:
https://drive. google. com/open? id=0B5xSCnq1- ZISdGtZLWpubkFw dDA Potential follow up:
1) I left the alsa-utils reference untouched. The tests from A-U repo could live here, referencing, and requiring the A-U snap. This would deduplicate quite a bit.
2) All the 'apps' use plainbox run with a regex from commandline. I think having clearly defined "Test Plans" could be easier to use, maintain and - most importantly - reused.
3) Having a mix of dedicated 'launchers' (in ./bin) and direct calls could be improved, especially as a part of 2)
4) Theoretically plainbox should not be called. checkbox-cli should be used instead. This doesn't have any major importance here, as the benefits wouldn't be used (auto re-running of automated tests, bootstrapping test plans, ...)
Preview Diff
1 | diff --git a/.ci_tests_disabled b/.ci_tests_disabled | |||
2 | 0 | new file mode 100644 | 0 | new file mode 100644 |
3 | index 0000000..b7db254 | |||
4 | --- /dev/null | |||
5 | +++ b/.ci_tests_disabled | |||
6 | @@ -0,0 +1 @@ | |||
7 | 1 | # Empty | ||
8 | diff --git a/.gitignore b/.gitignore | |||
9 | index a21d85c..322b331 100644 | |||
10 | --- a/.gitignore | |||
11 | +++ b/.gitignore | |||
12 | @@ -1,3 +1,4 @@ | |||
13 | 1 | <<<<<<< .gitignore | ||
14 | 1 | /*.snap | 2 | /*.snap |
15 | 2 | /parts | 3 | /parts |
16 | 3 | /prime | 4 | /prime |
17 | @@ -5,3 +6,9 @@ | |||
18 | 5 | /snap/plugins/__pycache__/ | 6 | /snap/plugins/__pycache__/ |
19 | 6 | /snap/.snapcraft/ | 7 | /snap/.snapcraft/ |
20 | 7 | .tests-extras | 8 | .tests-extras |
21 | 9 | ======= | ||
22 | 10 | canonical-se-engineering-tests_*.snap | ||
23 | 11 | parts/ | ||
24 | 12 | prime/ | ||
25 | 13 | stage/ | ||
26 | 14 | >>>>>>> .gitignore | ||
27 | diff --git a/COPYING b/COPYING | |||
28 | 8 | new file mode 100644 | 15 | new file mode 100644 |
29 | index 0000000..94a9ed0 | |||
30 | --- /dev/null | |||
31 | +++ b/COPYING | |||
32 | @@ -0,0 +1,674 @@ | |||
33 | 1 | GNU GENERAL PUBLIC LICENSE | ||
34 | 2 | Version 3, 29 June 2007 | ||
35 | 3 | |||
36 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | ||
37 | 5 | Everyone is permitted to copy and distribute verbatim copies | ||
38 | 6 | of this license document, but changing it is not allowed. | ||
39 | 7 | |||
40 | 8 | Preamble | ||
41 | 9 | |||
42 | 10 | The GNU General Public License is a free, copyleft license for | ||
43 | 11 | software and other kinds of works. | ||
44 | 12 | |||
45 | 13 | The licenses for most software and other practical works are designed | ||
46 | 14 | to take away your freedom to share and change the works. By contrast, | ||
47 | 15 | the GNU General Public License is intended to guarantee your freedom to | ||
48 | 16 | share and change all versions of a program--to make sure it remains free | ||
49 | 17 | software for all its users. We, the Free Software Foundation, use the | ||
50 | 18 | GNU General Public License for most of our software; it applies also to | ||
51 | 19 | any other work released this way by its authors. You can apply it to | ||
52 | 20 | your programs, too. | ||
53 | 21 | |||
54 | 22 | When we speak of free software, we are referring to freedom, not | ||
55 | 23 | price. Our General Public Licenses are designed to make sure that you | ||
56 | 24 | have the freedom to distribute copies of free software (and charge for | ||
57 | 25 | them if you wish), that you receive source code or can get it if you | ||
58 | 26 | want it, that you can change the software or use pieces of it in new | ||
59 | 27 | free programs, and that you know you can do these things. | ||
60 | 28 | |||
61 | 29 | To protect your rights, we need to prevent others from denying you | ||
62 | 30 | these rights or asking you to surrender the rights. Therefore, you have | ||
63 | 31 | certain responsibilities if you distribute copies of the software, or if | ||
64 | 32 | you modify it: responsibilities to respect the freedom of others. | ||
65 | 33 | |||
66 | 34 | For example, if you distribute copies of such a program, whether | ||
67 | 35 | gratis or for a fee, you must pass on to the recipients the same | ||
68 | 36 | freedoms that you received. You must make sure that they, too, receive | ||
69 | 37 | or can get the source code. And you must show them these terms so they | ||
70 | 38 | know their rights. | ||
71 | 39 | |||
72 | 40 | Developers that use the GNU GPL protect your rights with two steps: | ||
73 | 41 | (1) assert copyright on the software, and (2) offer you this License | ||
74 | 42 | giving you legal permission to copy, distribute and/or modify it. | ||
75 | 43 | |||
76 | 44 | For the developers' and authors' protection, the GPL clearly explains | ||
77 | 45 | that there is no warranty for this free software. For both users' and | ||
78 | 46 | authors' sake, the GPL requires that modified versions be marked as | ||
79 | 47 | changed, so that their problems will not be attributed erroneously to | ||
80 | 48 | authors of previous versions. | ||
81 | 49 | |||
82 | 50 | Some devices are designed to deny users access to install or run | ||
83 | 51 | modified versions of the software inside them, although the manufacturer | ||
84 | 52 | can do so. This is fundamentally incompatible with the aim of | ||
85 | 53 | protecting users' freedom to change the software. The systematic | ||
86 | 54 | pattern of such abuse occurs in the area of products for individuals to | ||
87 | 55 | use, which is precisely where it is most unacceptable. Therefore, we | ||
88 | 56 | have designed this version of the GPL to prohibit the practice for those | ||
89 | 57 | products. If such problems arise substantially in other domains, we | ||
90 | 58 | stand ready to extend this provision to those domains in future versions | ||
91 | 59 | of the GPL, as needed to protect the freedom of users. | ||
92 | 60 | |||
93 | 61 | Finally, every program is threatened constantly by software patents. | ||
94 | 62 | States should not allow patents to restrict development and use of | ||
95 | 63 | software on general-purpose computers, but in those that do, we wish to | ||
96 | 64 | avoid the special danger that patents applied to a free program could | ||
97 | 65 | make it effectively proprietary. To prevent this, the GPL assures that | ||
98 | 66 | patents cannot be used to render the program non-free. | ||
99 | 67 | |||
100 | 68 | The precise terms and conditions for copying, distribution and | ||
101 | 69 | modification follow. | ||
102 | 70 | |||
103 | 71 | TERMS AND CONDITIONS | ||
104 | 72 | |||
105 | 73 | 0. Definitions. | ||
106 | 74 | |||
107 | 75 | "This License" refers to version 3 of the GNU General Public License. | ||
108 | 76 | |||
109 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of | ||
110 | 78 | works, such as semiconductor masks. | ||
111 | 79 | |||
112 | 80 | "The Program" refers to any copyrightable work licensed under this | ||
113 | 81 | License. Each licensee is addressed as "you". "Licensees" and | ||
114 | 82 | "recipients" may be individuals or organizations. | ||
115 | 83 | |||
116 | 84 | To "modify" a work means to copy from or adapt all or part of the work | ||
117 | 85 | in a fashion requiring copyright permission, other than the making of an | ||
118 | 86 | exact copy. The resulting work is called a "modified version" of the | ||
119 | 87 | earlier work or a work "based on" the earlier work. | ||
120 | 88 | |||
121 | 89 | A "covered work" means either the unmodified Program or a work based | ||
122 | 90 | on the Program. | ||
123 | 91 | |||
124 | 92 | To "propagate" a work means to do anything with it that, without | ||
125 | 93 | permission, would make you directly or secondarily liable for | ||
126 | 94 | infringement under applicable copyright law, except executing it on a | ||
127 | 95 | computer or modifying a private copy. Propagation includes copying, | ||
128 | 96 | distribution (with or without modification), making available to the | ||
129 | 97 | public, and in some countries other activities as well. | ||
130 | 98 | |||
131 | 99 | To "convey" a work means any kind of propagation that enables other | ||
132 | 100 | parties to make or receive copies. Mere interaction with a user through | ||
133 | 101 | a computer network, with no transfer of a copy, is not conveying. | ||
134 | 102 | |||
135 | 103 | An interactive user interface displays "Appropriate Legal Notices" | ||
136 | 104 | to the extent that it includes a convenient and prominently visible | ||
137 | 105 | feature that (1) displays an appropriate copyright notice, and (2) | ||
138 | 106 | tells the user that there is no warranty for the work (except to the | ||
139 | 107 | extent that warranties are provided), that licensees may convey the | ||
140 | 108 | work under this License, and how to view a copy of this License. If | ||
141 | 109 | the interface presents a list of user commands or options, such as a | ||
142 | 110 | menu, a prominent item in the list meets this criterion. | ||
143 | 111 | |||
144 | 112 | 1. Source Code. | ||
145 | 113 | |||
146 | 114 | The "source code" for a work means the preferred form of the work | ||
147 | 115 | for making modifications to it. "Object code" means any non-source | ||
148 | 116 | form of a work. | ||
149 | 117 | |||
150 | 118 | A "Standard Interface" means an interface that either is an official | ||
151 | 119 | standard defined by a recognized standards body, or, in the case of | ||
152 | 120 | interfaces specified for a particular programming language, one that | ||
153 | 121 | is widely used among developers working in that language. | ||
154 | 122 | |||
155 | 123 | The "System Libraries" of an executable work include anything, other | ||
156 | 124 | than the work as a whole, that (a) is included in the normal form of | ||
157 | 125 | packaging a Major Component, but which is not part of that Major | ||
158 | 126 | Component, and (b) serves only to enable use of the work with that | ||
159 | 127 | Major Component, or to implement a Standard Interface for which an | ||
160 | 128 | implementation is available to the public in source code form. A | ||
161 | 129 | "Major Component", in this context, means a major essential component | ||
162 | 130 | (kernel, window system, and so on) of the specific operating system | ||
163 | 131 | (if any) on which the executable work runs, or a compiler used to | ||
164 | 132 | produce the work, or an object code interpreter used to run it. | ||
165 | 133 | |||
166 | 134 | The "Corresponding Source" for a work in object code form means all | ||
167 | 135 | the source code needed to generate, install, and (for an executable | ||
168 | 136 | work) run the object code and to modify the work, including scripts to | ||
169 | 137 | control those activities. However, it does not include the work's | ||
170 | 138 | System Libraries, or general-purpose tools or generally available free | ||
171 | 139 | programs which are used unmodified in performing those activities but | ||
172 | 140 | which are not part of the work. For example, Corresponding Source | ||
173 | 141 | includes interface definition files associated with source files for | ||
174 | 142 | the work, and the source code for shared libraries and dynamically | ||
175 | 143 | linked subprograms that the work is specifically designed to require, | ||
176 | 144 | such as by intimate data communication or control flow between those | ||
177 | 145 | subprograms and other parts of the work. | ||
178 | 146 | |||
179 | 147 | The Corresponding Source need not include anything that users | ||
180 | 148 | can regenerate automatically from other parts of the Corresponding | ||
181 | 149 | Source. | ||
182 | 150 | |||
183 | 151 | The Corresponding Source for a work in source code form is that | ||
184 | 152 | same work. | ||
185 | 153 | |||
186 | 154 | 2. Basic Permissions. | ||
187 | 155 | |||
188 | 156 | All rights granted under this License are granted for the term of | ||
189 | 157 | copyright on the Program, and are irrevocable provided the stated | ||
190 | 158 | conditions are met. This License explicitly affirms your unlimited | ||
191 | 159 | permission to run the unmodified Program. The output from running a | ||
192 | 160 | covered work is covered by this License only if the output, given its | ||
193 | 161 | content, constitutes a covered work. This License acknowledges your | ||
194 | 162 | rights of fair use or other equivalent, as provided by copyright law. | ||
195 | 163 | |||
196 | 164 | You may make, run and propagate covered works that you do not | ||
197 | 165 | convey, without conditions so long as your license otherwise remains | ||
198 | 166 | in force. You may convey covered works to others for the sole purpose | ||
199 | 167 | of having them make modifications exclusively for you, or provide you | ||
200 | 168 | with facilities for running those works, provided that you comply with | ||
201 | 169 | the terms of this License in conveying all material for which you do | ||
202 | 170 | not control copyright. Those thus making or running the covered works | ||
203 | 171 | for you must do so exclusively on your behalf, under your direction | ||
204 | 172 | and control, on terms that prohibit them from making any copies of | ||
205 | 173 | your copyrighted material outside their relationship with you. | ||
206 | 174 | |||
207 | 175 | Conveying under any other circumstances is permitted solely under | ||
208 | 176 | the conditions stated below. Sublicensing is not allowed; section 10 | ||
209 | 177 | makes it unnecessary. | ||
210 | 178 | |||
211 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. | ||
212 | 180 | |||
213 | 181 | No covered work shall be deemed part of an effective technological | ||
214 | 182 | measure under any applicable law fulfilling obligations under article | ||
215 | 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or | ||
216 | 184 | similar laws prohibiting or restricting circumvention of such | ||
217 | 185 | measures. | ||
218 | 186 | |||
219 | 187 | When you convey a covered work, you waive any legal power to forbid | ||
220 | 188 | circumvention of technological measures to the extent such circumvention | ||
221 | 189 | is effected by exercising rights under this License with respect to | ||
222 | 190 | the covered work, and you disclaim any intention to limit operation or | ||
223 | 191 | modification of the work as a means of enforcing, against the work's | ||
224 | 192 | users, your or third parties' legal rights to forbid circumvention of | ||
225 | 193 | technological measures. | ||
226 | 194 | |||
227 | 195 | 4. Conveying Verbatim Copies. | ||
228 | 196 | |||
229 | 197 | You may convey verbatim copies of the Program's source code as you | ||
230 | 198 | receive it, in any medium, provided that you conspicuously and | ||
231 | 199 | appropriately publish on each copy an appropriate copyright notice; | ||
232 | 200 | keep intact all notices stating that this License and any | ||
233 | 201 | non-permissive terms added in accord with section 7 apply to the code; | ||
234 | 202 | keep intact all notices of the absence of any warranty; and give all | ||
235 | 203 | recipients a copy of this License along with the Program. | ||
236 | 204 | |||
237 | 205 | You may charge any price or no price for each copy that you convey, | ||
238 | 206 | and you may offer support or warranty protection for a fee. | ||
239 | 207 | |||
240 | 208 | 5. Conveying Modified Source Versions. | ||
241 | 209 | |||
242 | 210 | You may convey a work based on the Program, or the modifications to | ||
243 | 211 | produce it from the Program, in the form of source code under the | ||
244 | 212 | terms of section 4, provided that you also meet all of these conditions: | ||
245 | 213 | |||
246 | 214 | a) The work must carry prominent notices stating that you modified | ||
247 | 215 | it, and giving a relevant date. | ||
248 | 216 | |||
249 | 217 | b) The work must carry prominent notices stating that it is | ||
250 | 218 | released under this License and any conditions added under section | ||
251 | 219 | 7. This requirement modifies the requirement in section 4 to | ||
252 | 220 | "keep intact all notices". | ||
253 | 221 | |||
254 | 222 | c) You must license the entire work, as a whole, under this | ||
255 | 223 | License to anyone who comes into possession of a copy. This | ||
256 | 224 | License will therefore apply, along with any applicable section 7 | ||
257 | 225 | additional terms, to the whole of the work, and all its parts, | ||
258 | 226 | regardless of how they are packaged. This License gives no | ||
259 | 227 | permission to license the work in any other way, but it does not | ||
260 | 228 | invalidate such permission if you have separately received it. | ||
261 | 229 | |||
262 | 230 | d) If the work has interactive user interfaces, each must display | ||
263 | 231 | Appropriate Legal Notices; however, if the Program has interactive | ||
264 | 232 | interfaces that do not display Appropriate Legal Notices, your | ||
265 | 233 | work need not make them do so. | ||
266 | 234 | |||
267 | 235 | A compilation of a covered work with other separate and independent | ||
268 | 236 | works, which are not by their nature extensions of the covered work, | ||
269 | 237 | and which are not combined with it such as to form a larger program, | ||
270 | 238 | in or on a volume of a storage or distribution medium, is called an | ||
271 | 239 | "aggregate" if the compilation and its resulting copyright are not | ||
272 | 240 | used to limit the access or legal rights of the compilation's users | ||
273 | 241 | beyond what the individual works permit. Inclusion of a covered work | ||
274 | 242 | in an aggregate does not cause this License to apply to the other | ||
275 | 243 | parts of the aggregate. | ||
276 | 244 | |||
277 | 245 | 6. Conveying Non-Source Forms. | ||
278 | 246 | |||
279 | 247 | You may convey a covered work in object code form under the terms | ||
280 | 248 | of sections 4 and 5, provided that you also convey the | ||
281 | 249 | machine-readable Corresponding Source under the terms of this License, | ||
282 | 250 | in one of these ways: | ||
283 | 251 | |||
284 | 252 | a) Convey the object code in, or embodied in, a physical product | ||
285 | 253 | (including a physical distribution medium), accompanied by the | ||
286 | 254 | Corresponding Source fixed on a durable physical medium | ||
287 | 255 | customarily used for software interchange. | ||
288 | 256 | |||
289 | 257 | b) Convey the object code in, or embodied in, a physical product | ||
290 | 258 | (including a physical distribution medium), accompanied by a | ||
291 | 259 | written offer, valid for at least three years and valid for as | ||
292 | 260 | long as you offer spare parts or customer support for that product | ||
293 | 261 | model, to give anyone who possesses the object code either (1) a | ||
294 | 262 | copy of the Corresponding Source for all the software in the | ||
295 | 263 | product that is covered by this License, on a durable physical | ||
296 | 264 | medium customarily used for software interchange, for a price no | ||
297 | 265 | more than your reasonable cost of physically performing this | ||
298 | 266 | conveying of source, or (2) access to copy the | ||
299 | 267 | Corresponding Source from a network server at no charge. | ||
300 | 268 | |||
301 | 269 | c) Convey individual copies of the object code with a copy of the | ||
302 | 270 | written offer to provide the Corresponding Source. This | ||
303 | 271 | alternative is allowed only occasionally and noncommercially, and | ||
304 | 272 | only if you received the object code with such an offer, in accord | ||
305 | 273 | with subsection 6b. | ||
306 | 274 | |||
307 | 275 | d) Convey the object code by offering access from a designated | ||
308 | 276 | place (gratis or for a charge), and offer equivalent access to the | ||
309 | 277 | Corresponding Source in the same way through the same place at no | ||
310 | 278 | further charge. You need not require recipients to copy the | ||
311 | 279 | Corresponding Source along with the object code. If the place to | ||
312 | 280 | copy the object code is a network server, the Corresponding Source | ||
313 | 281 | may be on a different server (operated by you or a third party) | ||
314 | 282 | that supports equivalent copying facilities, provided you maintain | ||
315 | 283 | clear directions next to the object code saying where to find the | ||
316 | 284 | Corresponding Source. Regardless of what server hosts the | ||
317 | 285 | Corresponding Source, you remain obligated to ensure that it is | ||
318 | 286 | available for as long as needed to satisfy these requirements. | ||
319 | 287 | |||
320 | 288 | e) Convey the object code using peer-to-peer transmission, provided | ||
321 | 289 | you inform other peers where the object code and Corresponding | ||
322 | 290 | Source of the work are being offered to the general public at no | ||
323 | 291 | charge under subsection 6d. | ||
324 | 292 | |||
325 | 293 | A separable portion of the object code, whose source code is excluded | ||
326 | 294 | from the Corresponding Source as a System Library, need not be | ||
327 | 295 | included in conveying the object code work. | ||
328 | 296 | |||
329 | 297 | A "User Product" is either (1) a "consumer product", which means any | ||
330 | 298 | tangible personal property which is normally used for personal, family, | ||
331 | 299 | or household purposes, or (2) anything designed or sold for incorporation | ||
332 | 300 | into a dwelling. In determining whether a product is a consumer product, | ||
333 | 301 | doubtful cases shall be resolved in favor of coverage. For a particular | ||
334 | 302 | product received by a particular user, "normally used" refers to a | ||
335 | 303 | typical or common use of that class of product, regardless of the status | ||
336 | 304 | of the particular user or of the way in which the particular user | ||
337 | 305 | actually uses, or expects or is expected to use, the product. A product | ||
338 | 306 | is a consumer product regardless of whether the product has substantial | ||
339 | 307 | commercial, industrial or non-consumer uses, unless such uses represent | ||
340 | 308 | the only significant mode of use of the product. | ||
341 | 309 | |||
342 | 310 | "Installation Information" for a User Product means any methods, | ||
343 | 311 | procedures, authorization keys, or other information required to install | ||
344 | 312 | and execute modified versions of a covered work in that User Product from | ||
345 | 313 | a modified version of its Corresponding Source. The information must | ||
346 | 314 | suffice to ensure that the continued functioning of the modified object | ||
347 | 315 | code is in no case prevented or interfered with solely because | ||
348 | 316 | modification has been made. | ||
349 | 317 | |||
350 | 318 | If you convey an object code work under this section in, or with, or | ||
351 | 319 | specifically for use in, a User Product, and the conveying occurs as | ||
352 | 320 | part of a transaction in which the right of possession and use of the | ||
353 | 321 | User Product is transferred to the recipient in perpetuity or for a | ||
354 | 322 | fixed term (regardless of how the transaction is characterized), the | ||
355 | 323 | Corresponding Source conveyed under this section must be accompanied | ||
356 | 324 | by the Installation Information. But this requirement does not apply | ||
357 | 325 | if neither you nor any third party retains the ability to install | ||
358 | 326 | modified object code on the User Product (for example, the work has | ||
359 | 327 | been installed in ROM). | ||
360 | 328 | |||
361 | 329 | The requirement to provide Installation Information does not include a | ||
362 | 330 | requirement to continue to provide support service, warranty, or updates | ||
363 | 331 | for a work that has been modified or installed by the recipient, or for | ||
364 | 332 | the User Product in which it has been modified or installed. Access to a | ||
365 | 333 | network may be denied when the modification itself materially and | ||
366 | 334 | adversely affects the operation of the network or violates the rules and | ||
367 | 335 | protocols for communication across the network. | ||
368 | 336 | |||
369 | 337 | Corresponding Source conveyed, and Installation Information provided, | ||
370 | 338 | in accord with this section must be in a format that is publicly | ||
371 | 339 | documented (and with an implementation available to the public in | ||
372 | 340 | source code form), and must require no special password or key for | ||
373 | 341 | unpacking, reading or copying. | ||
374 | 342 | |||
375 | 343 | 7. Additional Terms. | ||
376 | 344 | |||
377 | 345 | "Additional permissions" are terms that supplement the terms of this | ||
378 | 346 | License by making exceptions from one or more of its conditions. | ||
379 | 347 | Additional permissions that are applicable to the entire Program shall | ||
380 | 348 | be treated as though they were included in this License, to the extent | ||
381 | 349 | that they are valid under applicable law. If additional permissions | ||
382 | 350 | apply only to part of the Program, that part may be used separately | ||
383 | 351 | under those permissions, but the entire Program remains governed by | ||
384 | 352 | this License without regard to the additional permissions. | ||
385 | 353 | |||
386 | 354 | When you convey a copy of a covered work, you may at your option | ||
387 | 355 | remove any additional permissions from that copy, or from any part of | ||
388 | 356 | it. (Additional permissions may be written to require their own | ||
389 | 357 | removal in certain cases when you modify the work.) You may place | ||
390 | 358 | additional permissions on material, added by you to a covered work, | ||
391 | 359 | for which you have or can give appropriate copyright permission. | ||
392 | 360 | |||
393 | 361 | Notwithstanding any other provision of this License, for material you | ||
394 | 362 | add to a covered work, you may (if authorized by the copyright holders of | ||
395 | 363 | that material) supplement the terms of this License with terms: | ||
396 | 364 | |||
397 | 365 | a) Disclaiming warranty or limiting liability differently from the | ||
398 | 366 | terms of sections 15 and 16 of this License; or | ||
399 | 367 | |||
400 | 368 | b) Requiring preservation of specified reasonable legal notices or | ||
401 | 369 | author attributions in that material or in the Appropriate Legal | ||
402 | 370 | Notices displayed by works containing it; or | ||
403 | 371 | |||
404 | 372 | c) Prohibiting misrepresentation of the origin of that material, or | ||
405 | 373 | requiring that modified versions of such material be marked in | ||
406 | 374 | reasonable ways as different from the original version; or | ||
407 | 375 | |||
408 | 376 | d) Limiting the use for publicity purposes of names of licensors or | ||
409 | 377 | authors of the material; or | ||
410 | 378 | |||
411 | 379 | e) Declining to grant rights under trademark law for use of some | ||
412 | 380 | trade names, trademarks, or service marks; or | ||
413 | 381 | |||
414 | 382 | f) Requiring indemnification of licensors and authors of that | ||
415 | 383 | material by anyone who conveys the material (or modified versions of | ||
416 | 384 | it) with contractual assumptions of liability to the recipient, for | ||
417 | 385 | any liability that these contractual assumptions directly impose on | ||
418 | 386 | those licensors and authors. | ||
419 | 387 | |||
420 | 388 | All other non-permissive additional terms are considered "further | ||
421 | 389 | restrictions" within the meaning of section 10. If the Program as you | ||
422 | 390 | received it, or any part of it, contains a notice stating that it is | ||
423 | 391 | governed by this License along with a term that is a further | ||
424 | 392 | restriction, you may remove that term. If a license document contains | ||
425 | 393 | a further restriction but permits relicensing or conveying under this | ||
426 | 394 | License, you may add to a covered work material governed by the terms | ||
427 | 395 | of that license document, provided that the further restriction does | ||
428 | 396 | not survive such relicensing or conveying. | ||
429 | 397 | |||
430 | 398 | If you add terms to a covered work in accord with this section, you | ||
431 | 399 | must place, in the relevant source files, a statement of the | ||
432 | 400 | additional terms that apply to those files, or a notice indicating | ||
433 | 401 | where to find the applicable terms. | ||
434 | 402 | |||
435 | 403 | Additional terms, permissive or non-permissive, may be stated in the | ||
436 | 404 | form of a separately written license, or stated as exceptions; | ||
437 | 405 | the above requirements apply either way. | ||
438 | 406 | |||
439 | 407 | 8. Termination. | ||
440 | 408 | |||
441 | 409 | You may not propagate or modify a covered work except as expressly | ||
442 | 410 | provided under this License. Any attempt otherwise to propagate or | ||
443 | 411 | modify it is void, and will automatically terminate your rights under | ||
444 | 412 | this License (including any patent licenses granted under the third | ||
445 | 413 | paragraph of section 11). | ||
446 | 414 | |||
447 | 415 | However, if you cease all violation of this License, then your | ||
448 | 416 | license from a particular copyright holder is reinstated (a) | ||
449 | 417 | provisionally, unless and until the copyright holder explicitly and | ||
450 | 418 | finally terminates your license, and (b) permanently, if the copyright | ||
451 | 419 | holder fails to notify you of the violation by some reasonable means | ||
452 | 420 | prior to 60 days after the cessation. | ||
453 | 421 | |||
454 | 422 | Moreover, your license from a particular copyright holder is | ||
455 | 423 | reinstated permanently if the copyright holder notifies you of the | ||
456 | 424 | violation by some reasonable means, this is the first time you have | ||
457 | 425 | received notice of violation of this License (for any work) from that | ||
458 | 426 | copyright holder, and you cure the violation prior to 30 days after | ||
459 | 427 | your receipt of the notice. | ||
460 | 428 | |||
461 | 429 | Termination of your rights under this section does not terminate the | ||
462 | 430 | licenses of parties who have received copies or rights from you under | ||
463 | 431 | this License. If your rights have been terminated and not permanently | ||
464 | 432 | reinstated, you do not qualify to receive new licenses for the same | ||
465 | 433 | material under section 10. | ||
466 | 434 | |||
467 | 435 | 9. Acceptance Not Required for Having Copies. | ||
468 | 436 | |||
469 | 437 | You are not required to accept this License in order to receive or | ||
470 | 438 | run a copy of the Program. Ancillary propagation of a covered work | ||
471 | 439 | occurring solely as a consequence of using peer-to-peer transmission | ||
472 | 440 | to receive a copy likewise does not require acceptance. However, | ||
473 | 441 | nothing other than this License grants you permission to propagate or | ||
474 | 442 | modify any covered work. These actions infringe copyright if you do | ||
475 | 443 | not accept this License. Therefore, by modifying or propagating a | ||
476 | 444 | covered work, you indicate your acceptance of this License to do so. | ||
477 | 445 | |||
478 | 446 | 10. Automatic Licensing of Downstream Recipients. | ||
479 | 447 | |||
480 | 448 | Each time you convey a covered work, the recipient automatically | ||
481 | 449 | receives a license from the original licensors, to run, modify and | ||
482 | 450 | propagate that work, subject to this License. You are not responsible | ||
483 | 451 | for enforcing compliance by third parties with this License. | ||
484 | 452 | |||
485 | 453 | An "entity transaction" is a transaction transferring control of an | ||
486 | 454 | organization, or substantially all assets of one, or subdividing an | ||
487 | 455 | organization, or merging organizations. If propagation of a covered | ||
488 | 456 | work results from an entity transaction, each party to that | ||
489 | 457 | transaction who receives a copy of the work also receives whatever | ||
490 | 458 | licenses to the work the party's predecessor in interest had or could | ||
491 | 459 | give under the previous paragraph, plus a right to possession of the | ||
492 | 460 | Corresponding Source of the work from the predecessor in interest, if | ||
493 | 461 | the predecessor has it or can get it with reasonable efforts. | ||
494 | 462 | |||
495 | 463 | You may not impose any further restrictions on the exercise of the | ||
496 | 464 | rights granted or affirmed under this License. For example, you may | ||
497 | 465 | not impose a license fee, royalty, or other charge for exercise of | ||
498 | 466 | rights granted under this License, and you may not initiate litigation | ||
499 | 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that | ||
500 | 468 | any patent claim is infringed by making, using, selling, offering for | ||
501 | 469 | sale, or importing the Program or any portion of it. | ||
502 | 470 | |||
503 | 471 | 11. Patents. | ||
504 | 472 | |||
505 | 473 | A "contributor" is a copyright holder who authorizes use under this | ||
506 | 474 | License of the Program or a work on which the Program is based. The | ||
507 | 475 | work thus licensed is called the contributor's "contributor version". | ||
508 | 476 | |||
509 | 477 | A contributor's "essential patent claims" are all patent claims | ||
510 | 478 | owned or controlled by the contributor, whether already acquired or | ||
511 | 479 | hereafter acquired, that would be infringed by some manner, permitted | ||
512 | 480 | by this License, of making, using, or selling its contributor version, | ||
513 | 481 | but do not include claims that would be infringed only as a | ||
514 | 482 | consequence of further modification of the contributor version. For | ||
515 | 483 | purposes of this definition, "control" includes the right to grant | ||
516 | 484 | patent sublicenses in a manner consistent with the requirements of | ||
517 | 485 | this License. | ||
518 | 486 | |||
519 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free | ||
520 | 488 | patent license under the contributor's essential patent claims, to | ||
521 | 489 | make, use, sell, offer for sale, import and otherwise run, modify and | ||
522 | 490 | propagate the contents of its contributor version. | ||
523 | 491 | |||
524 | 492 | In the following three paragraphs, a "patent license" is any express | ||
525 | 493 | agreement or commitment, however denominated, not to enforce a patent | ||
526 | 494 | (such as an express permission to practice a patent or covenant not to | ||
527 | 495 | sue for patent infringement). To "grant" such a patent license to a | ||
528 | 496 | party means to make such an agreement or commitment not to enforce a | ||
529 | 497 | patent against the party. | ||
530 | 498 | |||
531 | 499 | If you convey a covered work, knowingly relying on a patent license, | ||
532 | 500 | and the Corresponding Source of the work is not available for anyone | ||
533 | 501 | to copy, free of charge and under the terms of this License, through a | ||
534 | 502 | publicly available network server or other readily accessible means, | ||
535 | 503 | then you must either (1) cause the Corresponding Source to be so | ||
536 | 504 | available, or (2) arrange to deprive yourself of the benefit of the | ||
537 | 505 | patent license for this particular work, or (3) arrange, in a manner | ||
538 | 506 | consistent with the requirements of this License, to extend the patent | ||
539 | 507 | license to downstream recipients. "Knowingly relying" means you have | ||
540 | 508 | actual knowledge that, but for the patent license, your conveying the | ||
541 | 509 | covered work in a country, or your recipient's use of the covered work | ||
542 | 510 | in a country, would infringe one or more identifiable patents in that | ||
543 | 511 | country that you have reason to believe are valid. | ||
544 | 512 | |||
545 | 513 | If, pursuant to or in connection with a single transaction or | ||
546 | 514 | arrangement, you convey, or propagate by procuring conveyance of, a | ||
547 | 515 | covered work, and grant a patent license to some of the parties | ||
548 | 516 | receiving the covered work authorizing them to use, propagate, modify | ||
549 | 517 | or convey a specific copy of the covered work, then the patent license | ||
550 | 518 | you grant is automatically extended to all recipients of the covered | ||
551 | 519 | work and works based on it. | ||
552 | 520 | |||
553 | 521 | A patent license is "discriminatory" if it does not include within | ||
554 | 522 | the scope of its coverage, prohibits the exercise of, or is | ||
555 | 523 | conditioned on the non-exercise of one or more of the rights that are | ||
556 | 524 | specifically granted under this License. You may not convey a covered | ||
557 | 525 | work if you are a party to an arrangement with a third party that is | ||
558 | 526 | in the business of distributing software, under which you make payment | ||
559 | 527 | to the third party based on the extent of your activity of conveying | ||
560 | 528 | the work, and under which the third party grants, to any of the | ||
561 | 529 | parties who would receive the covered work from you, a discriminatory | ||
562 | 530 | patent license (a) in connection with copies of the covered work | ||
563 | 531 | conveyed by you (or copies made from those copies), or (b) primarily | ||
564 | 532 | for and in connection with specific products or compilations that | ||
565 | 533 | contain the covered work, unless you entered into that arrangement, | ||
566 | 534 | or that patent license was granted, prior to 28 March 2007. | ||
567 | 535 | |||
568 | 536 | Nothing in this License shall be construed as excluding or limiting | ||
569 | 537 | any implied license or other defenses to infringement that may | ||
570 | 538 | otherwise be available to you under applicable patent law. | ||
571 | 539 | |||
572 | 540 | 12. No Surrender of Others' Freedom. | ||
573 | 541 | |||
574 | 542 | If conditions are imposed on you (whether by court order, agreement or | ||
575 | 543 | otherwise) that contradict the conditions of this License, they do not | ||
576 | 544 | excuse you from the conditions of this License. If you cannot convey a | ||
577 | 545 | covered work so as to satisfy simultaneously your obligations under this | ||
578 | 546 | License and any other pertinent obligations, then as a consequence you may | ||
579 | 547 | not convey it at all. For example, if you agree to terms that obligate you | ||
580 | 548 | to collect a royalty for further conveying from those to whom you convey | ||
581 | 549 | the Program, the only way you could satisfy both those terms and this | ||
582 | 550 | License would be to refrain entirely from conveying the Program. | ||
583 | 551 | |||
584 | 552 | 13. Use with the GNU Affero General Public License. | ||
585 | 553 | |||
586 | 554 | Notwithstanding any other provision of this License, you have | ||
587 | 555 | permission to link or combine any covered work with a work licensed | ||
588 | 556 | under version 3 of the GNU Affero General Public License into a single | ||
589 | 557 | combined work, and to convey the resulting work. The terms of this | ||
590 | 558 | License will continue to apply to the part which is the covered work, | ||
591 | 559 | but the special requirements of the GNU Affero General Public License, | ||
592 | 560 | section 13, concerning interaction through a network will apply to the | ||
593 | 561 | combination as such. | ||
594 | 562 | |||
595 | 563 | 14. Revised Versions of this License. | ||
596 | 564 | |||
597 | 565 | The Free Software Foundation may publish revised and/or new versions of | ||
598 | 566 | the GNU General Public License from time to time. Such new versions will | ||
599 | 567 | be similar in spirit to the present version, but may differ in detail to | ||
600 | 568 | address new problems or concerns. | ||
601 | 569 | |||
602 | 570 | Each version is given a distinguishing version number. If the | ||
603 | 571 | Program specifies that a certain numbered version of the GNU General | ||
604 | 572 | Public License "or any later version" applies to it, you have the | ||
605 | 573 | option of following the terms and conditions either of that numbered | ||
606 | 574 | version or of any later version published by the Free Software | ||
607 | 575 | Foundation. If the Program does not specify a version number of the | ||
608 | 576 | GNU General Public License, you may choose any version ever published | ||
609 | 577 | by the Free Software Foundation. | ||
610 | 578 | |||
611 | 579 | If the Program specifies that a proxy can decide which future | ||
612 | 580 | versions of the GNU General Public License can be used, that proxy's | ||
613 | 581 | public statement of acceptance of a version permanently authorizes you | ||
614 | 582 | to choose that version for the Program. | ||
615 | 583 | |||
616 | 584 | Later license versions may give you additional or different | ||
617 | 585 | permissions. However, no additional obligations are imposed on any | ||
618 | 586 | author or copyright holder as a result of your choosing to follow a | ||
619 | 587 | later version. | ||
620 | 588 | |||
621 | 589 | 15. Disclaimer of Warranty. | ||
622 | 590 | |||
623 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | ||
624 | 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | ||
625 | 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY | ||
626 | 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, | ||
627 | 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
628 | 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM | ||
629 | 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF | ||
630 | 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | ||
631 | 599 | |||
632 | 600 | 16. Limitation of Liability. | ||
633 | 601 | |||
634 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
635 | 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS | ||
636 | 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY | ||
637 | 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE | ||
638 | 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF | ||
639 | 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD | ||
640 | 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), | ||
641 | 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF | ||
642 | 610 | SUCH DAMAGES. | ||
643 | 611 | |||
644 | 612 | 17. Interpretation of Sections 15 and 16. | ||
645 | 613 | |||
646 | 614 | If the disclaimer of warranty and limitation of liability provided | ||
647 | 615 | above cannot be given local legal effect according to their terms, | ||
648 | 616 | reviewing courts shall apply local law that most closely approximates | ||
649 | 617 | an absolute waiver of all civil liability in connection with the | ||
650 | 618 | Program, unless a warranty or assumption of liability accompanies a | ||
651 | 619 | copy of the Program in return for a fee. | ||
652 | 620 | |||
653 | 621 | END OF TERMS AND CONDITIONS | ||
654 | 622 | |||
655 | 623 | How to Apply These Terms to Your New Programs | ||
656 | 624 | |||
657 | 625 | If you develop a new program, and you want it to be of the greatest | ||
658 | 626 | possible use to the public, the best way to achieve this is to make it | ||
659 | 627 | free software which everyone can redistribute and change under these terms. | ||
660 | 628 | |||
661 | 629 | To do so, attach the following notices to the program. It is safest | ||
662 | 630 | to attach them to the start of each source file to most effectively | ||
663 | 631 | state the exclusion of warranty; and each file should have at least | ||
664 | 632 | the "copyright" line and a pointer to where the full notice is found. | ||
665 | 633 | |||
666 | 634 | <one line to give the program's name and a brief idea of what it does.> | ||
667 | 635 | Copyright (C) <year> <name of author> | ||
668 | 636 | |||
669 | 637 | This program is free software: you can redistribute it and/or modify | ||
670 | 638 | it under the terms of the GNU General Public License as published by | ||
671 | 639 | the Free Software Foundation, either version 3 of the License, or | ||
672 | 640 | (at your option) any later version. | ||
673 | 641 | |||
674 | 642 | This program is distributed in the hope that it will be useful, | ||
675 | 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
676 | 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
677 | 645 | GNU General Public License for more details. | ||
678 | 646 | |||
679 | 647 | You should have received a copy of the GNU General Public License | ||
680 | 648 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
681 | 649 | |||
682 | 650 | Also add information on how to contact you by electronic and paper mail. | ||
683 | 651 | |||
684 | 652 | If the program does terminal interaction, make it output a short | ||
685 | 653 | notice like this when it starts in an interactive mode: | ||
686 | 654 | |||
687 | 655 | <program> Copyright (C) <year> <name of author> | ||
688 | 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | ||
689 | 657 | This is free software, and you are welcome to redistribute it | ||
690 | 658 | under certain conditions; type `show c' for details. | ||
691 | 659 | |||
692 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate | ||
693 | 661 | parts of the General Public License. Of course, your program's commands | ||
694 | 662 | might be different; for a GUI interface, you would use an "about box". | ||
695 | 663 | |||
696 | 664 | You should also get your employer (if you work as a programmer) or school, | ||
697 | 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. | ||
698 | 666 | For more information on this, and how to apply and follow the GNU GPL, see | ||
699 | 667 | <http://www.gnu.org/licenses/>. | ||
700 | 668 | |||
701 | 669 | The GNU General Public License does not permit incorporating your program | ||
702 | 670 | into proprietary programs. If your program is a subroutine library, you | ||
703 | 671 | may consider it more useful to permit linking proprietary applications with | ||
704 | 672 | the library. If this is what you want to do, use the GNU Lesser General | ||
705 | 673 | Public License instead of this License. But first, please read | ||
706 | 674 | <http://www.gnu.org/philosophy/why-not-lgpl.html>. | ||
707 | diff --git a/MAINTAINERS b/MAINTAINERS | |||
708 | index b9d3341..28c67ed 100644 | |||
709 | --- a/MAINTAINERS | |||
710 | +++ b/MAINTAINERS | |||
711 | @@ -1,2 +1,7 @@ | |||
712 | 1 | <<<<<<< MAINTAINERS | ||
713 | 1 | Casey Marshall <casey.marshall@canonical.com> | 2 | Casey Marshall <casey.marshall@canonical.com> |
714 | 2 | Gary Wang <gary.wang@canonical.com> | 3 | Gary Wang <gary.wang@canonical.com> |
715 | 4 | ======= | ||
716 | 5 | Jim Hodapp <jim.hodapp@canonical.com> | ||
717 | 6 | Simon Fels <simon.fels@canonical.com> | ||
718 | 7 | >>>>>>> MAINTAINERS | ||
719 | diff --git a/README.md b/README.md | |||
720 | index 120c043..e9488b8 100644 | |||
721 | --- a/README.md | |||
722 | +++ b/README.md | |||
723 | @@ -1,3 +1,4 @@ | |||
724 | 1 | <<<<<<< README.md | ||
725 | 1 | # Easy OpenVPN | 2 | # Easy OpenVPN |
726 | 2 | 3 | ||
727 | 3 | This project builds a snap for easy OpenVPN setup and installation. It was | 4 | This project builds a snap for easy OpenVPN setup and installation. It was |
728 | @@ -97,3 +98,84 @@ This will run the test case under spread/main/installation folder. | |||
729 | 97 | You can specify the `SNAP_CHANNEL` environment variable to install a snap from a specific channel for the testing as well. | 98 | You can specify the `SNAP_CHANNEL` environment variable to install a snap from a specific channel for the testing as well. |
730 | 98 | 99 | ||
731 | 99 | $ SNAP_CHANNEL=candidate spread spread/main/installation | 100 | $ SNAP_CHANNEL=candidate spread spread/main/installation |
732 | 101 | ======= | ||
733 | 102 | # canonical-se-engineering-tests | ||
734 | 103 | |||
735 | 104 | Engineering tests for the System Enablement team | ||
736 | 105 | |||
737 | 106 | ## What is this? | ||
738 | 107 | |||
739 | 108 | A snap providing a set of tests to verify functionality of | ||
740 | 109 | the snaps produced by the System Enablement team at Canonical. | ||
741 | 110 | |||
742 | 111 | It currently covers test cases for the following snaps | ||
743 | 112 | |||
744 | 113 | * alsa-utils | ||
745 | 114 | * bluez | ||
746 | 115 | * captive-redirect | ||
747 | 116 | * modem-manager | ||
748 | 117 | * network-manager | ||
749 | 118 | * pulse-audio | ||
750 | 119 | * tpm1.2 | ||
751 | 120 | * udisks2 | ||
752 | 121 | * upower | ||
753 | 122 | * wifi-ap | ||
754 | 123 | * wifi-connect | ||
755 | 124 | * wireless-tools | ||
756 | 125 | * wpa-supplicant | ||
757 | 126 | * media-hub | ||
758 | 127 | * snapweb | ||
759 | 128 | * serial-vault | ||
760 | 129 | * easy-openvpn | ||
761 | 130 | |||
762 | 131 | |||
763 | 132 | ## How can I run the tests? | ||
764 | 133 | |||
765 | 134 | First you have to install the current version of the snap from | ||
766 | 135 | the public Ubuntu store or take a self built one. | ||
767 | 136 | |||
768 | 137 | $ sudo snap install canonical-se-engineering-tests | ||
769 | 138 | |||
770 | 139 | Also make sure to install the prerequisite snap packages before | ||
771 | 140 | running the tests: | ||
772 | 141 | |||
773 | 142 | $ sudo snap install bluez modem-manager network-manager | ||
774 | 143 | |||
775 | 144 | TODO The media-hub framework is not yet snapified. Instructions need to | ||
776 | 145 | be added here when that happens. | ||
777 | 146 | |||
778 | 147 | Afterwards you have new commands available in /snap/bin you | ||
779 | 148 | can use to run all available test cases. The first command | ||
780 | 149 | runs all of the tests and the other ones run individual test | ||
781 | 150 | categories related to the command's name. | ||
782 | 151 | |||
783 | 152 | $ /snap/bin/canonical-se-engineering-tests.alsa-utils | ||
784 | 153 | $ /snap/bin/canonical-se-engineering-tests.bluez | ||
785 | 154 | $ /snap/bin/canonical-se-engineering-tests.media-hub | ||
786 | 155 | $ /snap/bin/canonical-se-engineering-tests.modem-manager | ||
787 | 156 | $ /snap/bin/canonical-se-engineering-tests.network-manager | ||
788 | 157 | $ /snap/bin/canonical-se-engineering-tests.plainbox | ||
789 | 158 | $ /snap/bin/canonical-se-engineering-tests.pulseaudio | ||
790 | 159 | $ /snap/bin/canonical-se-engineering-tests.tpm | ||
791 | 160 | $ /snap/bin/canonical-se-engineering-tests.udisks2 | ||
792 | 161 | $ /snap/bin/canonical-se-engineering-tests.upower | ||
793 | 162 | $ /snap/bin/canonical-se-engineering-tests.wifi-ap | ||
794 | 163 | $ /snap/bin/canonical-se-engineering-tests.wifi-connect | ||
795 | 164 | $ /snap/bin/canonical-se-engineering-tests.wireless-tools | ||
796 | 165 | $ /snap/bin/canonical-se-engineering-tests.snapweb | ||
797 | 166 | $ /snap/bin/canonical-se-engineering-tests.easy-openvpn | ||
798 | 167 | |||
799 | 168 | ## How can I contribute new tests? | ||
800 | 169 | |||
801 | 170 | If you want to add tests you can get a introduction in the | ||
802 | 171 | underlying framework plainbox on its documentation website | ||
803 | 172 | at https://plainbox.readthedocs.io/en/latest/ | ||
804 | 173 | |||
805 | 174 | All tests are currently stored in the subdirectory tests/unit | ||
806 | 175 | of this git repository. We currently add a single .pxu file | ||
807 | 176 | per snap but this can easily change when necessary. | ||
808 | 177 | |||
809 | 178 | Once you've implemented your tests you can send them for | ||
810 | 179 | inclusion as merge proposal against the launchpad git | ||
811 | 180 | repository lp:~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests | ||
812 | 181 | >>>>>>> README.md | ||
813 | diff --git a/bin/plainbox-wrapper b/bin/plainbox-wrapper | |||
814 | 100 | new file mode 100755 | 182 | new file mode 100755 |
815 | index 0000000..444a758 | |||
816 | --- /dev/null | |||
817 | +++ b/bin/plainbox-wrapper | |||
818 | @@ -0,0 +1,3 @@ | |||
819 | 1 | #!/bin/sh | ||
820 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
821 | 3 | exec python3 $(which plainbox) "$@" | ||
822 | diff --git a/bin/run-alsa-utils-tests b/bin/run-alsa-utils-tests | |||
823 | 0 | new file mode 100755 | 4 | new file mode 100755 |
824 | index 0000000..d22e3cb | |||
825 | --- /dev/null | |||
826 | +++ b/bin/run-alsa-utils-tests | |||
827 | @@ -0,0 +1,5 @@ | |||
828 | 1 | #!/bin/sh | ||
829 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
830 | 3 | exec python3 $(which plainbox) \ | ||
831 | 4 | run -i '2017.com.canonical.se::alsa_utils.*' \ | ||
832 | 5 | "$@" | ||
833 | diff --git a/bin/run-bluez-tests b/bin/run-bluez-tests | |||
834 | 0 | new file mode 100755 | 6 | new file mode 100755 |
835 | index 0000000..dee47c0 | |||
836 | --- /dev/null | |||
837 | +++ b/bin/run-bluez-tests | |||
838 | @@ -0,0 +1,5 @@ | |||
839 | 1 | #!/bin/sh | ||
840 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
841 | 3 | exec python3 $(which plainbox) \ | ||
842 | 4 | run -i '2017.com.canonical.se::bluez.*' \ | ||
843 | 5 | "$@" | ||
844 | diff --git a/bin/run-captive-redirect-tests b/bin/run-captive-redirect-tests | |||
845 | 0 | new file mode 100755 | 6 | new file mode 100755 |
846 | index 0000000..3887d71 | |||
847 | --- /dev/null | |||
848 | +++ b/bin/run-captive-redirect-tests | |||
849 | @@ -0,0 +1,5 @@ | |||
850 | 1 | #!/bin/sh | ||
851 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
852 | 3 | exec python3 $(which plainbox) \ | ||
853 | 4 | run -i '2017.com.canonical.se::captive_redirect.*' \ | ||
854 | 5 | "$@" | ||
855 | diff --git a/bin/run-easy-openvpn-tests b/bin/run-easy-openvpn-tests | |||
856 | 0 | new file mode 100755 | 6 | new file mode 100755 |
857 | index 0000000..1a5f2ae | |||
858 | --- /dev/null | |||
859 | +++ b/bin/run-easy-openvpn-tests | |||
860 | @@ -0,0 +1,5 @@ | |||
861 | 1 | #!/bin/sh | ||
862 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
863 | 3 | exec python3 $(which plainbox) \ | ||
864 | 4 | run -i '2017.com.canonical.se::easy_openvpn.*' \ | ||
865 | 5 | "$@" | ||
866 | diff --git a/bin/run-media-hub-tests b/bin/run-media-hub-tests | |||
867 | 0 | new file mode 100755 | 6 | new file mode 100755 |
868 | index 0000000..295c791 | |||
869 | --- /dev/null | |||
870 | +++ b/bin/run-media-hub-tests | |||
871 | @@ -0,0 +1,5 @@ | |||
872 | 1 | #!/bin/sh | ||
873 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
874 | 3 | exec python3 $(which plainbox) \ | ||
875 | 4 | run -i '2017.com.canonical.se::media_hub.*' \ | ||
876 | 5 | "$@" | ||
877 | diff --git a/bin/run-modem-manager-tests b/bin/run-modem-manager-tests | |||
878 | 0 | new file mode 100755 | 6 | new file mode 100755 |
879 | index 0000000..3233da5 | |||
880 | --- /dev/null | |||
881 | +++ b/bin/run-modem-manager-tests | |||
882 | @@ -0,0 +1,5 @@ | |||
883 | 1 | #!/bin/sh | ||
884 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
885 | 3 | exec python3 $(which plainbox) \ | ||
886 | 4 | run -i '2017.com.canonical.se::modem_manager.*' \ | ||
887 | 5 | "$@" | ||
888 | diff --git a/bin/run-network-manager-tests b/bin/run-network-manager-tests | |||
889 | 0 | new file mode 100755 | 6 | new file mode 100755 |
890 | index 0000000..8d48253 | |||
891 | --- /dev/null | |||
892 | +++ b/bin/run-network-manager-tests | |||
893 | @@ -0,0 +1,5 @@ | |||
894 | 1 | #!/bin/sh | ||
895 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
896 | 3 | exec python3 $(which plainbox) \ | ||
897 | 4 | run -i '2017.com.canonical.se::network_manager.*' \ | ||
898 | 5 | "$@" | ||
899 | diff --git a/bin/run-pulseaudio-tests b/bin/run-pulseaudio-tests | |||
900 | 0 | new file mode 100755 | 6 | new file mode 100755 |
901 | index 0000000..395e8eb | |||
902 | --- /dev/null | |||
903 | +++ b/bin/run-pulseaudio-tests | |||
904 | @@ -0,0 +1,5 @@ | |||
905 | 1 | #!/bin/sh | ||
906 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
907 | 3 | exec python3 $(which plainbox) \ | ||
908 | 4 | run -i '2017.com.canonical.se::pulseaudio.*' \ | ||
909 | 5 | "$@" | ||
910 | diff --git a/bin/run-serial-vault-tests b/bin/run-serial-vault-tests | |||
911 | 0 | new file mode 100755 | 6 | new file mode 100755 |
912 | index 0000000..06537aa | |||
913 | --- /dev/null | |||
914 | +++ b/bin/run-serial-vault-tests | |||
915 | @@ -0,0 +1,5 @@ | |||
916 | 1 | #!/bin/sh | ||
917 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
918 | 3 | exec python3 $(which plainbox) \ | ||
919 | 4 | run -i '2017.com.canonical.se::serial_vault.*' \ | ||
920 | 5 | "$@" | ||
921 | diff --git a/bin/run-snapweb-tests b/bin/run-snapweb-tests | |||
922 | 0 | new file mode 100755 | 6 | new file mode 100755 |
923 | index 0000000..fcb1791 | |||
924 | --- /dev/null | |||
925 | +++ b/bin/run-snapweb-tests | |||
926 | @@ -0,0 +1,5 @@ | |||
927 | 1 | #!/bin/sh | ||
928 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
929 | 3 | exec python3 $(which plainbox) \ | ||
930 | 4 | run -i '2017.com.canonical.se::snapweb.*' \ | ||
931 | 5 | "$@" | ||
932 | diff --git a/bin/run-tests b/bin/run-tests | |||
933 | 0 | new file mode 100755 | 6 | new file mode 100755 |
934 | index 0000000..bac4db2 | |||
935 | --- /dev/null | |||
936 | +++ b/bin/run-tests | |||
937 | @@ -0,0 +1,5 @@ | |||
938 | 1 | #!/bin/sh | ||
939 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
940 | 3 | exec python3 $(which plainbox) \ | ||
941 | 4 | run -i '2016.com.canonical.system-enablement::.*' \ | ||
942 | 5 | "$@" | ||
943 | diff --git a/bin/run-tpm-tests b/bin/run-tpm-tests | |||
944 | 0 | new file mode 100755 | 6 | new file mode 100755 |
945 | index 0000000..5c08021 | |||
946 | --- /dev/null | |||
947 | +++ b/bin/run-tpm-tests | |||
948 | @@ -0,0 +1,5 @@ | |||
949 | 1 | #!/bin/sh | ||
950 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
951 | 3 | exec python3 $(which plainbox) \ | ||
952 | 4 | run -i '2017.com.canonical.se::tpm.*' \ | ||
953 | 5 | "$@" | ||
954 | diff --git a/bin/run-udisks2-tests b/bin/run-udisks2-tests | |||
955 | 0 | new file mode 100755 | 6 | new file mode 100755 |
956 | index 0000000..73fac7a | |||
957 | --- /dev/null | |||
958 | +++ b/bin/run-udisks2-tests | |||
959 | @@ -0,0 +1,5 @@ | |||
960 | 1 | #!/bin/sh | ||
961 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
962 | 3 | exec python3 $(which plainbox) \ | ||
963 | 4 | run -i '2017.com.canonical.se::udisks2.*' \ | ||
964 | 5 | "$@" | ||
965 | diff --git a/bin/run-upower-tests b/bin/run-upower-tests | |||
966 | 0 | new file mode 100755 | 6 | new file mode 100755 |
967 | index 0000000..9bb3b9e | |||
968 | --- /dev/null | |||
969 | +++ b/bin/run-upower-tests | |||
970 | @@ -0,0 +1,5 @@ | |||
971 | 1 | #!/bin/sh | ||
972 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
973 | 3 | exec python3 $(which plainbox) \ | ||
974 | 4 | run -i '2017.com.canonical.se::upower.*' \ | ||
975 | 5 | "$@" | ||
976 | diff --git a/bin/run-wifi-ap-tests b/bin/run-wifi-ap-tests | |||
977 | 0 | new file mode 100755 | 6 | new file mode 100755 |
978 | index 0000000..f69ac83 | |||
979 | --- /dev/null | |||
980 | +++ b/bin/run-wifi-ap-tests | |||
981 | @@ -0,0 +1,5 @@ | |||
982 | 1 | #!/bin/sh | ||
983 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
984 | 3 | exec python3 $(which plainbox) \ | ||
985 | 4 | run -i '2017.com.canonical.se::wifi_ap.*' \ | ||
986 | 5 | "$@" | ||
987 | diff --git a/bin/run-wifi-connect-tests b/bin/run-wifi-connect-tests | |||
988 | 0 | new file mode 100755 | 6 | new file mode 100755 |
989 | index 0000000..58776f1 | |||
990 | --- /dev/null | |||
991 | +++ b/bin/run-wifi-connect-tests | |||
992 | @@ -0,0 +1,5 @@ | |||
993 | 1 | #!/bin/sh | ||
994 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
995 | 3 | exec python3 $(which plainbox) \ | ||
996 | 4 | run -i '2017.com.canonical.se::wifi-connect.*' \ | ||
997 | 5 | "$@" | ||
998 | diff --git a/bin/run-wireless-tools-tests b/bin/run-wireless-tools-tests | |||
999 | 0 | new file mode 100755 | 6 | new file mode 100755 |
1000 | index 0000000..491c041 | |||
1001 | --- /dev/null | |||
1002 | +++ b/bin/run-wireless-tools-tests | |||
1003 | @@ -0,0 +1,5 @@ | |||
1004 | 1 | #!/bin/sh | ||
1005 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
1006 | 3 | exec python3 $(which plainbox) \ | ||
1007 | 4 | run -i '2017.com.canonical.se::wireless-tools.*' \ | ||
1008 | 5 | "$@" | ||
1009 | diff --git a/bin/run-wpa-supplicant-tests b/bin/run-wpa-supplicant-tests | |||
1010 | 0 | new file mode 100755 | 6 | new file mode 100755 |
1011 | index 0000000..7251334 | |||
1012 | --- /dev/null | |||
1013 | +++ b/bin/run-wpa-supplicant-tests | |||
1014 | @@ -0,0 +1,5 @@ | |||
1015 | 1 | #!/bin/sh | ||
1016 | 2 | export PATH="$PATH:$SNAP/usr/sbin" | ||
1017 | 3 | exec python3 $(which plainbox) \ | ||
1018 | 4 | run -i '2017.com.canonical.se::wpa_supplicant.*' \ | ||
1019 | 5 | "$@" | ||
1020 | diff --git a/com.canonical.se:engineering-tests/manage.py b/com.canonical.se:engineering-tests/manage.py | |||
1021 | 0 | new file mode 100755 | 6 | new file mode 100755 |
1022 | index 0000000..6a27365 | |||
1023 | --- /dev/null | |||
1024 | +++ b/com.canonical.se:engineering-tests/manage.py | |||
1025 | @@ -0,0 +1,21 @@ | |||
1026 | 1 | #!/usr/bin/env python3 | ||
1027 | 2 | from plainbox.provider_manager import setup, N_ | ||
1028 | 3 | |||
1029 | 4 | # You can inject other stuff here but please don't go overboard. | ||
1030 | 5 | # | ||
1031 | 6 | # In particular, if you need comprehensive compilation support to get | ||
1032 | 7 | # your bin/ populated then please try to discuss that with us in the | ||
1033 | 8 | # upstream project IRC channel #checkbox on irc.freenode.net. | ||
1034 | 9 | |||
1035 | 10 | # NOTE: one thing that you could do here, that makes a lot of sense, | ||
1036 | 11 | # is to compute version somehow. This may vary depending on the | ||
1037 | 12 | # context of your provider. Future version of PlainBox will offer git, | ||
1038 | 13 | # bzr and mercurial integration using the versiontools library | ||
1039 | 14 | # (optional) | ||
1040 | 15 | |||
1041 | 16 | setup( | ||
1042 | 17 | name='2017.com.canonical.se:engineering-tests', | ||
1043 | 18 | version="1.0", | ||
1044 | 19 | description=N_("The com.canonical.se:engineering-tests provider"), | ||
1045 | 20 | gettext_domain="com_canonical_se_engineering-tests", | ||
1046 | 21 | ) | ||
1047 | diff --git a/com.canonical.se:engineering-tests/units/alsa/base.pxu b/com.canonical.se:engineering-tests/units/alsa/base.pxu | |||
1048 | 0 | new file mode 100644 | 22 | new file mode 100644 |
1049 | index 0000000..077a012 | |||
1050 | --- /dev/null | |||
1051 | +++ b/com.canonical.se:engineering-tests/units/alsa/base.pxu | |||
1052 | @@ -0,0 +1,47 @@ | |||
1053 | 1 | # Copyright (c) 2017 Canonical Ltd. | ||
1054 | 2 | # All rights resevered. | ||
1055 | 3 | # | ||
1056 | 4 | # Written by: | ||
1057 | 5 | # Simon Fels <simon.fels@canonical.com> | ||
1058 | 6 | |||
1059 | 7 | unit: category | ||
1060 | 8 | id: alsa_utils | ||
1061 | 9 | _name: Alsa utilities | ||
1062 | 10 | |||
1063 | 11 | id: alsa_utils/setup/automatic_plug_connection | ||
1064 | 12 | category_id: alsa_utils | ||
1065 | 13 | _description: | ||
1066 | 14 | Ensure that all interfaces needed by the alsa-utils snap are | ||
1067 | 15 | automatically connected. | ||
1068 | 16 | plugin: shell | ||
1069 | 17 | command: | ||
1070 | 18 | snap interfaces | grep -Pzq ":home +alsa-utils" | ||
1071 | 19 | snap interfaces | grep -Pzq ":alsa +alsa-utils" | ||
1072 | 20 | estimated_duration: 1s | ||
1073 | 21 | flags: preserve-locale | ||
1074 | 22 | |||
1075 | 23 | id: alsa_utils/setup/automatic_aliases | ||
1076 | 24 | category_id: alsa_utils | ||
1077 | 25 | _description: | ||
1078 | 26 | Ensure that all aliases provided by the snap are automatically setup. | ||
1079 | 27 | plugin: shell | ||
1080 | 28 | command: | ||
1081 | 29 | test -x /snap/bin/speaker-test | ||
1082 | 30 | test -x /snap/bin/aseqnet | ||
1083 | 31 | test -x /snap/bin/alsatplg | ||
1084 | 32 | test -x /snap/bin/arecordmidi | ||
1085 | 33 | test -x /snap/bin/amidi | ||
1086 | 34 | test -x /snap/bin/alsaloop | ||
1087 | 35 | test -x /snap/bin/aconnect | ||
1088 | 36 | test -x /snap/bin/iecset | ||
1089 | 37 | test -x /snap/bin/alsabat | ||
1090 | 38 | test -x /snap/bin/aseqdump | ||
1091 | 39 | test -x /snap/bin/aplaymidi | ||
1092 | 40 | test -x /snap/bin/alsactl | ||
1093 | 41 | test -x /snap/bin/amixer | ||
1094 | 42 | test -x /snap/bin/aplay | ||
1095 | 43 | test -x /snap/bin/alsaucm | ||
1096 | 44 | test -x /snap/bin/alsamixer | ||
1097 | 45 | test -x /snap/bin/arecord | ||
1098 | 46 | estimated_duration: 1s | ||
1099 | 47 | flags: preserve-locale | ||
1100 | diff --git a/com.canonical.se:engineering-tests/units/alsa/device.pxu b/com.canonical.se:engineering-tests/units/alsa/device.pxu | |||
1101 | 0 | new file mode 100644 | 48 | new file mode 100644 |
1102 | index 0000000..a3f7b34 | |||
1103 | --- /dev/null | |||
1104 | +++ b/com.canonical.se:engineering-tests/units/alsa/device.pxu | |||
1105 | @@ -0,0 +1,15 @@ | |||
1106 | 1 | # FIXME: Convert this test back to an automated one. See LP #1665652 | ||
1107 | 2 | id: alsa_utils/device/can_list_available_cards | ||
1108 | 3 | category_id: alsa_utils | ||
1109 | 4 | _description: | ||
1110 | 5 | Validate that available ALSA sound cards can be listed with the | ||
1111 | 6 | utilities the snap ships. | ||
1112 | 7 | plugin: manual | ||
1113 | 8 | _steps: | ||
1114 | 9 | Execute the following command: | ||
1115 | 10 | . | ||
1116 | 11 | $ /snap/bin/aplay -L | ||
1117 | 12 | . | ||
1118 | 13 | _verification: | ||
1119 | 14 | Verify that the command prints out a list of available ALSA | ||
1120 | 15 | devices. | ||
1121 | diff --git a/com.canonical.se:engineering-tests/units/alsa/playback.pxu b/com.canonical.se:engineering-tests/units/alsa/playback.pxu | |||
1122 | 0 | new file mode 100644 | 16 | new file mode 100644 |
1123 | index 0000000..d1a8083 | |||
1124 | --- /dev/null | |||
1125 | +++ b/com.canonical.se:engineering-tests/units/alsa/playback.pxu | |||
1126 | @@ -0,0 +1 @@ | |||
1127 | 1 | # FIXME: Convert this test back to an automated one. See LP #1665652 | ||
1128 | diff --git a/com.canonical.se:engineering-tests/units/bluez/desktop.pxu b/com.canonical.se:engineering-tests/units/bluez/desktop.pxu | |||
1129 | 0 | new file mode 100644 | 2 | new file mode 100644 |
1130 | index 0000000..0075fa5 | |||
1131 | --- /dev/null | |||
1132 | +++ b/com.canonical.se:engineering-tests/units/bluez/desktop.pxu | |||
1133 | @@ -0,0 +1,142 @@ | |||
1134 | 1 | # Copyright (C) 2017 Canonical, Ltd. | ||
1135 | 2 | # All rights reserved. | ||
1136 | 3 | # | ||
1137 | 4 | # Written by: | ||
1138 | 5 | # Matteo Croce <matteo.croce@canonical.com> | ||
1139 | 6 | |||
1140 | 7 | id: bluez/setup/enabled_on_boot_desktop | ||
1141 | 8 | category_id: bluez | ||
1142 | 9 | _description: Ensure that Bluetooth is enabled on boot | ||
1143 | 10 | plugin: manual | ||
1144 | 11 | _steps: | ||
1145 | 12 | 1. Power on the PC | ||
1146 | 13 | 2. If Bluetooth isn't enabled on first boot, enable it and reboot | ||
1147 | 14 | _verification: | ||
1148 | 15 | 1. Go to System Settings->Bluetooth | ||
1149 | 16 | 2. Check that Bluetooth kill-switch is "on" | ||
1150 | 17 | 3. Look at Bluetooth indicator: verify it is active and Bluetooth kill switch is "on" | ||
1151 | 18 | 4. Verify that Bluetooth is still enabled | ||
1152 | 19 | |||
1153 | 20 | id: bluez/setup/discoverable_by_default_desktop | ||
1154 | 21 | category_id: bluez | ||
1155 | 22 | _description: Ensure that device is discoverable by default | ||
1156 | 23 | plugin: manual | ||
1157 | 24 | _steps: | ||
1158 | 25 | 1. Power on the PC | ||
1159 | 26 | 2. Goto System Settings->Bluetooth | ||
1160 | 27 | _verification: | ||
1161 | 28 | In Ubuntu Touch devices the 'discoverable' option should be enabled by default, | ||
1162 | 29 | in desktop devices it should not | ||
1163 | 30 | |||
1164 | 31 | id: bluez/setup/bt_name_correct_desktop | ||
1165 | 32 | category_id: bluez | ||
1166 | 33 | _description: Ensure that the Bluetooth device name is correct | ||
1167 | 34 | plugin: manual | ||
1168 | 35 | _steps: | ||
1169 | 36 | 1. Power on the PC | ||
1170 | 37 | _verification: | ||
1171 | 38 | 1. Go to System Settings->Bluetooth | ||
1172 | 39 | 2. Verify that the Bluetooth device name is correct: | ||
1173 | 40 | is set to the Ubuntu Touch device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch, | ||
1174 | 41 | or to the hostname for desktop | ||
1175 | 42 | |||
1176 | 43 | id: bluez/connection/device_cycle | ||
1177 | 44 | category_id: bluez | ||
1178 | 45 | _description: Verify that devices will reconnect after power cycle | ||
1179 | 46 | plugin: manual | ||
1180 | 47 | _steps: | ||
1181 | 48 | 1. Go to Unity Control Center | ||
1182 | 49 | 2. Click Search for devices | ||
1183 | 50 | 3. Put the gadget in pairing mode | ||
1184 | 51 | 4. Select the gadget from the list and click pair | ||
1185 | 52 | 5. Power off the device | ||
1186 | 53 | 6. Power on the device | ||
1187 | 54 | _verification: | ||
1188 | 55 | 1. Verify that the paired device will reconnect automatically, | ||
1189 | 56 | eg. it appears bold in the list | ||
1190 | 57 | |||
1191 | 58 | id: bluez/connection/device_disconnect | ||
1192 | 59 | category_id: bluez | ||
1193 | 60 | _description: Verify that the connected device can be disconnected | ||
1194 | 61 | depends: bluez/connection/device_cycle | ||
1195 | 62 | plugin: manual | ||
1196 | 63 | _steps: | ||
1197 | 64 | 1. Pair a device with a computer | ||
1198 | 65 | 2. Remove the pairing | ||
1199 | 66 | 3. Pair the device a second time | ||
1200 | 67 | _verification: | ||
1201 | 68 | 1. Verify that the device can connect again | ||
1202 | 69 | |||
1203 | 70 | id: bluez/connection/pc_reboot | ||
1204 | 71 | category_id: bluez | ||
1205 | 72 | _description: Verify that devices will reconnect after reboot | ||
1206 | 73 | depends: bluez/connection/device_cycle | ||
1207 | 74 | plugin: manual | ||
1208 | 75 | _steps: | ||
1209 | 76 | 1. Pair a device with the computer | ||
1210 | 77 | 2. Reboot the computer | ||
1211 | 78 | _verification: | ||
1212 | 79 | 1. Verify that the paired device will reconnect after rebooting it | ||
1213 | 80 | |||
1214 | 81 | id: bluez/connection/device_discard | ||
1215 | 82 | category_id: bluez | ||
1216 | 83 | _description: Verify that the paired device can be forgotten | ||
1217 | 84 | depends: bluez/connection/device_cycle | ||
1218 | 85 | plugin: manual | ||
1219 | 86 | _steps: | ||
1220 | 87 | 1. Pair a device with the computer | ||
1221 | 88 | 2. Remove the pairing | ||
1222 | 89 | _verification: | ||
1223 | 90 | 1. Verify that the paired device no longer appears in the devices list, | ||
1224 | 91 | eg. it's NOT listed in bold in Unity Control Center | ||
1225 | 92 | |||
1226 | 93 | id: bluez/connection/no_connect_discarded | ||
1227 | 94 | category_id: bluez | ||
1228 | 95 | _description: Verify that a discarded device don't connect | ||
1229 | 96 | depends: bluez/connection/device_cycle | ||
1230 | 97 | plugin: manual | ||
1231 | 98 | _steps: | ||
1232 | 99 | 1. Pair a device with the computer | ||
1233 | 100 | 2. Remove the pairing | ||
1234 | 101 | _verification: | ||
1235 | 102 | 1. Verify that the paired device no longer connects | ||
1236 | 103 | |||
1237 | 104 | id: bluez/connection/device_readd | ||
1238 | 105 | category_id: bluez | ||
1239 | 106 | _description: Verify that a discarded device can be paired again | ||
1240 | 107 | depends: bluez/connection/device_cycle | ||
1241 | 108 | plugin: manual | ||
1242 | 109 | _steps: | ||
1243 | 110 | 1. Pair a device with the computer | ||
1244 | 111 | 2. Remove the pairing | ||
1245 | 112 | 4. Pair the device again | ||
1246 | 113 | _verification: | ||
1247 | 114 | 1. Ensure that the device can connect | ||
1248 | 115 | |||
1249 | 116 | id: bluez/discoverable/pc_not_discoverable | ||
1250 | 117 | category_id: bluez | ||
1251 | 118 | _description: Verify that the PC can disable discovery | ||
1252 | 119 | plugin: manual | ||
1253 | 120 | _steps: | ||
1254 | 121 | 1. Toggle the PC Bluetooth visibility off | ||
1255 | 122 | _verification: | ||
1256 | 123 | 1. Ensure that the PC can't be discovered from any other device | ||
1257 | 124 | |||
1258 | 125 | id: bluez/discoverable/pc_discoverable | ||
1259 | 126 | category_id: bluez | ||
1260 | 127 | _description: Verify that the PC can enable discovery | ||
1261 | 128 | plugin: manual | ||
1262 | 129 | _steps: | ||
1263 | 130 | 1. Toggle the visibility on | ||
1264 | 131 | 2. Do a Bluetooth scan from another device, eg. a smartphone | ||
1265 | 132 | _verification: | ||
1266 | 133 | 1. Ensure that the PC can be discovered from the other device | ||
1267 | 134 | |||
1268 | 135 | id: bluez/setup/ensure_interface_connection_setup_desktop | ||
1269 | 136 | category_id: bluez | ||
1270 | 137 | _description: Ensure that the bluez interface is connected | ||
1271 | 138 | plugin: manual | ||
1272 | 139 | _verification: | ||
1273 | 140 | Open a text editor and make sure you can type text from the HID keyboard | ||
1274 | 141 | into the text box. If testing a mouse, ensure that the cursor moves when | ||
1275 | 142 | moving your HID mouse. | ||
1276 | diff --git a/com.canonical.se:engineering-tests/units/bluez/general.pxu b/com.canonical.se:engineering-tests/units/bluez/general.pxu | |||
1277 | 0 | new file mode 100644 | 143 | new file mode 100644 |
1278 | index 0000000..18b8b52 | |||
1279 | --- /dev/null | |||
1280 | +++ b/com.canonical.se:engineering-tests/units/bluez/general.pxu | |||
1281 | @@ -0,0 +1,302 @@ | |||
1282 | 1 | # Copyright (C) 2017 Canonical, Ltd. | ||
1283 | 2 | # All rights reserved. | ||
1284 | 3 | # | ||
1285 | 4 | # Written by: | ||
1286 | 5 | # Jim Hodapp <jim.hodapp@canonical.com> | ||
1287 | 6 | # Matteo Croce <matteo.croce@canonical.com> | ||
1288 | 7 | |||
1289 | 8 | unit: category | ||
1290 | 9 | id: bluez | ||
1291 | 10 | _name: BlueZ | ||
1292 | 11 | |||
1293 | 12 | id: bluez/setup/enabled_on_boot | ||
1294 | 13 | category_id: bluez | ||
1295 | 14 | _description: Ensure that Bluetooth is enabled on boot | ||
1296 | 15 | plugin: manual | ||
1297 | 16 | _steps: | ||
1298 | 17 | 1. Power on the Device Under Test | ||
1299 | 18 | 2. If Bluetooth isn't enabled on first boot, enable it and reboot | ||
1300 | 19 | 3. Use bluetoothctl to check if there is an active adapter | ||
1301 | 20 | . | ||
1302 | 21 | $ bluetoothctl | ||
1303 | 22 | _verification: | ||
1304 | 23 | 1. Check that there is a Controller in the output, eg. | ||
1305 | 24 | [NEW] Controller 00:10:20:30:40:50 pi [default] | ||
1306 | 25 | |||
1307 | 26 | id: bluez/scan/start_inquiry | ||
1308 | 27 | category_id: bluez | ||
1309 | 28 | _description: Verify that found gadgets are reported during an ongoing device discovery | ||
1310 | 29 | plugin: manual | ||
1311 | 30 | _steps: | ||
1312 | 31 | 1. Turn Bluetooth on on a gadget and make it discoverable | ||
1313 | 32 | 2. Use bluetoothctl to start a device scan: | ||
1314 | 33 | . | ||
1315 | 34 | $ bluetoothctl | ||
1316 | 35 | [bluetooth]# scan on | ||
1317 | 36 | [bluetooth]# devices | ||
1318 | 37 | . | ||
1319 | 38 | _verification: | ||
1320 | 39 | You should see the gadget listed after the local adapter: | ||
1321 | 40 | Device XX:XX:XX:XX:XX:XX My Device | ||
1322 | 41 | [NEW] Device 04:52:C7:0D:0C:03 QC 35s | ||
1323 | 42 | |||
1324 | 43 | id: bluez/scan/stop_inquiry | ||
1325 | 44 | category_id: bluez | ||
1326 | 45 | _description: Verify that gadgets are not found with scan disabled | ||
1327 | 46 | plugin: manual | ||
1328 | 47 | _steps: | ||
1329 | 48 | 1. Use bluetoothctl to start stop the device scan | ||
1330 | 49 | . | ||
1331 | 50 | $ bluetoothctl | ||
1332 | 51 | [bluetooth]# scan off | ||
1333 | 52 | . | ||
1334 | 53 | 2. Turn bluetooth on on a gadget and make it discoverable | ||
1335 | 54 | 3. Use bluetoothctl to get the devices list | ||
1336 | 55 | . | ||
1337 | 56 | $ bluetoothctl | ||
1338 | 57 | [bluetooth]# devices | ||
1339 | 58 | . | ||
1340 | 59 | _verification: | ||
1341 | 60 | You should only see the local adapter in the list | ||
1342 | 61 | Device XX:XX:XX:XX:XX:XX My Device | ||
1343 | 62 | |||
1344 | 63 | id: bluez/pairing/can_be_enabled | ||
1345 | 64 | category_id: bluez | ||
1346 | 65 | _description: Verify that the device pairing works | ||
1347 | 66 | plugin: manual | ||
1348 | 67 | _steps: | ||
1349 | 68 | 1. Use bluetoothctl to enable pairing | ||
1350 | 69 | . | ||
1351 | 70 | $ bluetoothctl | ||
1352 | 71 | [bluetooth]# pairable on | ||
1353 | 72 | . | ||
1354 | 73 | 2. Pair the Device Under Test from a gadget | ||
1355 | 74 | _verification: | ||
1356 | 75 | 1. You should be able to do the pairing | ||
1357 | 76 | |||
1358 | 77 | id: bluez/pairing/can_be_disabled | ||
1359 | 78 | category_id: bluez | ||
1360 | 79 | _description: Verify that the pairing can be disabled | ||
1361 | 80 | plugin: manual | ||
1362 | 81 | _steps: | ||
1363 | 82 | 1. Use bluetoothctl to disable pairing | ||
1364 | 83 | . | ||
1365 | 84 | $ bluetoothctl | ||
1366 | 85 | [bluetooth]# pairable off | ||
1367 | 86 | . | ||
1368 | 87 | 2. Pair the Device Under Test from a gadget | ||
1369 | 88 | _verification: | ||
1370 | 89 | 1. You shouldn't be able to do the pairing | ||
1371 | 90 | |||
1372 | 91 | id: bluez/setup/discoverable_by_default | ||
1373 | 92 | category_id: bluez | ||
1374 | 93 | _description: Ensure that Device Under Test is discoverable by default | ||
1375 | 94 | plugin: manual | ||
1376 | 95 | _steps: | ||
1377 | 96 | 1. Type: | ||
1378 | 97 | . | ||
1379 | 98 | $ bluetoothctl | ||
1380 | 99 | [bluetooth]# show | ||
1381 | 100 | 2. Scan for devices from a smartphone | ||
1382 | 101 | _verification: | ||
1383 | 102 | 1. Verify that the Device Under Test is discoverable by default, eg. | ||
1384 | 103 | . | ||
1385 | 104 | $ bluetoothctl | ||
1386 | 105 | [bluetooth]# show | ||
1387 | 106 | . | ||
1388 | 107 | contains the "Discoverable: yes" line | ||
1389 | 108 | 2. Check that the Device Under Test can be discovered on the smartphone | ||
1390 | 109 | |||
1391 | 110 | id: bluez/setup/bt_name_correct | ||
1392 | 111 | category_id: bluez | ||
1393 | 112 | _description: Ensure that the Bluetooth Device Under Test name is correct | ||
1394 | 113 | plugin: manual | ||
1395 | 114 | _steps: | ||
1396 | 115 | 1. Type: | ||
1397 | 116 | . | ||
1398 | 117 | $ bluetoothctl | ||
1399 | 118 | [bluetooth]# show | ||
1400 | 119 | _verification: | ||
1401 | 120 | 1. Verify that the Bluetooth Device Under Test name is correct: equals to the Ubuntu Touch | ||
1402 | 121 | device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch, | ||
1403 | 122 | or to the hostname for desktop | ||
1404 | 123 | . | ||
1405 | 124 | Name: Ubuntu | ||
1406 | 125 | |||
1407 | 126 | id: bluez/setup/bt_name_correct_from_gadget | ||
1408 | 127 | category_id: bluez | ||
1409 | 128 | _description: Ensure that the Bluetooth Device Under Test name advertise correctly | ||
1410 | 129 | plugin: manual | ||
1411 | 130 | _steps: | ||
1412 | 131 | 1. Scan for devices from a smartphone | ||
1413 | 132 | _verification: | ||
1414 | 133 | 1. Verify that the Bluetooth Device Under Test name is correct as seen from an external device | ||
1415 | 134 | |||
1416 | 135 | id: bluez/connection/gadget_reconnect_after_power_cycle | ||
1417 | 136 | category_id: bluez | ||
1418 | 137 | _description: Verify that gadgets will reconnect after power cycle | ||
1419 | 138 | plugin: manual | ||
1420 | 139 | _steps: | ||
1421 | 140 | 1. Connect a gadget with the Device Under Test: | ||
1422 | 141 | . | ||
1423 | 142 | $ bluetoothctl | ||
1424 | 143 | bluetooth]# scan on | ||
1425 | 144 | Discovery started | ||
1426 | 145 | [NEW] Device 01:02:03:04:05:06 device | ||
1427 | 146 | [bluetooth]# pair 01:02:03:04:05:06 | ||
1428 | 147 | Pairing successful | ||
1429 | 148 | [bluetooth]# trust 01:02:03:04:05:06 | ||
1430 | 149 | Trusted | ||
1431 | 150 | [bluetooth]# connect 01:02:03:04:05:06 | ||
1432 | 151 | . | ||
1433 | 152 | 2. Power off the gadget | ||
1434 | 153 | 3. Power on the gadget | ||
1435 | 154 | _verification: | ||
1436 | 155 | 1. Verify that the paired gadget will reconnect automatically | ||
1437 | 156 | . | ||
1438 | 157 | $ bluetoothctl | ||
1439 | 158 | bluetooth]# info 01:02:03:04:05:06 | ||
1440 | 159 | . | ||
1441 | 160 | and check for "Connected: Yes" | ||
1442 | 161 | |||
1443 | 162 | id: bluez/connection/reconnect_after_dut_reboot | ||
1444 | 163 | category_id: bluez | ||
1445 | 164 | _description: Verify that gadgets will reconnect after reboot | ||
1446 | 165 | plugin: manual | ||
1447 | 166 | depends: bluez/connection/gadget_reconnect_after_power_cycle | ||
1448 | 167 | _steps: | ||
1449 | 168 | 1. Pair a gadget with the Device Under Test | ||
1450 | 169 | 2. Reboot the Device Under Test | ||
1451 | 170 | _verification: | ||
1452 | 171 | 1. Verify that the paired gadget will reconnect after reboot | ||
1453 | 172 | |||
1454 | 173 | id: bluez/connection/gadget_disconnect | ||
1455 | 174 | category_id: bluez | ||
1456 | 175 | _description: Verify that the connected gadget can be disconnected | ||
1457 | 176 | plugin: manual | ||
1458 | 177 | depends: bluez/connection/gadget_reconnect_after_power_cycle | ||
1459 | 178 | _steps: | ||
1460 | 179 | 1. Connect a gadget with the Device Under Test | ||
1461 | 180 | 2. Disconnect it with: | ||
1462 | 181 | . | ||
1463 | 182 | $ bluetoothctl | ||
1464 | 183 | [bluetooth]# disconnect 01:02:03:04:05:06 | ||
1465 | 184 | . | ||
1466 | 185 | _verification: | ||
1467 | 186 | 1. Verify that the gadget is disconnected | ||
1468 | 187 | . | ||
1469 | 188 | $ bluetoothctl | ||
1470 | 189 | bluetooth]# info 01:02:03:04:05:06 | ||
1471 | 190 | . | ||
1472 | 191 | and check for "Connected: no" | ||
1473 | 192 | |||
1474 | 193 | id: bluez/connection/gadget_can_be_forgotten | ||
1475 | 194 | category_id: bluez | ||
1476 | 195 | _description: Verify that the paired gadget can be forgotten | ||
1477 | 196 | plugin: manual | ||
1478 | 197 | depends: bluez/connection/gadget_reconnect_after_power_cycle | ||
1479 | 198 | _steps: | ||
1480 | 199 | 1. Pair a gadget with the Device Under Test | ||
1481 | 200 | 2. Remove the pairing | ||
1482 | 201 | . | ||
1483 | 202 | $ bluetoothctl | ||
1484 | 203 | [bluetooth]# remove 01:02:03:04:05:06 | ||
1485 | 204 | _verification: | ||
1486 | 205 | 1. Verify that the paired gadget no longer appears in the gadgets list | ||
1487 | 206 | . | ||
1488 | 207 | $ bluetoothctl | ||
1489 | 208 | bluetooth]# info 01:02:03:04:05:06 | ||
1490 | 209 | . | ||
1491 | 210 | and check for "Paired: no" | ||
1492 | 211 | |||
1493 | 212 | id: bluez/connection/gadget_paired_again | ||
1494 | 213 | category_id: bluez | ||
1495 | 214 | _description: Verify that forgotten gadgets can be paired again | ||
1496 | 215 | plugin: manual | ||
1497 | 216 | depends: bluez/connection/gadget_can_be_forgotten | ||
1498 | 217 | _steps: | ||
1499 | 218 | 1. Pair a gadget with the Device Under Test | ||
1500 | 219 | 2. Remove the pairing | ||
1501 | 220 | 4. Pair the gadget a second time | ||
1502 | 221 | _verification: | ||
1503 | 222 | 1. Ensure that the gadget be paired again: | ||
1504 | 223 | . | ||
1505 | 224 | $ bluetoothctl | ||
1506 | 225 | bluetooth]# info 01:02:03:04:05:06 | ||
1507 | 226 | . | ||
1508 | 227 | and check for "Paired: yes" | ||
1509 | 228 | |||
1510 | 229 | id: bluez/discoverable/dut_not_discoverable | ||
1511 | 230 | category_id: bluez | ||
1512 | 231 | _description: Verify that the Device Under Test can disable discovery | ||
1513 | 232 | plugin: manual | ||
1514 | 233 | _steps: | ||
1515 | 234 | 1. Toggle the Device Under Test Bluetooth visibility off: | ||
1516 | 235 | . | ||
1517 | 236 | $ bluetoothctl | ||
1518 | 237 | bluetooth]# discoverable off | ||
1519 | 238 | . | ||
1520 | 239 | _verification: | ||
1521 | 240 | 1. Ensure that the Device Under Test can't be discovered from any other gadget | ||
1522 | 241 | |||
1523 | 242 | id: bluez/discoverable/dut_discoverable | ||
1524 | 243 | category_id: bluez | ||
1525 | 244 | _description: Verify that the Device Under Test can enable discovery | ||
1526 | 245 | plugin: manual | ||
1527 | 246 | _steps: | ||
1528 | 247 | 1. Toggle the Device Under Test Bluetooth visibility on | ||
1529 | 248 | . | ||
1530 | 249 | $ bluetoothctl | ||
1531 | 250 | bluetooth]# discoverable on | ||
1532 | 251 | . | ||
1533 | 252 | _verification: | ||
1534 | 253 | 1. Ensure that the Device Under Test can be discovered from other gadgets | ||
1535 | 254 | |||
1536 | 255 | id: bluez/audio/a2dp_ubuntu_classic | ||
1537 | 256 | category_id: bluez | ||
1538 | 257 | plugin: manual | ||
1539 | 258 | depends: bluez/connection/pair_and_connect | ||
1540 | 259 | _summary: Stream audio to Bluetooth headset | ||
1541 | 260 | _purpose: | ||
1542 | 261 | Verify that you can stream music to a Bluetooth headset via A2DP on Ubuntu | ||
1543 | 262 | Classic. Note: Skip this test if not running Ubuntu Classic | ||
1544 | 263 | _steps: | ||
1545 | 264 | 1. Follow the previous tests to list, pair and connect your headset | ||
1546 | 265 | Navigate to the Sound panel in System Settings, select your headset device | ||
1547 | 266 | in the Output tab, and make sure that Mode is set to A2DP | ||
1548 | 267 | Then press the Test Sound button and test each speaker | ||
1549 | 268 | _verification: | ||
1550 | 269 | Verify that you can hear the test sound "Front left", "Front right" in each | ||
1551 | 270 | speaker respectively. | ||
1552 | 271 | |||
1553 | 272 | id: bluez/audio/a2dp_disconnect | ||
1554 | 273 | category_id: bluez | ||
1555 | 274 | plugin: manual | ||
1556 | 275 | depends: bluez/audio/a2dp_ubuntu_classic | ||
1557 | 276 | _summary: Disconnect Bluetooth headset | ||
1558 | 277 | _purpose: | ||
1559 | 278 | Verify that you can disconnect Bluetooth headset while streaming and audio | ||
1560 | 279 | playback switches back to the Device Under Test's primary speaker | ||
1561 | 280 | _steps: | ||
1562 | 281 | 1. Follow the previous tests to start streaming audio to the headset via | ||
1563 | 282 | A2DP. Then execute the following command to disconnect the headset from | ||
1564 | 283 | active A2DP streaming: | ||
1565 | 284 | . | ||
1566 | 285 | [<dut_name>]# disconnect <gadget_address> | ||
1567 | 286 | _verification: | ||
1568 | 287 | Verify that you see output similar to the following: | ||
1569 | 288 | Attempting to disconnect from 04:52:C7:0D:0C:03 | ||
1570 | 289 | [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no | ||
1571 | 290 | Successful disconnected | ||
1572 | 291 | [CHG] Device 04:52:C7:0D:0C:03 Connected: no | ||
1573 | 292 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Key: 0x0110 | ||
1574 | 293 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x40 | ||
1575 | 294 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x0c | ||
1576 | 295 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x02 | ||
1577 | 296 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x41 | ||
1578 | 297 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x00 | ||
1579 | 298 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x61 | ||
1580 | 299 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x71 | ||
1581 | 300 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0xcd | ||
1582 | 301 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x92 | ||
1583 | 302 | [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x6c | ||
1584 | diff --git a/com.canonical.se:engineering-tests/units/bluez/hid.pxu b/com.canonical.se:engineering-tests/units/bluez/hid.pxu | |||
1585 | 0 | new file mode 100644 | 303 | new file mode 100644 |
1586 | index 0000000..394e361 | |||
1587 | --- /dev/null | |||
1588 | +++ b/com.canonical.se:engineering-tests/units/bluez/hid.pxu | |||
1589 | @@ -0,0 +1,83 @@ | |||
1590 | 1 | # Copyright (C) 2017 Canonical, Ltd. | ||
1591 | 2 | # All rights reserved. | ||
1592 | 3 | # | ||
1593 | 4 | # Written by: | ||
1594 | 5 | # Matteo Croce <matteo.croce@canonical.com> | ||
1595 | 6 | |||
1596 | 7 | id: bluez/hid/pair_and_connect_hid | ||
1597 | 8 | category_id: bluez | ||
1598 | 9 | plugin: manual | ||
1599 | 10 | depends: bluez/setup/ensure_interface_connection_setup | ||
1600 | 11 | _summary: A Bluetooth HID gadget (e.g. keyboard, mouse) is connected and paired | ||
1601 | 12 | _purpose: | ||
1602 | 13 | Check if your Bluetooth HID gadget of choice (e.g. keyboard, mouse) can be | ||
1603 | 14 | paired to the host system. | ||
1604 | 15 | _steps: | ||
1605 | 16 | 1. Execute the following command to pair and connect your HID gadget to the | ||
1606 | 17 | host system: | ||
1607 | 18 | . | ||
1608 | 19 | [bluetooth]# scan on | ||
1609 | 20 | [bluetooth]# scan off | ||
1610 | 21 | [bluetooth]# pair 01:02:03:04:05:06 | ||
1611 | 22 | [bluetooth]# connect 01:02:03:04:05:06 | ||
1612 | 23 | . | ||
1613 | 24 | _verification: | ||
1614 | 25 | Open a text editor and make sure you can type text from the HID keyboard | ||
1615 | 26 | into the text box. If testing a mouse, ensure that the cursor moves when | ||
1616 | 27 | moving your HID mouse | ||
1617 | 28 | |||
1618 | 29 | id: bluez/hid/bt_mouse_works | ||
1619 | 30 | category_id: bluez | ||
1620 | 31 | _description: Verify that Bluetooth mice do work | ||
1621 | 32 | plugin: manual | ||
1622 | 33 | depends: bluez/hid/pair_and_connect_hid | ||
1623 | 34 | _steps: | ||
1624 | 35 | 1. Scan for a BT mouse and connect it to the DUT | ||
1625 | 36 | _verification: | ||
1626 | 37 | 1. Verify that the paired mouse can move the pointer | ||
1627 | 38 | 2. Verify that the device is automatically connected at boot | ||
1628 | 39 | 3. Verify that the device is automatically connected after resume from sleep | ||
1629 | 40 | |||
1630 | 41 | id: bluez/hid/bt_keyboard_works | ||
1631 | 42 | category_id: bluez | ||
1632 | 43 | _description: Verify that Bluetooth keyboards do work | ||
1633 | 44 | plugin: manual | ||
1634 | 45 | _steps: | ||
1635 | 46 | 1. Scan for a BT keyboard and connect it to the DUT, eg. | ||
1636 | 47 | . | ||
1637 | 48 | $ bluetoothctl | ||
1638 | 49 | [bluetooth]# scan on | ||
1639 | 50 | [bluetooth]# scan off | ||
1640 | 51 | [bluetooth]# pair 01:02:03:04:05:06 | ||
1641 | 52 | Pairing successful | ||
1642 | 53 | [bluetooth]# trust 01:02:03:04:05:06 | ||
1643 | 54 | [bluetooth]# connect 01:02:03:04:05:06 | ||
1644 | 55 | Trusted | ||
1645 | 56 | _verification: | ||
1646 | 57 | 1. Verify that the paired keyboard can write in a text editor | ||
1647 | 58 | 2. Verify that the device is automatically connected at boot | ||
1648 | 59 | 3. Verify that the device is automatically connected after resume from sleep | ||
1649 | 60 | 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly | ||
1650 | 61 | |||
1651 | 62 | id: bluez/hid/ble_mouse_works | ||
1652 | 63 | category_id: bluez | ||
1653 | 64 | _description: Verify that BLE mices do work | ||
1654 | 65 | plugin: manual | ||
1655 | 66 | _steps: | ||
1656 | 67 | 1. Pair a BLE mouse with the DUT. | ||
1657 | 68 | _verification: | ||
1658 | 69 | 1. Verify that the paired mouse can move the pointer | ||
1659 | 70 | 2. Verify that the device is automatically connected at boot | ||
1660 | 71 | 3. Verify that the device is automatically connected after resume from sleep | ||
1661 | 72 | |||
1662 | 73 | id: bluez/hid/ble_keyboard_works | ||
1663 | 74 | category_id: bluez | ||
1664 | 75 | _description: Verify that BLE keyboards do work | ||
1665 | 76 | plugin: manual | ||
1666 | 77 | _steps: | ||
1667 | 78 | 1. Pair a BLE keyboard with the DUT. | ||
1668 | 79 | _verification: | ||
1669 | 80 | 1. Verify that the paired keyboard can write in a text editor | ||
1670 | 81 | 2. Verify that the device is automatically connected at boot | ||
1671 | 82 | 3. Verify that the device is automatically connected after resume from sleep | ||
1672 | 83 | 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly | ||
1673 | diff --git a/com.canonical.se:engineering-tests/units/bluez/setup.pxu b/com.canonical.se:engineering-tests/units/bluez/setup.pxu | |||
1674 | 0 | new file mode 100644 | 84 | new file mode 100644 |
1675 | index 0000000..3060426 | |||
1676 | --- /dev/null | |||
1677 | +++ b/com.canonical.se:engineering-tests/units/bluez/setup.pxu | |||
1678 | @@ -0,0 +1,140 @@ | |||
1679 | 1 | # Copyright (C) 2017 Canonical, Ltd. | ||
1680 | 2 | # All rights reserved. | ||
1681 | 3 | # | ||
1682 | 4 | # Written by: | ||
1683 | 5 | # Matteo Croce <matteo.croce@canonical.com> | ||
1684 | 6 | |||
1685 | 7 | id: bluez/setup/ensure_interface_connection_setup | ||
1686 | 8 | category_id: bluez | ||
1687 | 9 | _description: Ensure that the bluez interface is connected | ||
1688 | 10 | plugin: manual | ||
1689 | 11 | _steps: | ||
1690 | 12 | 1. Connect required bluez slot/plug | ||
1691 | 13 | . | ||
1692 | 14 | $ sudo snap connect bluez:client bluez:service | ||
1693 | 15 | . | ||
1694 | 16 | _verification: | ||
1695 | 17 | Verify that you see the following when running snap interfaces bluez: | ||
1696 | 18 | bluez:service bluez:client | ||
1697 | 19 | |||
1698 | 20 | id: bluez/snap/ensure_nonroot_cannot_use | ||
1699 | 21 | category_id: bluez | ||
1700 | 22 | plugin: manual | ||
1701 | 23 | depends: bluez/setup/ensure_interface_connection_setup | ||
1702 | 24 | _summary: bluetoothctl and obexctl cannot be run as non-root user | ||
1703 | 25 | _purpose: | ||
1704 | 26 | Verify that the bluetoothctl and obexctl commands cannot be run as non-root | ||
1705 | 27 | _steps: | ||
1706 | 28 | 1. Start the bluetoothctl and obexctl commands as non-root user | ||
1707 | 29 | . | ||
1708 | 30 | $ bluetoothctl | ||
1709 | 31 | $ obexctl | ||
1710 | 32 | . | ||
1711 | 33 | _verification: | ||
1712 | 34 | You should see outout similar to the following: | ||
1713 | 35 | . | ||
1714 | 36 | $ bluetoothctl | ||
1715 | 37 | This script must be run as root | ||
1716 | 38 | $ obexctl | ||
1717 | 39 | This script must be run as root | ||
1718 | 40 | |||
1719 | 41 | id: bluez/scan/get_all | ||
1720 | 42 | category_id: bluez | ||
1721 | 43 | plugin: manual | ||
1722 | 44 | depends: bluez/setup/ensure_interface_connection_setup | ||
1723 | 45 | _summary: All Bluetooth gadgets in range are listed | ||
1724 | 46 | _purpose: | ||
1725 | 47 | Check if all powered on gadgets that are within range as listed. | ||
1726 | 48 | _steps: | ||
1727 | 49 | 1. Execute the following command to retrieve the list of all Bluetooth gadgets: | ||
1728 | 50 | . | ||
1729 | 51 | $ /snap/bin/bluez.bluetoothctl | ||
1730 | 52 | [bluetooth]# scan on | ||
1731 | 53 | . | ||
1732 | 54 | _verification: | ||
1733 | 55 | Your expected Bluetooth gadget(s) is/are shown in the output list such as: | ||
1734 | 56 | [NEW] Device 04:52:C7:0D:0C:03 QC 35s | ||
1735 | 57 | |||
1736 | 58 | id: bluez/connection/pair_and_connect | ||
1737 | 59 | category_id: bluez | ||
1738 | 60 | plugin: manual | ||
1739 | 61 | depends: bluez/setup/ensure_interface_connection_setup | ||
1740 | 62 | _summary: A Bluetooth gadget of choice is paired and connected | ||
1741 | 63 | _purpose: | ||
1742 | 64 | Check if your Bluetooth gadget of choice can be paired to the host system. | ||
1743 | 65 | _steps: | ||
1744 | 66 | 1. Execute the following command to pair and connect your gadget to the host | ||
1745 | 67 | system using the address listed in the previous scan test: | ||
1746 | 68 | . | ||
1747 | 69 | [bluetooth]# pair <gadget_address> | ||
1748 | 70 | [bluetooth]# connect <gadget_address> | ||
1749 | 71 | . | ||
1750 | 72 | _verification: | ||
1751 | 73 | You should see output similar to the following: | ||
1752 | 74 | Attempting to pair with 04:52:C7:0D:0C:03 | ||
1753 | 75 | [CHG] Device 04:52:C7:0D:0C:03 Connected: yes | ||
1754 | 76 | [CHG] Device 04:52:C7:0D:0C:03 Modalias: bluetooth:v009Ep400Cd0106 | ||
1755 | 77 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff | ||
1756 | 78 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb | ||
1757 | 79 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb | ||
1758 | 80 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb | ||
1759 | 81 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb | ||
1760 | 82 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb | ||
1761 | 83 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb | ||
1762 | 84 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb | ||
1763 | 85 | [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes | ||
1764 | 86 | [CHG] Device 04:52:C7:0D:0C:03 Paired: yes | ||
1765 | 87 | Pairing successful | ||
1766 | 88 | [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no | ||
1767 | 89 | [CHG] Device 04:52:C7:0D:0C:03 Connected: no | ||
1768 | 90 | Attempting to connect to 04:52:C7:0D:0C:03 | ||
1769 | 91 | [CHG] Device 04:52:C7:0D:0C:03 Connected: yes | ||
1770 | 92 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff | ||
1771 | 93 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb | ||
1772 | 94 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb | ||
1773 | 95 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb | ||
1774 | 96 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb | ||
1775 | 97 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb | ||
1776 | 98 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb | ||
1777 | 99 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb | ||
1778 | 100 | [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb | ||
1779 | 101 | Connection successful | ||
1780 | 102 | [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes | ||
1781 | 103 | |||
1782 | 104 | id: bluez/snap/ensure_btmon_can_be started | ||
1783 | 105 | category_id: bluez | ||
1784 | 106 | plugin: manual | ||
1785 | 107 | depends: bluez/setup/ensure_interface_connection_setup | ||
1786 | 108 | _summary: btmon tools function | ||
1787 | 109 | _purpose: | ||
1788 | 110 | Check that the btmon tool shipped as a part of the bluez snap can be used. | ||
1789 | 111 | _steps: | ||
1790 | 112 | 1. Start the btmon command | ||
1791 | 113 | . | ||
1792 | 114 | $ sudo btmon | ||
1793 | 115 | . | ||
1794 | 116 | _verification: | ||
1795 | 117 | You should see outout similar to the following: | ||
1796 | 118 | . | ||
1797 | 119 | $ sudo btmon | ||
1798 | 120 | Bluetooth monitor ver 5.37 | ||
1799 | 121 | = New Index: 00:1A:7D:DA:71:08 (BR/EDR,USB,hci0) [hci0] 0.626494 | ||
1800 | 122 | |||
1801 | 123 | id: bluez/snap/ensure_hcidump_can_be started | ||
1802 | 124 | category_id: bluez | ||
1803 | 125 | plugin: manual | ||
1804 | 126 | depends: bluez/setup/ensure_interface_connection_setup | ||
1805 | 127 | _summary: btmon tools works | ||
1806 | 128 | _purpose: | ||
1807 | 129 | Check that the hcidump tool shipped as a part of the bluez snap can be used. | ||
1808 | 130 | _steps: | ||
1809 | 131 | 1. Start the hcidump command | ||
1810 | 132 | . | ||
1811 | 133 | $ sudo hcidump | ||
1812 | 134 | . | ||
1813 | 135 | _verification: | ||
1814 | 136 | You should see outout similar to the following: | ||
1815 | 137 | . | ||
1816 | 138 | $ sudo hcidump | ||
1817 | 139 | HCI sniffer - Bluetooth packet analyzer ver 5.37 | ||
1818 | 140 | device: hci0 snap_len: 1500 filter: 0xffffffff | ||
1819 | diff --git a/com.canonical.se:engineering-tests/units/captive-redirect/captive-redirect.pxu b/com.canonical.se:engineering-tests/units/captive-redirect/captive-redirect.pxu | |||
1820 | 0 | new file mode 100644 | 141 | new file mode 100644 |
1821 | index 0000000..d45f0e6 | |||
1822 | --- /dev/null | |||
1823 | +++ b/com.canonical.se:engineering-tests/units/captive-redirect/captive-redirect.pxu | |||
1824 | @@ -0,0 +1,102 @@ | |||
1825 | 1 | # Copyright (C) 2017 Canonical Ltd. | ||
1826 | 2 | # All rights reserved. | ||
1827 | 3 | # | ||
1828 | 4 | # Written by: | ||
1829 | 5 | # Matteo Croce <matteo.croce@canonical.com> | ||
1830 | 6 | |||
1831 | 7 | unit: category | ||
1832 | 8 | id: captive_redirect | ||
1833 | 9 | _name: Captive portal redirect | ||
1834 | 10 | |||
1835 | 11 | id: captive_redirect/setup/ensure_interface_connection_setup | ||
1836 | 12 | category_id: captive_redirect | ||
1837 | 13 | _description: Ensure that the captive-redirect interfaces are connected | ||
1838 | 14 | plugin: manual | ||
1839 | 15 | _steps: | ||
1840 | 16 | 1. Install the captive-redirect snap via | ||
1841 | 17 | . | ||
1842 | 18 | $ snap install captive-redirect | ||
1843 | 19 | . | ||
1844 | 20 | _verification: | ||
1845 | 21 | Verify that you see the following when running snap interfaces: | ||
1846 | 22 | :firewall-control captive-redirect | ||
1847 | 23 | |||
1848 | 24 | id: captive_redirect/setup/default_disabled | ||
1849 | 25 | category_id: captive_redirect | ||
1850 | 26 | _description: Ensure that captive-redirect is disabled by default | ||
1851 | 27 | plugin: manual | ||
1852 | 28 | _steps: | ||
1853 | 29 | 1. Get the configuration with: | ||
1854 | 30 | . | ||
1855 | 31 | $ captive-redirect.config status | ||
1856 | 32 | . | ||
1857 | 33 | 2. Ensure that there isn't any REDIRECT iptables chain: | ||
1858 | 34 | . | ||
1859 | 35 | $ sudo iptables-save |grep captive | ||
1860 | 36 | . | ||
1861 | 37 | _verification: | ||
1862 | 38 | 1. Check that the redirect is disabled: | ||
1863 | 39 | . | ||
1864 | 40 | active: false | ||
1865 | 41 | . | ||
1866 | 42 | 2. You shouldn't see any iptables rule | ||
1867 | 43 | |||
1868 | 44 | id: captive_redirect/setup/iptables_rules_all_interfaces | ||
1869 | 45 | category_id: captive_redirect | ||
1870 | 46 | _description: Ensure that enabling captive-redirect sets up the correct iptables rules | ||
1871 | 47 | plugin: manual | ||
1872 | 48 | _steps: | ||
1873 | 49 | 1. Enable captive-redirect with: | ||
1874 | 50 | . | ||
1875 | 51 | $ sudo snap set captive-redirect active=true port=9876 | ||
1876 | 52 | . | ||
1877 | 53 | 2. Get the iptables rules with: | ||
1878 | 54 | . | ||
1879 | 55 | $ sudo iptables-save |grep captive | ||
1880 | 56 | . | ||
1881 | 57 | _verification: | ||
1882 | 58 | 1. You should see iptables rules like: | ||
1883 | 59 | . | ||
1884 | 60 | :captive - [0:0] | ||
1885 | 61 | -A PREROUTING -j captive | ||
1886 | 62 | -A captive -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9876 | ||
1887 | 63 | . | ||
1888 | 64 | |||
1889 | 65 | id: captive_redirect/setup/iptables_rules_one_interface | ||
1890 | 66 | category_id: captive_redirect | ||
1891 | 67 | _description: Ensure that enabling captive-redirect sets up iptables rules for a single interface | ||
1892 | 68 | plugin: manual | ||
1893 | 69 | _steps: | ||
1894 | 70 | 1. Enable captive-redirect with: | ||
1895 | 71 | . | ||
1896 | 72 | $ sudo snap set captive-redirect active=true port=9999 interfaces=tun4 | ||
1897 | 73 | . | ||
1898 | 74 | 2. Get the iptables rules with: | ||
1899 | 75 | . | ||
1900 | 76 | $ sudo iptables-save |grep captive | ||
1901 | 77 | . | ||
1902 | 78 | _verification: | ||
1903 | 79 | 1. You should see iptables rules like: | ||
1904 | 80 | . | ||
1905 | 81 | :captive - [0:0] | ||
1906 | 82 | -A PREROUTING -j captive | ||
1907 | 83 | -A captive -i tun4 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9999 | ||
1908 | 84 | . | ||
1909 | 85 | |||
1910 | 86 | id: captive_redirect/functionality/redirect_works | ||
1911 | 87 | category_id: captive_redirect | ||
1912 | 88 | _description: Ensure that enabling captive-redirect really redirects the traffic | ||
1913 | 89 | plugin: manual | ||
1914 | 90 | _steps: | ||
1915 | 91 | 1. Install a sample web server with: | ||
1916 | 92 | . | ||
1917 | 93 | $ sudo snap install xkcd-webserver | ||
1918 | 94 | . | ||
1919 | 95 | 2. Connect another device to the DUT (Device Under Test) and setup the DUT as default gateway | ||
1920 | 96 | 3. Enable the redirect with: | ||
1921 | 97 | . | ||
1922 | 98 | $ sudo snap set captive-redirect active=true port=80 interfaces= | ||
1923 | 99 | . | ||
1924 | 100 | 4. Try to access an HTTP (avoid HTTPS, it will give a certificate error) web page from the device | ||
1925 | 101 | _verification: | ||
1926 | 102 | 1. You should see a blank page pointing to XKCD instead of the typed address | ||
1927 | diff --git a/com.canonical.se:engineering-tests/units/easy-openvpn/easy-openvpn.pxu b/com.canonical.se:engineering-tests/units/easy-openvpn/easy-openvpn.pxu | |||
1928 | 0 | new file mode 100644 | 103 | new file mode 100644 |
1929 | index 0000000..c6f8336 | |||
1930 | --- /dev/null | |||
1931 | +++ b/com.canonical.se:engineering-tests/units/easy-openvpn/easy-openvpn.pxu | |||
1932 | @@ -0,0 +1,163 @@ | |||
1933 | 1 | # Copyright 2017 Canonical Ltd. | ||
1934 | 2 | # All rights reserved. | ||
1935 | 3 | # | ||
1936 | 4 | # Written by: | ||
1937 | 5 | # Gary Wang <gary.wang@canonical.com> | ||
1938 | 6 | |||
1939 | 7 | unit: category | ||
1940 | 8 | id: easy_openvpn | ||
1941 | 9 | _name: An easy-to-manage OpenVPN deployment. | ||
1942 | 10 | |||
1943 | 11 | id: easy_openvpn/setup/ensure_interface_connection | ||
1944 | 12 | category_id: easy_openvpn | ||
1945 | 13 | _description: Ensure the easy-openvpn interfaces are connected | ||
1946 | 14 | plugin: manual | ||
1947 | 15 | _steps: | ||
1948 | 16 | 1. If the easy-openvpn snap is already installed remove it via | ||
1949 | 17 | . | ||
1950 | 18 | $ snap remove easy-openvpn | ||
1951 | 19 | . | ||
1952 | 20 | 2. Install easy-openvpn from the store. | ||
1953 | 21 | . | ||
1954 | 22 | $ snap install easy-openvpn | ||
1955 | 23 | . | ||
1956 | 24 | _verification: | ||
1957 | 25 | Verify that you see the following when running snap interfaces: | ||
1958 | 26 | :network easy-openvpn | ||
1959 | 27 | :network-bind easy-openvpn | ||
1960 | 28 | :network-control easy-openvpn | ||
1961 | 29 | :firewall-control easy-openvpn | ||
1962 | 30 | |||
1963 | 31 | id: easy_openvpn/setup/launch_server | ||
1964 | 32 | category_id: easy_openvpn | ||
1965 | 33 | plugin: manual | ||
1966 | 34 | depends: easy_openvpn/setup/ensure_interface_connection | ||
1967 | 35 | _summary: Setup and launch an openvpn Server | ||
1968 | 36 | _purpose: | ||
1969 | 37 | Check if an openvpn server is up and running after it's configured. | ||
1970 | 38 | _steps: | ||
1971 | 39 | 1. Enable IP forwarding firstly. | ||
1972 | 40 | Note: On ubuntu core, IP forwarding is disabled by default. | ||
1973 | 41 | . | ||
1974 | 42 | $ sudo sysctl -w net.ipv4.ip_forward=1 | ||
1975 | 43 | . | ||
1976 | 44 | 2. Set correct nat device according to your server connection. | ||
1977 | 45 | Typically, the nat device is 'eth0' (default value) if | ||
1978 | 46 | the connection is over an ethernet connection. You need to set | ||
1979 | 47 | it to 'wlan0' if a wireless connection is established. | ||
1980 | 48 | Note: This fits the scenario where people usually setup a | ||
1981 | 49 | wireless connection on ubuntu core at the first boot. | ||
1982 | 50 | . | ||
1983 | 51 | $ sudo snap set easy-openvpn natdevice=wlan0 | ||
1984 | 52 | . | ||
1985 | 53 | 3. Find IP address if host machine via ifconfig or hostname: | ||
1986 | 54 | . | ||
1987 | 55 | $ hostname -I | cut -f1 -d' ' | ||
1988 | 56 | . | ||
1989 | 57 | 4. Configure the server with host machine IP address: | ||
1990 | 58 | Note: PEM pass phrase is mandatory. | ||
1991 | 59 | . | ||
1992 | 60 | $ sudo easy-openvpn.setup -u "udp://SERVER_IP" | ||
1993 | 61 | . | ||
1994 | 62 | 5. Launch the openvpn server: | ||
1995 | 63 | . | ||
1996 | 64 | sudo service snap.easy-openvpn.easy-openvpn start | ||
1997 | 65 | . | ||
1998 | 66 | _verification: | ||
1999 | 67 | Run the following command to check journal logs of easy-openvpn: | ||
2000 | 68 | . | ||
2001 | 69 | $ sudo journalctl -n 10 --no-pager -u snap.easy-openvpn.easy-openvpn | ||
2002 | 70 | . | ||
2003 | 71 | Verify if logs contain the following information like: | ||
2004 | 72 | 'Initialization Sequence Completed' | ||
2005 | 73 | |||
2006 | 74 | id: easy_openvpn/setup/add_client | ||
2007 | 75 | category_id: easy_openvpn | ||
2008 | 76 | plugin: manual | ||
2009 | 77 | depends: easy_openvpn/setup/launch_server | ||
2010 | 78 | _summary: Adding an openvpn client. | ||
2011 | 79 | _purpose: | ||
2012 | 80 | Check if a newly added client can be found at the client list of server. | ||
2013 | 81 | _steps: | ||
2014 | 82 | 1. Add an openvpn client named 'foo' and output corresponding | ||
2015 | 83 | client config file(foo.ovpn). | ||
2016 | 84 | . | ||
2017 | 85 | $ sudo easy-openvpn.add-client foo > foo.ovpn | ||
2018 | 86 | . | ||
2019 | 87 | _verification: | ||
2020 | 88 | Verify if the newly added client(foo) can be found at client list | ||
2021 | 89 | Run the following command to view the client list of the openvpn server. | ||
2022 | 90 | . | ||
2023 | 91 | $ sudo easy-openvpn.clients | ||
2024 | 92 | . | ||
2025 | 93 | |||
2026 | 94 | id: easy_openvpn/setup/connect_server | ||
2027 | 95 | category_id: easy_openvpn | ||
2028 | 96 | plugin: manual | ||
2029 | 97 | depends: easy_openvpn/setup/launch_server | ||
2030 | 98 | _summary: Connecting an openvpn server. | ||
2031 | 99 | _purpose: | ||
2032 | 100 | Check if an end user can connect to an openvpn server from another host machine. | ||
2033 | 101 | _steps: | ||
2034 | 102 | 1. Install this snap on another machine acting as an openvpn client. | ||
2035 | 103 | Copy the generated foo.ovpn from server to read/write location on this client. | ||
2036 | 104 | Remember to change the owner of foo.ovpn to 'root' to overcome | ||
2037 | 105 | dac_override denied in snappy world. | ||
2038 | 106 | . | ||
2039 | 107 | $ sudo chown root.root foo.ovpn | ||
2040 | 108 | . | ||
2041 | 109 | 2. Open a terminal and connect the server by running: | ||
2042 | 110 | . | ||
2043 | 111 | $ sudo easy-openvpn.connect-server foo.ovpn | ||
2044 | 112 | . | ||
2045 | 113 | _verification: | ||
2046 | 114 | Verify if the client logging output contains the following information. | ||
2047 | 115 | ' openvpn.* Initialization Sequence Completed' | ||
2048 | 116 | |||
2049 | 117 | id: easy_openvpn/setup/monitor_status | ||
2050 | 118 | category_id: easy_openvpn | ||
2051 | 119 | plugin: manual | ||
2052 | 120 | depends: easy_openvpn/setup/connect_server | ||
2053 | 121 | _summary: Monitor client's status. | ||
2054 | 122 | _purpose: | ||
2055 | 123 | Monitor clients connection status i.e. traffic information and router table. | ||
2056 | 124 | _steps: | ||
2057 | 125 | 1. On client side | ||
2058 | 126 | After vpn connection is established, open a web browser | ||
2059 | 127 | and navigate to any website. | ||
2060 | 128 | 2. On server side, run the following command: | ||
2061 | 129 | . | ||
2062 | 130 | $ sudo easy-openvpn.status | ||
2063 | 131 | . | ||
2064 | 132 | _verification: | ||
2065 | 133 | Verify if there's internet connection after connection is established. | ||
2066 | 134 | Observing network traffic, especially for bytes received, bytes sent | ||
2067 | 135 | from the logging output and Ensure the values are not zero. | ||
2068 | 136 | |||
2069 | 137 | id: easy_openvpn/setup/revoke_client | ||
2070 | 138 | category_id: easy_openvpn | ||
2071 | 139 | plugin: manual | ||
2072 | 140 | depends: easy_openvpn/setup/monitor_status | ||
2073 | 141 | _summary: Revoking an openvpn client. | ||
2074 | 142 | _purpose: | ||
2075 | 143 | Check if a client can connect to server after the certificate is revoked. | ||
2076 | 144 | _steps: | ||
2077 | 145 | On the server side: | ||
2078 | 146 | 1. Remove a known client on the server i.e. 'foo' | ||
2079 | 147 | . | ||
2080 | 148 | $ sudo easy-openvpn.revoke-client foo | ||
2081 | 149 | . | ||
2082 | 150 | 2. Check if the client is marked as 'REVOKED' | ||
2083 | 151 | . | ||
2084 | 152 | $ sudo easy-openvpn.clients | MATCH "foo.*REVOKED" | ||
2085 | 153 | . | ||
2086 | 154 | On the client side: | ||
2087 | 155 | 1. Kill the openvpn client if it's running. | ||
2088 | 156 | 2. Connect to server again. | ||
2089 | 157 | . | ||
2090 | 158 | $ sudo easy-openvpn.connect-server foo.ovpn | ||
2091 | 159 | . | ||
2092 | 160 | _verification: | ||
2093 | 161 | Verify if VPN connection fails after the client is revoked on the server end | ||
2094 | 162 | and the client logging output contains the following information | ||
2095 | 163 | "TLS Error: TLS handshake failed" | ||
2096 | diff --git a/com.canonical.se:engineering-tests/units/media-hub/media-hub-snap.pxu b/com.canonical.se:engineering-tests/units/media-hub/media-hub-snap.pxu | |||
2097 | 0 | new file mode 100644 | 164 | new file mode 100644 |
2098 | index 0000000..24ad2bc | |||
2099 | --- /dev/null | |||
2100 | +++ b/com.canonical.se:engineering-tests/units/media-hub/media-hub-snap.pxu | |||
2101 | @@ -0,0 +1,73 @@ | |||
2102 | 1 | # Copyright (C) 2017 Canonical Ltd. | ||
2103 | 2 | # All rights reserved. | ||
2104 | 3 | # | ||
2105 | 4 | # Written by: | ||
2106 | 5 | # Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com> | ||
2107 | 6 | |||
2108 | 7 | id: media_hub/snap_classic/play_wav | ||
2109 | 8 | category_id: media_hub | ||
2110 | 9 | plugin: manual | ||
2111 | 10 | _summary: Confined media-hub can play wav files | ||
2112 | 11 | _purpose: | ||
2113 | 12 | Check if media-hub properly plays wav files when confined. The scenario is | ||
2114 | 13 | Unity8 on Classic. | ||
2115 | 14 | _steps: | ||
2116 | 15 | 1. Install snaps and perform needed interface connections | ||
2117 | 16 | . | ||
2118 | 17 | $ snap install media-hub | ||
2119 | 18 | $ snap install --devmode mediaplayer-app | ||
2120 | 19 | $ sudo snap connect mediaplayer-app:mpris media-hub:mpris | ||
2121 | 20 | . | ||
2122 | 21 | 2. Start media-hub-server (needed until LP #1613420 is solved) | ||
2123 | 22 | . | ||
2124 | 23 | $ media-hub.media-hub-service | ||
2125 | 24 | . | ||
2126 | 25 | 3. Download sample file | ||
2127 | 26 | . | ||
2128 | 27 | $ wget -P ~/Music/ http://freewavesamples.com/files/Kawai-K5000W-Buchla-C1.wav | ||
2129 | 28 | . | ||
2130 | 29 | 4. Launch mediaplayer-app | ||
2131 | 30 | . | ||
2132 | 31 | $ /snap/bin/mediaplayer-app ~/Music/Kawai-K5000W-Buchla-C1.wav | ||
2133 | 32 | . | ||
2134 | 33 | 5. Let the song play until the end | ||
2135 | 34 | 6. Restart playback after the song finishes | ||
2136 | 35 | 7. Pause, then press play again a few times | ||
2137 | 36 | 8. While the song is playing, move the slider back and forth in time | ||
2138 | 37 | 9. Pause the song, then move the slider again | ||
2139 | 38 | _verification: | ||
2140 | 39 | Verify that in all cases the audio is played as expected. | ||
2141 | 40 | |||
2142 | 41 | id: media_hub/snap_classic/play_mp3 | ||
2143 | 42 | category_id: media_hub | ||
2144 | 43 | plugin: manual | ||
2145 | 44 | _summary: Confined media-hub can play an mp3 | ||
2146 | 45 | _purpose: | ||
2147 | 46 | Check if media-hub properly plays an mp3 when confined. The scenario is Unity8 | ||
2148 | 47 | on Classic. | ||
2149 | 48 | _steps: | ||
2150 | 49 | 1. Install snaps and perform needed interface connections | ||
2151 | 50 | . | ||
2152 | 51 | $ snap install media-hub | ||
2153 | 52 | $ snap install --devmode mediaplayer-app | ||
2154 | 53 | $ sudo snap connect mediaplayer-app:mpris media-hub:mpris | ||
2155 | 54 | . | ||
2156 | 55 | 2. Start media-hub-server (needed until LP #1613420 is solved) | ||
2157 | 56 | . | ||
2158 | 57 | $ media-hub.media-hub-service | ||
2159 | 58 | . | ||
2160 | 59 | 3. Download sample file | ||
2161 | 60 | . | ||
2162 | 61 | $ wget -P ~/Music/ http://www.stephaniequinn.com/Music/Canon.mp3 | ||
2163 | 62 | . | ||
2164 | 63 | 4. Launch mediaplayer-app | ||
2165 | 64 | . | ||
2166 | 65 | $ /snap/bin/mediaplayer-app ~/Music/Canon.mp3 | ||
2167 | 66 | . | ||
2168 | 67 | 5. Let the song play until the end | ||
2169 | 68 | 6. Restart playback after the song finishes | ||
2170 | 69 | 7. Pause, then press play again a few times | ||
2171 | 70 | 8. While the song is playing, move the slider back and forth in time | ||
2172 | 71 | 9. Pause the song, then move the slider again | ||
2173 | 72 | _verification: | ||
2174 | 73 | Verify that in all cases the audio is played as expected. | ||
2175 | diff --git a/com.canonical.se:engineering-tests/units/media-hub/media-hub.pxu b/com.canonical.se:engineering-tests/units/media-hub/media-hub.pxu | |||
2176 | 0 | new file mode 100644 | 74 | new file mode 100644 |
2177 | index 0000000..bdeec69 | |||
2178 | --- /dev/null | |||
2179 | +++ b/com.canonical.se:engineering-tests/units/media-hub/media-hub.pxu | |||
2180 | @@ -0,0 +1,65 @@ | |||
2181 | 1 | # Copyright 2017 Canonical Ltd. | ||
2182 | 2 | # All rights reserved. | ||
2183 | 3 | # | ||
2184 | 4 | # Written by: | ||
2185 | 5 | # Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com> | ||
2186 | 6 | |||
2187 | 7 | unit: category | ||
2188 | 8 | id: media_hub | ||
2189 | 9 | _name: media-hub | ||
2190 | 10 | |||
2191 | 11 | id: media_hub/video/play_h264 | ||
2192 | 12 | category_id: media_hub | ||
2193 | 13 | plugin: manual | ||
2194 | 14 | _summary: H.264 videos play as expected | ||
2195 | 15 | _purpose: | ||
2196 | 16 | Check if media-hub plays properly H.264 videos | ||
2197 | 17 | _steps: | ||
2198 | 18 | 1. Download H.264 video | ||
2199 | 19 | . | ||
2200 | 20 | $ wget https://download.blender.org/durian/trailer/sintel_trailer-720p.mp4 | ||
2201 | 21 | . | ||
2202 | 22 | 2. Start media-hub-server | ||
2203 | 23 | . | ||
2204 | 24 | $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8 | ||
2205 | 25 | . | ||
2206 | 26 | 3. Start to play the video | ||
2207 | 27 | . | ||
2208 | 28 | $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 sintel_trailer-720p.mp4 | ||
2209 | 29 | . | ||
2210 | 30 | 4. Let the video play until the end | ||
2211 | 31 | 5. Re-start after the video finishes | ||
2212 | 32 | 6. Pause, then press play again a few times | ||
2213 | 33 | 7. While the video is playing, move the slider back and forth in time | ||
2214 | 34 | 8. Pause the video, then move the slider again | ||
2215 | 35 | 9. Re-size, maximize, then minimize the window several times | ||
2216 | 36 | _verification: | ||
2217 | 37 | Verify that in all cases the video is played as expected. | ||
2218 | 38 | |||
2219 | 39 | id: media_hub/video/play_mpeg4 | ||
2220 | 40 | category_id: media_hub | ||
2221 | 41 | plugin: manual | ||
2222 | 42 | _summary: MPEG4 videos play as expected | ||
2223 | 43 | _purpose: | ||
2224 | 44 | Check if media-hub plays properly MPEG4 videos | ||
2225 | 45 | _steps: | ||
2226 | 46 | 1. Download H.264 video | ||
2227 | 47 | . | ||
2228 | 48 | $ wget https://download.blender.org/durian/trailer/Sintel_Trailer.480p.DivX_Home_Theater.divx | ||
2229 | 49 | . | ||
2230 | 50 | 2. Start media-hub-server | ||
2231 | 51 | . | ||
2232 | 52 | $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8 | ||
2233 | 53 | . | ||
2234 | 54 | 3. Start to play the video | ||
2235 | 55 | . | ||
2236 | 56 | $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 Sintel_Trailer.480p.DivX_Home_Theater.divx | ||
2237 | 57 | . | ||
2238 | 58 | 4. Let the video play until the end | ||
2239 | 59 | 5. Re-start after the video finishes | ||
2240 | 60 | 6. Pause, then press play again a few times | ||
2241 | 61 | 7. While the video is playing, move the slider back and forth in time | ||
2242 | 62 | 8. Pause the video, then move the slider again | ||
2243 | 63 | 9. Re-size, maximize, then minimize the window several times | ||
2244 | 64 | _verification: | ||
2245 | 65 | Verify that in all cases the video is played as expected. | ||
2246 | diff --git a/com.canonical.se:engineering-tests/units/modem-manager/modem-manager.pxu b/com.canonical.se:engineering-tests/units/modem-manager/modem-manager.pxu | |||
2247 | 0 | new file mode 100644 | 66 | new file mode 100644 |
2248 | index 0000000..3912ac2 | |||
2249 | --- /dev/null | |||
2250 | +++ b/com.canonical.se:engineering-tests/units/modem-manager/modem-manager.pxu | |||
2251 | @@ -0,0 +1,103 @@ | |||
2252 | 1 | # Copyright 2016 Canonical Ltd. | ||
2253 | 2 | # All rights reserved. | ||
2254 | 3 | # | ||
2255 | 4 | # Written by: | ||
2256 | 5 | # Jim Hodapp <jim.hodapp@canonical.com> | ||
2257 | 6 | # Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com> | ||
2258 | 7 | |||
2259 | 8 | unit: category | ||
2260 | 9 | id: modem_manager | ||
2261 | 10 | _name: Modem Manager | ||
2262 | 11 | |||
2263 | 12 | id: modem_manager/setup/ensure_interface_connection_setup | ||
2264 | 13 | category_id: modem_manager | ||
2265 | 14 | _description: Ensure that the modem-manager interface is connected | ||
2266 | 15 | plugin: manual | ||
2267 | 16 | _steps: | ||
2268 | 17 | 1. Install network-manager if not already installed | ||
2269 | 18 | . | ||
2270 | 19 | $ sudo snap install network-manager | ||
2271 | 20 | . | ||
2272 | 21 | 2. Connect required modem-manager/network-manager slots/plugs | ||
2273 | 22 | . | ||
2274 | 23 | $ sudo snap connect modem-manager:mmcli modem-manager:service | ||
2275 | 24 | $ sudo snap connect network-manager:nmcli network-manager:service | ||
2276 | 25 | $ sudo snap connect network-manager:modem-manager modem-manager:service | ||
2277 | 26 | $ sudo snap connect network-manager:ppp ubuntu-core:ppp | ||
2278 | 27 | . | ||
2279 | 28 | _verification: | ||
2280 | 29 | Verify that you see the following when running snap interfaces: | ||
2281 | 30 | modem-manager:service modem-manager:mmcli,network-manager:modem-manager | ||
2282 | 31 | network-manager:service network-manager:nmcli | ||
2283 | 32 | :ppp network-manager | ||
2284 | 33 | |||
2285 | 34 | id: modem_manager/modems/get_all | ||
2286 | 35 | category_id: modem_manager | ||
2287 | 36 | plugin: manual | ||
2288 | 37 | depends: modem_manager/setup/ensure_interface_connection_setup | ||
2289 | 38 | _summary: All active modem configuration items are listed | ||
2290 | 39 | _purpose: | ||
2291 | 40 | Check if the modem shows up as being recognized by modem-manager. | ||
2292 | 41 | _steps: | ||
2293 | 42 | 1. Execute the following command to retrieve the list of all detected modems: | ||
2294 | 43 | . | ||
2295 | 44 | $ sudo mmcli -L | ||
2296 | 45 | _verification: | ||
2297 | 46 | Your expected modem is shown in the output list. | ||
2298 | 47 | |||
2299 | 48 | id: modem_manager/modems/get_info | ||
2300 | 49 | category_id: modem_manager | ||
2301 | 50 | plugin: manual | ||
2302 | 51 | depends: modem_manager/setup/ensure_interface_connection_setup | ||
2303 | 52 | _summary: All modem information listed | ||
2304 | 53 | _purpose: | ||
2305 | 54 | Check if the modem details can be listed. | ||
2306 | 55 | _steps: | ||
2307 | 56 | 1. Execute the following command to retrieve the list of all detected modems. | ||
2308 | 57 | Note, the modem number is listed from the previous test: | ||
2309 | 58 | . | ||
2310 | 59 | $ sudo mmcli -m <modem_number> | ||
2311 | 60 | _verification: | ||
2312 | 61 | Your desired modem detail is listed. | ||
2313 | 62 | |||
2314 | 63 | id: modem_manager/modems/connect | ||
2315 | 64 | category_id: modem_manager | ||
2316 | 65 | plugin: manual | ||
2317 | 66 | depends: modem_manager/setup/ensure_interface_connection_setup | ||
2318 | 67 | _summary: Connect to a listed modem | ||
2319 | 68 | _purpose: | ||
2320 | 69 | Connect to a listed modem and verify connection status | ||
2321 | 70 | _steps: | ||
2322 | 71 | 1. Execute the following commands to connect to a particular modem. First run | ||
2323 | 72 | "sudo nmcli d" to find out what you need to put in <interface> (look for | ||
2324 | 73 | TYPE=gsm, the interface will be the name in the DEVICE column). It will | ||
2325 | 74 | probably be something that starts with "tty" or "cdc". Also, replace | ||
2326 | 75 | <op_apn> by looking up the APN string for your cell provider at | ||
2327 | 76 | http://www.apn-settings.com (e.g. "fast.t-mobile.com" for T-Mobile 4G). | ||
2328 | 77 | Finally, "gsmconn" is an arbitrary connection name and can be set to | ||
2329 | 78 | anything that makes sense for the connection type. | ||
2330 | 79 | . | ||
2331 | 80 | $ sudo nmcli c add type gsm ifname <interface> con-name gsmconn apn <op_apn> | ||
2332 | 81 | $ sudo nmcli r wwan on | ||
2333 | 82 | . | ||
2334 | 83 | 2. Check that the connection is up with "sudo nmcli d". It should show that | ||
2335 | 84 | state is "connected". This can take some time depending on network | ||
2336 | 85 | conditions and on the modem type. | ||
2337 | 86 | . | ||
2338 | 87 | 3. Check which is the network interface for the cellular connection. For this, | ||
2339 | 88 | fist run | ||
2340 | 89 | . | ||
2341 | 90 | $ sudo nmcli d show <interface> | ||
2342 | 91 | . | ||
2343 | 92 | (here <interface> is the one from point 1), check the IP4.ADDRESS field, | ||
2344 | 93 | then run | ||
2345 | 94 | . | ||
2346 | 95 | $ ip address | ||
2347 | 96 | . | ||
2348 | 97 | and there you can find the network interface that owns that address. | ||
2349 | 98 | . | ||
2350 | 99 | 4. Add a route to 8.8.8.8 with | ||
2351 | 100 | . | ||
2352 | 101 | $ sudo ip route add 8.8.8.8 dev <network-interface> | ||
2353 | 102 | _verification: | ||
2354 | 103 | Verify that you have a modem connection by pinging 8.8.8.8. | ||
2355 | diff --git a/com.canonical.se:engineering-tests/units/network-manager/network-manager.pxu b/com.canonical.se:engineering-tests/units/network-manager/network-manager.pxu | |||
2356 | 0 | new file mode 100644 | 104 | new file mode 100644 |
2357 | index 0000000..e905919 | |||
2358 | --- /dev/null | |||
2359 | +++ b/com.canonical.se:engineering-tests/units/network-manager/network-manager.pxu | |||
2360 | @@ -0,0 +1,379 @@ | |||
2361 | 1 | # Copyright 2016 Canonical Ltd. | ||
2362 | 2 | # All rights reserved. | ||
2363 | 3 | # | ||
2364 | 4 | # Written by: | ||
2365 | 5 | # Lorn Potter <lorn.potter@canonical.com> | ||
2366 | 6 | # Simon Fels <simon.fels@canonical.com> | ||
2367 | 7 | |||
2368 | 8 | unit: category | ||
2369 | 9 | id: network_manager | ||
2370 | 10 | _name: Network Manager | ||
2371 | 11 | |||
2372 | 12 | id: network_manager/misc/check_for_crashes | ||
2373 | 13 | category_id: network_manager | ||
2374 | 14 | plugin: manual | ||
2375 | 15 | _summary: Verify that NetworkManager hasn't crashed in previous runs. | ||
2376 | 16 | _steps: | ||
2377 | 17 | 1. Power on a Desktop system, this tests does not apply elsewhere. | ||
2378 | 18 | 2. List content of /var/crash for crash dumps: | ||
2379 | 19 | . | ||
2380 | 20 | ls -l /var/crash | ||
2381 | 21 | . | ||
2382 | 22 | _verification: | ||
2383 | 23 | 1. Check that /var/crash is empty. | ||
2384 | 24 | |||
2385 | 25 | id: network_manager/ethernet/enable_support | ||
2386 | 26 | category_id: network_manager | ||
2387 | 27 | plugin: manual | ||
2388 | 28 | _summary: Ethernet support for NetworkManager needs to be manually enabled | ||
2389 | 29 | _purpose: | ||
2390 | 30 | By default ethernet support is disabled in the network-manager snap. In order | ||
2391 | 31 | to be able to get it managed through NetworkManager a few manual steps need to | ||
2392 | 32 | be performed. | ||
2393 | 33 | _steps: | ||
2394 | 34 | 1. Create /etc/netplan/00-default-nm-renderer.yaml with the following content: | ||
2395 | 35 | . | ||
2396 | 36 | network: | ||
2397 | 37 | renderer: NetworkManager | ||
2398 | 38 | . | ||
2399 | 39 | 2. Drop any other files from /etc/netplan and reboot the device. | ||
2400 | 40 | _verification: | ||
2401 | 41 | NOTE: The device may get another IP address assigned as before. Use a network | ||
2402 | 42 | scanner or a monitor+keyboard to check which IP address it got assigned. | ||
2403 | 43 | . | ||
2404 | 44 | Once the device is rebooted you should be able to connect to it by using the | ||
2405 | 45 | network connection offered on the ethernet port. When logged into the device | ||
2406 | 46 | verify NetworkManager automatically connected the ethernet port: | ||
2407 | 47 | . | ||
2408 | 48 | $ network-manager.nmcli d | ||
2409 | 49 | DEVICE TYPE STATE CONNECTION | ||
2410 | 50 | eth0 ethernet connected eth0 | ||
2411 | 51 | [...] | ||
2412 | 52 | . | ||
2413 | 53 | The state of all ethernet devices with a plugged cable and a working network | ||
2414 | 54 | behind should be 'connected'. | ||
2415 | 55 | |||
2416 | 56 | id: network_manager/ethernet/all_ports_detected | ||
2417 | 57 | depends: network_manager/ethernet/enable_support | ||
2418 | 58 | category_id: network_manager | ||
2419 | 59 | plugin: manual | ||
2420 | 60 | _summary: NetworkManager should detect all available ethernet ports | ||
2421 | 61 | _purpose: | ||
2422 | 62 | NetworkManager should detect all available ethernet ports by default | ||
2423 | 63 | on a system and list them as usable devices. | ||
2424 | 64 | _steps: | ||
2425 | 65 | 1. List all available ethernet ports | ||
2426 | 66 | $ ifconfig -a | grep -E '$eth' | ||
2427 | 67 | $ ifconfig -a | grep -E '$en' | ||
2428 | 68 | 2. List all ethernet ports NetworkManager knows about | ||
2429 | 69 | $ network-manager.nmcli d | ||
2430 | 70 | _verification: | ||
2431 | 71 | Both steps should show the same list of ethernet network interfaces. | ||
2432 | 72 | |||
2433 | 73 | id: network_manager/ethernet/auto_connected | ||
2434 | 74 | depends: network_manager/ethernet/enable_support | ||
2435 | 75 | category_id: network_manager | ||
2436 | 76 | plugin: manual | ||
2437 | 77 | _summary: NetworkManager should auto-connect any ethernet port with a link | ||
2438 | 78 | _purpose: | ||
2439 | 79 | When a cable is plugged into an ethernet port NetworkManager should try | ||
2440 | 80 | to automatically connect the port. | ||
2441 | 81 | . | ||
2442 | 82 | NOTE: This test assumes that the cable you plug into the port is connected | ||
2443 | 83 | to a network which offers a DHCP server. | ||
2444 | 84 | _steps: | ||
2445 | 85 | 1. Ensure that there is no connection for the port you want to use for | ||
2446 | 86 | testing. Using a serial console to perform this test is recommended. | ||
2447 | 87 | 2. Drop any existing connections listed by | ||
2448 | 88 | $ network-manager.nmcli c show | ||
2449 | 89 | which are meant for the ethernet port of the device with | ||
2450 | 90 | $ network-manager.nmcli c delete <UUID> | ||
2451 | 91 | 3. Plug the cable into the ethernet port. | ||
2452 | 92 | _verification: | ||
2453 | 93 | The ethernet port should be automatically connected by NetworkManager. This | ||
2454 | 94 | can be verified with | ||
2455 | 95 | $ network-manager.nmcli d | grep <ethernet device name> | ||
2456 | 96 | eth0 ethernet connected <connection name> | ||
2457 | 97 | Please note that the <connection name> can be different as its | ||
2458 | 98 | automatically selected by NetworkManager. It can be "Wired Connection 1" | ||
2459 | 99 | for example. | ||
2460 | 100 | |||
2461 | 101 | id: network_manager/ethernet/auto_connect_existing_connection | ||
2462 | 102 | depends: network_manager/ethernet/enable_support | ||
2463 | 103 | category_id: network_manager | ||
2464 | 104 | plugin: manual | ||
2465 | 105 | _summary: Cable plug/unplug should give an existing connection | ||
2466 | 106 | _purpose: | ||
2467 | 107 | When a cable is unplugged and plugged again the ethernet port should | ||
2468 | 108 | be automatically reconnected. | ||
2469 | 109 | _steps: | ||
2470 | 110 | 1. Check if the ethernet port is currently connected | ||
2471 | 111 | $ network-manager.nmcli d | ||
2472 | 112 | 2. Unplug the cable from the ethernet port and check the connection | ||
2473 | 113 | $ network-manager.nmcli d | ||
2474 | 114 | 3. Plug the cable again and check the connection status. | ||
2475 | 115 | _verification: | ||
2476 | 116 | Before the cable is unplugged the ethernet port should be marked | ||
2477 | 117 | as connected. Once the cable is removed the connection status | ||
2478 | 118 | should switch to unconnected. When plugged back in, it should be marked | ||
2479 | 119 | again as connected. | ||
2480 | 120 | |||
2481 | 121 | id: network_manager/ethernet/unmanaged | ||
2482 | 122 | category_id: network_manager | ||
2483 | 123 | plugin: manual | ||
2484 | 124 | depends: network_manager/ethernet/auto_connected | ||
2485 | 125 | _summary: Check if ethernet device is unmanaged. | ||
2486 | 126 | _purpose: | ||
2487 | 127 | Check if the ethernet device is not managed by Network Manager. | ||
2488 | 128 | . | ||
2489 | 129 | NOTE: This only applies to devices where ethernet is not managed by | ||
2490 | 130 | NetworkManager. Check if /etc/netplan/00-default-nm-renderer.yaml | ||
2491 | 131 | exists. If it does not, then NetworkManager doesn't touch any | ||
2492 | 132 | ethernet connection. If it exists, skip this test. | ||
2493 | 133 | _steps: | ||
2494 | 134 | 1. Execute the following command to retrieve the list of all detected connections. | ||
2495 | 135 | Note, the AP number is listed from the previous test: | ||
2496 | 136 | . | ||
2497 | 137 | $ /snap/bin/network-manager.nmcli d | grep en | ||
2498 | 138 | _verification: | ||
2499 | 139 | The network device is listed as 'unmanaged', as an example: | ||
2500 | 140 | enxb827ebf6b919 ethernet unmanaged -- | ||
2501 | 141 | |||
2502 | 142 | id: network_manager/connections/get_all | ||
2503 | 143 | category_id: network_manager | ||
2504 | 144 | plugin: manual | ||
2505 | 145 | depends: network_manager/ethernet/auto_connected | ||
2506 | 146 | _summary: All active AP configuration items are listed | ||
2507 | 147 | _purpose: | ||
2508 | 148 | Check if the AP shows up as being recognized by Network Manager. | ||
2509 | 149 | _steps: | ||
2510 | 150 | 1. Execute the following command to retrieve the list of all detected connections: | ||
2511 | 151 | . | ||
2512 | 152 | $ /snap/bin/network-manager.nmcli d wifi list | ||
2513 | 153 | _verification: | ||
2514 | 154 | Your expected AP is shown in the output list for example: | ||
2515 | 155 | pool1 Infra 6 54 Mbit/s 75 *** WPA2 | ||
2516 | 156 | |||
2517 | 157 | id: network_manager/connections/agent | ||
2518 | 158 | category_id: network_manager | ||
2519 | 159 | plugin: manual | ||
2520 | 160 | depends: network_manager/ethernet/auto_connected | ||
2521 | 161 | _summary: Register for secret agent | ||
2522 | 162 | _purpose: | ||
2523 | 163 | Register for Network Manager's secret agent and verify status | ||
2524 | 164 | _steps: | ||
2525 | 165 | 1. Execute the following command to register secret agent: | ||
2526 | 166 | . | ||
2527 | 167 | $ /snap/bin/network-manager.nmcli a | ||
2528 | 168 | _verification: | ||
2529 | 169 | Output should be similiar to this: | ||
2530 | 170 | nmcli successfully registered as a Network Manager's secret agent. | ||
2531 | 171 | nmcli successfully registered as a polkit agent. | ||
2532 | 172 | |||
2533 | 173 | id: network_manager/connections/connect | ||
2534 | 174 | category_id: network_manager | ||
2535 | 175 | plugin: manual | ||
2536 | 176 | depends: network_manager/ethernet/auto_connected | ||
2537 | 177 | _summary: Connect to a listed AP | ||
2538 | 178 | _purpose: | ||
2539 | 179 | Connect to a listed AP and verify connection status | ||
2540 | 180 | _steps: | ||
2541 | 181 | 1. Execute the following commands to connect to a particular AP. | ||
2542 | 182 | . | ||
2543 | 183 | $ /snap/bin/network-manager.nmcli dev wifi con "yourssid" password "yourpassword" | ||
2544 | 184 | Note, replace yourssid with the ssid if the AP you will connect to, and replace yourpassword | ||
2545 | 185 | with the actual password/passphrase. | ||
2546 | 186 | _verification: | ||
2547 | 187 | Verify that you have a AP connection by issuing this command: | ||
2548 | 188 | $ ifconfig | grep -A 2 wl | ||
2549 | 189 | . | ||
2550 | 190 | verifying that the interface has an IP address with output similiar to this: | ||
2551 | 191 | wlp5s0 Link encap:Ethernet HWaddr 70:77:81:33:92:6b | ||
2552 | 192 | inet addr:10.0.0.108 Bcast:10.0.0.255 Mask:255.255.255.0 | ||
2553 | 193 | inet6 addr: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64 Scope:Global | ||
2554 | 194 | |||
2555 | 195 | id: network_manager/connections/get_info | ||
2556 | 196 | category_id: network_manager | ||
2557 | 197 | plugin: manual | ||
2558 | 198 | depends: network_manager/ethernet/auto_connected | ||
2559 | 199 | _summary: All AP information listed | ||
2560 | 200 | _purpose: | ||
2561 | 201 | Check if the AP details can be listed. | ||
2562 | 202 | _steps: | ||
2563 | 203 | 1. Execute the following command to retrieve the list of all detected connections. | ||
2564 | 204 | Note, the AP ssid is listed from the previous test: | ||
2565 | 205 | . | ||
2566 | 206 | $ /snap/bin/network-manager.nmcli -p -f general,ip4,ip6 c show <AP_SSID> | ||
2567 | 207 | _verification: | ||
2568 | 208 | Your desired AP detail is listed and has ip4/ip6 address. | ||
2569 | 209 | =============================================================================== | ||
2570 | 210 | Activate connection details (1554e3b2-76e6-4adc-b986-215b7393f8d9) | ||
2571 | 211 | =============================================================================== | ||
2572 | 212 | GENERAL.NAME: pool1 | ||
2573 | 213 | GENERAL.UUID: 1554e3b2-76e6-4adc-b986-215b7393f8d9 | ||
2574 | 214 | GENERAL.DEVICES: wlp5s0 | ||
2575 | 215 | GENERAL.STATE: activated | ||
2576 | 216 | GENERAL.DEFAULT: no | ||
2577 | 217 | GENERAL.DEFAULT6: no | ||
2578 | 218 | GENERAL.VPN: no | ||
2579 | 219 | GENERAL.ZONE: -- | ||
2580 | 220 | GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2 | ||
2581 | 221 | GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/3 | ||
2582 | 222 | GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/0 | ||
2583 | 223 | GENERAL.MASTER-PATH: -- | ||
2584 | 224 | ------------------------------------------------------------------------------- | ||
2585 | 225 | IP4.ADDRESS[1]: 10.0.0.108/24 | ||
2586 | 226 | IP4.GATEWAY: 10.0.0.138 | ||
2587 | 227 | IP4.DNS[1]: 10.0.0.138 | ||
2588 | 228 | IP4.DOMAIN[1]: gateway | ||
2589 | 229 | ------------------------------------------------------------------------------- | ||
2590 | 230 | IP6.ADDRESS[1]: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64 | ||
2591 | 231 | IP6.ADDRESS[2]: 2001:8003:6501:2000:7277:81ff:fe33:926b/64 | ||
2592 | 232 | IP6.ADDRESS[3]: fe80::7277:81ff:fe33:926b/64 | ||
2593 | 233 | IP6.GATEWAY: fe80::e2b9:e5ff:fe5a:91b0 | ||
2594 | 234 | IP6.DNS[1]: 2001:8003:6501:2000::1 | ||
2595 | 235 | IP6.DOMAIN[1]: gateway | ||
2596 | 236 | ------------------------------------------------------------------------------- | ||
2597 | 237 | |||
2598 | 238 | id: network_manager/ethernet/device_supports_wol | ||
2599 | 239 | depends: network_manager/ethernet/enable_support | ||
2600 | 240 | category_id: network_manager | ||
2601 | 241 | plugin: manual | ||
2602 | 242 | _summary: Verify that the device under test has support for Wake-on-LAN | ||
2603 | 243 | _purpose: | ||
2604 | 244 | Verify that the device you're running the tests on supports Wake-on-LAN. For | ||
2605 | 245 | example, devices like the Raspberry PI (1-3) do not support Wake-on-LAN. | ||
2606 | 246 | _steps: | ||
2607 | 247 | Verify that your device supports Wake-on-LAN. You can look into the specs | ||
2608 | 248 | for your device, ask the vendor or search through the internet. | ||
2609 | 249 | . | ||
2610 | 250 | For example the Raspberry PI can't suspend to RAM which is discussed and | ||
2611 | 251 | outlined in https://github.com/raspberrypi/linux/issues/1281 which also | ||
2612 | 252 | makes Wake-on-LAN impossible. | ||
2613 | 253 | _verification: | ||
2614 | 254 | If device does not support Wake-on-LAN please SKIP this test case and all | ||
2615 | 255 | depending test cases will be skipped too. If Wake-on-LAN is supported mark | ||
2616 | 256 | test as PASSED. | ||
2617 | 257 | |||
2618 | 258 | id: network_manager/ethernet/uses_global_wol | ||
2619 | 259 | depends: network_manager/ethernet/device_supports_wol | ||
2620 | 260 | category_id: network_manager | ||
2621 | 261 | plugin: manual | ||
2622 | 262 | _summary: Ethernet connections are using global wake-on-lan setting | ||
2623 | 263 | _purpose: | ||
2624 | 264 | Check if an ethernet connection created by NetworkManager automatically uses the | ||
2625 | 265 | global default for wake-on-lan. | ||
2626 | 266 | . | ||
2627 | 267 | NOTE: This requires a system which is configured to not use netplan to | ||
2628 | 268 | generate connections for NetworkManager. On such a system an ethernet | ||
2629 | 269 | connection will always have wake-on-lan disabled as netplan does this | ||
2630 | 270 | by default if not explicitly stated in the netplan configuration. | ||
2631 | 271 | _steps: | ||
2632 | 272 | 1. Find connection UUID for the ethernet port | ||
2633 | 273 | $ network-manager.nmcli c show | grep eth0 | ||
2634 | 274 | 2. Verify the connection uses the global wake-on-lan setting | ||
2635 | 275 | $ network-manager.nmcli -m multiline -f 802-3-ethernet.wake-on-lan c show <UUID> | ||
2636 | 276 | _verification: | ||
2637 | 277 | The output should look like this: | ||
2638 | 278 | . | ||
2639 | 279 | 802-3-ethernet.wake-on-lan: 1 (default) | ||
2640 | 280 | |||
2641 | 281 | id: network_manager/ethernet/has_wol_enabled_by_default | ||
2642 | 282 | depends: network_manager/ethernet/device_supports_wol | ||
2643 | 283 | category_id: network_manager | ||
2644 | 284 | plugin: manual | ||
2645 | 285 | _summary: Ethernet port has wake-on-lan enabled by default | ||
2646 | 286 | _purpose: | ||
2647 | 287 | Check if the actual ethernet device has wake-on-lan correctly enabled when | ||
2648 | 288 | its connection is maintained by NetworkManager. | ||
2649 | 289 | _steps: | ||
2650 | 290 | 1. Install the se-test-tools snap | ||
2651 | 291 | $ snap install --devmode --edge se-test-tools | ||
2652 | 292 | 2. Check the ethernet port for the wake-on-lan setting (eth0 in this case) | ||
2653 | 293 | $ sudo se-test-tools.ethtool eth0 | ||
2654 | 294 | _verification: | ||
2655 | 295 | The output should be similar to this: | ||
2656 | 296 | Settings for eth0: | ||
2657 | 297 | [...] | ||
2658 | 298 | Supports Wake-on: pumbg | ||
2659 | 299 | Wake-on: g | ||
2660 | 300 | [...] | ||
2661 | 301 | . | ||
2662 | 302 | The relevant line is the "Wake-on:" one. It should have the value "g" | ||
2663 | 303 | set which marks the port as waking up on the magic packet. | ||
2664 | 304 | |||
2665 | 305 | id: network_manager/ethernet/wakes_up_with_wol | ||
2666 | 306 | depends: network_manager/ethernet/device_supports_wol | ||
2667 | 307 | category_id: network_manager | ||
2668 | 308 | plugin: manual | ||
2669 | 309 | _summary: Wake on LAN configured by NetworkManager can wake up the device | ||
2670 | 310 | _purpose: | ||
2671 | 311 | Check that another system can wake up from S5 the SUT using the connected ethernet port. | ||
2672 | 312 | _steps: | ||
2673 | 313 | 1. Ensure there is an ethernet cable attached to one of the ports and it's configured via | ||
2674 | 314 | NetworkManager. Check with | ||
2675 | 315 | $ network-manager.nmcli d | grep eth0 | ||
2676 | 316 | 2. Note the MAC address of the the eth0 port | ||
2677 | 317 | $ ifconfig eth0 | ||
2678 | 318 | 3. Power off the system by running | ||
2679 | 319 | $ sudo poweroff | ||
2680 | 320 | 4. From another computer on the same network run the following command: | ||
2681 | 321 | $ wakeonlan {mac} | ||
2682 | 322 | If wakeonlan tool is not installed run: | ||
2683 | 323 | $ sudo apt install wakeonlan | ||
2684 | 324 | _verification: | ||
2685 | 325 | Did the SUT wake up from S5? | ||
2686 | 326 | |||
2687 | 327 | id: network_manager/debug/default_off | ||
2688 | 328 | category_id: network_manager | ||
2689 | 329 | plugin: manual | ||
2690 | 330 | _summary: The debug option defaults to off | ||
2691 | 331 | _purpose: | ||
2692 | 332 | Makes sure that the debug option defaults to disabled | ||
2693 | 333 | _steps: | ||
2694 | 334 | 1. Install the network-manager snap fresh (i.e. not an upgrade) | ||
2695 | 335 | 2. Run the following: | ||
2696 | 336 | . | ||
2697 | 337 | $ sudo snap get network-manager debug.enable | ||
2698 | 338 | _verification: | ||
2699 | 339 | Verify that the returned value is "false" | ||
2700 | 340 | |||
2701 | 341 | id: network_manager/debug/disabling_works | ||
2702 | 342 | category_id: network_manager | ||
2703 | 343 | plugin: manual | ||
2704 | 344 | depends: network_manager/debug/default_off | ||
2705 | 345 | _summary: Disabling debug actually disables debug logging | ||
2706 | 346 | _purpose: | ||
2707 | 347 | Makes sure that when debug.enabled is set to "false" no debug logs are written | ||
2708 | 348 | _steps: | ||
2709 | 349 | 1. Make sure that debug is disabled. Run: | ||
2710 | 350 | . | ||
2711 | 351 | $ sudo snap set network-manager debug.enable=false | ||
2712 | 352 | . | ||
2713 | 353 | 2. Show only most recent journal entries | ||
2714 | 354 | . | ||
2715 | 355 | $ sudo journalctl -f -u snap.network-manager.networkmanager.service | ||
2716 | 356 | . | ||
2717 | 357 | _verification: | ||
2718 | 358 | Verify that any new log entry in journal coming from network-manager is in <info>, | ||
2719 | 359 | <warn> or <error>, but never in <debug> level | ||
2720 | 360 | |||
2721 | 361 | id: network_manager/automount/debug_works | ||
2722 | 362 | category_id: network_manager | ||
2723 | 363 | plugin: manual | ||
2724 | 364 | depends: network_manager/debug/default_off | ||
2725 | 365 | _summary: When debug is enabled, debug logs are available | ||
2726 | 366 | _purpose: | ||
2727 | 367 | Makes sure that when debug option is enabled the <debug> logs are available | ||
2728 | 368 | _steps: | ||
2729 | 369 | 1. Make sure that debug is enabled. Run: | ||
2730 | 370 | . | ||
2731 | 371 | $ sudo snap set network-manager debug.enable=true | ||
2732 | 372 | . | ||
2733 | 373 | 2. Show only most recent journal entries | ||
2734 | 374 | . | ||
2735 | 375 | $ sudo journalctl -f -u snap.network-manager.networkmanager.service | ||
2736 | 376 | . | ||
2737 | 377 | _verification: | ||
2738 | 378 | Verify that any new log entry in journal coming from network-manager is in <debug> | ||
2739 | 379 | level | ||
2740 | diff --git a/com.canonical.se:engineering-tests/units/network-manager/power_management.pxu b/com.canonical.se:engineering-tests/units/network-manager/power_management.pxu | |||
2741 | 0 | new file mode 100644 | 380 | new file mode 100644 |
2742 | index 0000000..8ae9b78 | |||
2743 | --- /dev/null | |||
2744 | +++ b/com.canonical.se:engineering-tests/units/network-manager/power_management.pxu | |||
2745 | @@ -0,0 +1,31 @@ | |||
2746 | 1 | # Copyright 2016 Canonical Ltd. | ||
2747 | 2 | # All rights reserved. | ||
2748 | 3 | # | ||
2749 | 4 | # Written by: | ||
2750 | 5 | # Simon Fels <simon.fels@canonical.com> | ||
2751 | 6 | |||
2752 | 7 | id: network_manager/power_management/connections_come_back_after_resume | ||
2753 | 8 | category_id: network_manager | ||
2754 | 9 | plugin: manual | ||
2755 | 10 | _summary: Connections managed by NetworkManager should come back when device wakes up | ||
2756 | 11 | _purpose: | ||
2757 | 12 | When a device goes to sleep NetworkManager disconnects all connections but | ||
2758 | 13 | will reconnect them back when the device reawakens. | ||
2759 | 14 | _steps: | ||
2760 | 15 | 1. Verify the device is connectd to a WiFi or ethernet network. You can use | ||
2761 | 16 | . | ||
2762 | 17 | $ network-manager.nmcli d | ||
2763 | 18 | . | ||
2764 | 19 | to check if a wireless network interface is connected or not. | ||
2765 | 20 | 2. Suspend the device by calling | ||
2766 | 21 | . | ||
2767 | 22 | $ systemctl suspend | ||
2768 | 23 | . | ||
2769 | 24 | 3. Wake up the device again by pressing its power button | ||
2770 | 25 | _verification: | ||
2771 | 26 | When the device comes back from suspend after pressing the power button | ||
2772 | 27 | verify with | ||
2773 | 28 | . | ||
2774 | 29 | $ network-manager.nmcli d | ||
2775 | 30 | . | ||
2776 | 31 | that the previously connected WiFi/ethernet network is again connected. | ||
2777 | diff --git a/com.canonical.se:engineering-tests/units/network-manager/snap.pxu b/com.canonical.se:engineering-tests/units/network-manager/snap.pxu | |||
2778 | 0 | new file mode 100644 | 32 | new file mode 100644 |
2779 | index 0000000..419901a | |||
2780 | --- /dev/null | |||
2781 | +++ b/com.canonical.se:engineering-tests/units/network-manager/snap.pxu | |||
2782 | @@ -0,0 +1,101 @@ | |||
2783 | 1 | # Copyright 2017 Canonical Ltd. | ||
2784 | 2 | # All rights reserved. | ||
2785 | 3 | # | ||
2786 | 4 | # Written by: | ||
2787 | 5 | # Matteo Croce <matteo.croce@canonical.com> | ||
2788 | 6 | |||
2789 | 7 | id: network_manager/snap/check_interfaces | ||
2790 | 8 | category_id: network_manager | ||
2791 | 9 | plugin: manual | ||
2792 | 10 | _summary: Verify that snap interfaces are correctly connected | ||
2793 | 11 | _steps: | ||
2794 | 12 | 1. Install the snap from the store: | ||
2795 | 13 | . | ||
2796 | 14 | $ snap install network-manager | ||
2797 | 15 | . | ||
2798 | 16 | _verification: | ||
2799 | 17 | 1. Verify that the 'network-manager' snap has all required plug connected: | ||
2800 | 18 | . | ||
2801 | 19 | $ snap interfaces |grep network-manager | ||
2802 | 20 | :network-setup-observe network-manager | ||
2803 | 21 | :ppp network-manager | ||
2804 | 22 | modem-manager:service modem-manager:mmcli,network-manager:modem-manager | ||
2805 | 23 | network-manager:service network-manager:nmcli | ||
2806 | 24 | . | ||
2807 | 25 | |||
2808 | 26 | id: network_manager/wifi/periodic_scanning | ||
2809 | 27 | category_id: network_manager | ||
2810 | 28 | depends: network_manager/snap/check_interfaces | ||
2811 | 29 | plugin: manual | ||
2812 | 30 | _summary: Verify that periodic Wi-Fi scanning occurs | ||
2813 | 31 | _steps: | ||
2814 | 32 | 1. Run wpa_cli to ensure that periodic scanning is occurring: | ||
2815 | 33 | . | ||
2816 | 34 | $ sudo wpa_cli | ||
2817 | 35 | wpa_cli v2.4 | ||
2818 | 36 | . | ||
2819 | 37 | Selected interface 'wlp3s0' | ||
2820 | 38 | . | ||
2821 | 39 | Interactive mode | ||
2822 | 40 | . | ||
2823 | 41 | . | ||
2824 | 42 | 2. Get the scan results with: | ||
2825 | 43 | . | ||
2826 | 44 | > scan_results | ||
2827 | 45 | . | ||
2828 | 46 | _verification: | ||
2829 | 47 | 1. You should see some output like this at least once every 120 seconds | ||
2830 | 48 | in the wpa_cli output | ||
2831 | 49 | . | ||
2832 | 50 | <3>CTRL-EVENT-SCAN-STARTED | ||
2833 | 51 | <3>CTRL-EVENT-SCAN-RESULTS | ||
2834 | 52 | . | ||
2835 | 53 | 2. You should see the list of reachable Access Points, eg. | ||
2836 | 54 | . | ||
2837 | 55 | bssid / frequency / signal level / flags / ssid | ||
2838 | 56 | 12:34:56:78:89:ab 2437 -85 [WPA2-PSK-CCMP+TKIP][ESS] Home-AP | ||
2839 | 57 | |||
2840 | 58 | |||
2841 | 59 | id: network_manager/wifi/no_dbus_duplicate_signals | ||
2842 | 60 | category_id: network_manager | ||
2843 | 61 | depends: network_manager/snap/check_interfaces | ||
2844 | 62 | plugin: manual | ||
2845 | 63 | _summary: Ensure that dbus signals aren't duplicated | ||
2846 | 64 | _steps: | ||
2847 | 65 | 1. Run dbus-monitor: | ||
2848 | 66 | . | ||
2849 | 67 | dbus-monitor --system --profile type=signal,interface=org.freedesktop.DBus.Properties | ||
2850 | 68 | . | ||
2851 | 69 | _verification: | ||
2852 | 70 | 1. Ensure that when scanning occurs, there aren't duplicate PropertiesChanged | ||
2853 | 71 | signals sent for each AccessPoint object path. | ||
2854 | 72 | There should be a single DBus PropertiesChanged signal for each /AccessPoint/X): | ||
2855 | 73 | . | ||
2856 | 74 | sig 1489573828 1805 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/0 org.freedesktop.DBus.Properties PropertiesChanged | ||
2857 | 75 | sig 1489573828 1806 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/1 org.freedesktop.DBus.Properties PropertiesChanged | ||
2858 | 76 | sig 1489573828 1807 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/2 org.freedesktop.DBus.Properties PropertiesChanged | ||
2859 | 77 | sig 1489573828 1808 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/3 org.freedesktop.DBus.Properties PropertiesChanged | ||
2860 | 78 | sig 1489573828 1809 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/4 org.freedesktop.DBus.Properties PropertiesChanged | ||
2861 | 79 | |||
2862 | 80 | |||
2863 | 81 | id: network_manager/wifi/ap_expires | ||
2864 | 82 | category_id: network_manager | ||
2865 | 83 | depends: network_manager/snap/check_interfaces | ||
2866 | 84 | plugin: manual | ||
2867 | 85 | _summary: Ensure that AccessPoint entries are volatile | ||
2868 | 86 | _steps: | ||
2869 | 87 | 1. Bring up an AP (eg. from a smartphone) | ||
2870 | 88 | 2. Start wpa_cli and do a wireless scan: | ||
2871 | 89 | . | ||
2872 | 90 | $ wpa_cli | ||
2873 | 91 | > scan | ||
2874 | 92 | . | ||
2875 | 93 | wait 10 seconds, and get the scan results. | ||
2876 | 94 | . | ||
2877 | 95 | > scan_results | ||
2878 | 96 | . | ||
2879 | 97 | 3. Shutdown the AP on the smartphone | ||
2880 | 98 | 4. Wait 120 seconds | ||
2881 | 99 | 5. Retry the wireless scan | ||
2882 | 100 | _verification: | ||
2883 | 101 | 1. In the second scan the smartphone AP should not be present | ||
2884 | diff --git a/com.canonical.se:engineering-tests/units/network-manager/wireless.pxu b/com.canonical.se:engineering-tests/units/network-manager/wireless.pxu | |||
2885 | 0 | new file mode 100644 | 102 | new file mode 100644 |
2886 | index 0000000..52a84d2 | |||
2887 | --- /dev/null | |||
2888 | +++ b/com.canonical.se:engineering-tests/units/network-manager/wireless.pxu | |||
2889 | @@ -0,0 +1,54 @@ | |||
2890 | 1 | # Copyright 2016 Canonical Ltd. | ||
2891 | 2 | # All rights reserved. | ||
2892 | 3 | # | ||
2893 | 4 | # Written by: | ||
2894 | 5 | # Simon Fels <simon.fels@canonical.com> | ||
2895 | 6 | |||
2896 | 7 | id: network_manager/wireless/powersave_off_by_default | ||
2897 | 8 | category_id: network_manager | ||
2898 | 9 | plugin: manual | ||
2899 | 10 | _summary: NetworkManager should disable powersave by default | ||
2900 | 11 | _purpose: | ||
2901 | 12 | The powersave configuration option should cause the mode on the | ||
2902 | 13 | actual hardware device to be turned off by default. | ||
2903 | 14 | _steps: | ||
2904 | 15 | Install wireless-tools snap and check that powersave is turned off | ||
2905 | 16 | on the actual hardware wireless device. | ||
2906 | 17 | $ snap install wireless-tools | ||
2907 | 18 | _verification: | ||
2908 | 19 | The iw utility should return the following for the selected wireless device | ||
2909 | 20 | $ sudo wireless-tools.iw dev wlan0 get power_save | ||
2910 | 21 | Power save: off | ||
2911 | 22 | |||
2912 | 23 | id: network_manager/wireless/powersave_config_default_off | ||
2913 | 24 | category_id: network_manager | ||
2914 | 25 | plugin: manual | ||
2915 | 26 | _summary: | ||
2916 | 27 | The configuration option should be set to disable by default | ||
2917 | 28 | _purpose: | ||
2918 | 29 | On installation the snap sets the option to a default value | ||
2919 | 30 | which should always be the same. | ||
2920 | 31 | _steps: | ||
2921 | 32 | Retrieve the configuration value via | ||
2922 | 33 | $ snap get network-manager wifi.powersave | ||
2923 | 34 | _verification: | ||
2924 | 35 | The returned value should be "disable". | ||
2925 | 36 | |||
2926 | 37 | id: network_manager/wireless/powersave_can_be_enabled | ||
2927 | 38 | category_id: network_manager | ||
2928 | 39 | plugin: manual | ||
2929 | 40 | _summary: | ||
2930 | 41 | Enabling powersave with the configuration option of the snap should turn it on. | ||
2931 | 42 | _purpose: | ||
2932 | 43 | The network-manager snap uses a configure hook to control how | ||
2933 | 44 | the WiFi powersave option is set. It should be possible to enable | ||
2934 | 45 | the option on the actual hardware wireless device with it. | ||
2935 | 46 | _steps: | ||
2936 | 47 | 1. Enable powersave via the configure hook | ||
2937 | 48 | $ snap set network-manager wifi.powersave=enable | ||
2938 | 49 | _verification: | ||
2939 | 50 | Powersave should now be turned on for all wireless devices. This | ||
2940 | 51 | can be verified with | ||
2941 | 52 | $ snap install wireless-tools | ||
2942 | 53 | $ sudo wireless-tools.iw dev wlan0 get power_save | ||
2943 | 54 | Power save: on | ||
2944 | diff --git a/com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu b/com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu | |||
2945 | 0 | new file mode 100644 | 55 | new file mode 100644 |
2946 | index 0000000..43af155 | |||
2947 | --- /dev/null | |||
2948 | +++ b/com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu | |||
2949 | @@ -0,0 +1,106 @@ | |||
2950 | 1 | # Copyright 2016 Canonical Ltd. | ||
2951 | 2 | # All rights reserved. | ||
2952 | 3 | # | ||
2953 | 4 | # Written by: | ||
2954 | 5 | # Konrad Zapalowicz <konrad.zapalowicz@canonical.com> | ||
2955 | 6 | |||
2956 | 7 | unit: category | ||
2957 | 8 | id: pulseaudio | ||
2958 | 9 | _name: PulseAudio | ||
2959 | 10 | |||
2960 | 11 | id: pulseaudio/setup/ensure_interface_connection_setup | ||
2961 | 12 | category_id: pulseaudio | ||
2962 | 13 | _description: Ensure that the pulseaudio interface is auto-connected | ||
2963 | 14 | plugin: manual | ||
2964 | 15 | _steps: | ||
2965 | 16 | 1. List the interfaces | ||
2966 | 17 | . | ||
2967 | 18 | $ snap interfaces | ||
2968 | 19 | . | ||
2969 | 20 | _verification: | ||
2970 | 21 | Verify that you see the following: | ||
2971 | 22 | pulseaudio:service pulseaudio:client | ||
2972 | 23 | :network pulseaudio | ||
2973 | 24 | |||
2974 | 25 | id: pulseaudio/pactl/ensure-commands-can-be-run-by-root | ||
2975 | 26 | category_id: pulseaudio | ||
2976 | 27 | _description: Ensure that the pulseaudio commands can be run only by root | ||
2977 | 28 | plugin: manual | ||
2978 | 29 | depends: pulseaudio/setup/ensure_interface_connection_setup | ||
2979 | 30 | _steps: | ||
2980 | 31 | 1. Try to run pactl | ||
2981 | 32 | . | ||
2982 | 33 | $ pulseaudio.pactl | ||
2983 | 34 | . | ||
2984 | 35 | 2. Try to run paplay | ||
2985 | 36 | . | ||
2986 | 37 | $ pulseaudio.paplay | ||
2987 | 38 | . | ||
2988 | 39 | 3. Try to run parec | ||
2989 | 40 | . | ||
2990 | 41 | $ pulseaudio.parec | ||
2991 | 42 | . | ||
2992 | 43 | _verification: | ||
2993 | 44 | Verify that each step ends with the following message: | ||
2994 | 45 | This script must be run as root | ||
2995 | 46 | |||
2996 | 47 | id: pulseaudio/pactl/ensure-modules-are-listed | ||
2997 | 48 | category_id: pulseaudio | ||
2998 | 49 | _description: Ensure that the correct modules are loaded | ||
2999 | 50 | plugin: manual | ||
3000 | 51 | depends: pulseaudio/setup/ensure_interface_connection_setup | ||
3001 | 52 | _steps: | ||
3002 | 53 | 1. List the loaded modules | ||
3003 | 54 | . | ||
3004 | 55 | $ sudo pulseaudio.pactl list short | ||
3005 | 56 | . | ||
3006 | 57 | _verification: | ||
3007 | 58 | Verify that you see output similar to following: | ||
3008 | 59 | 0 module-device-restore | ||
3009 | 60 | 1 module-stream-restore | ||
3010 | 61 | 2 module-card-restore | ||
3011 | 62 | 3 module-augment-properties | ||
3012 | 63 | 4 module-switch-on-port-available | ||
3013 | 64 | 5 module-udev-detect | ||
3014 | 65 | ... | ||
3015 | 66 | 80 protocol-native.c pactl | ||
3016 | 67 | 0 alsa_card.pci-0000_00_1b.0 module-alsa-card.c | ||
3017 | 68 | . | ||
3018 | 69 | Verify that amongs the other the following modules are listed: | ||
3019 | 70 | module-device-restore | ||
3020 | 71 | module-stream-restore | ||
3021 | 72 | module-card-restore | ||
3022 | 73 | module-switch-on-port-available | ||
3023 | 74 | module-rescue-streams | ||
3024 | 75 | module-always-sink | ||
3025 | 76 | |||
3026 | 77 | id: pulseaudio/parecord/ensure-audio-can-be-recorded | ||
3027 | 78 | category_id: pulseaudio | ||
3028 | 79 | _description: Ensure that it is possible to record audio | ||
3029 | 80 | plugin: manual | ||
3030 | 81 | depends: pulseaudio/setup/ensure_interface_connection_setup | ||
3031 | 82 | _steps: | ||
3032 | 83 | 1. Record an audio .wav file | ||
3033 | 84 | . | ||
3034 | 85 | $ sudo pulseaudio.parec ~/record.wav | ||
3035 | 86 | . | ||
3036 | 87 | _verification: | ||
3037 | 88 | Verify that the record.wav file has been created and it's size is | ||
3038 | 89 | greater than zero. Verify that the recorded file can be played and | ||
3039 | 90 | it is possible to hear the audio. | ||
3040 | 91 | |||
3041 | 92 | id: pulseaudio/paplay/ensure-audio-can-be-played | ||
3042 | 93 | category_id: pulseaudio | ||
3043 | 94 | _description: Ensure that it is possible to play auio files | ||
3044 | 95 | plugin: manual | ||
3045 | 96 | depends: pulseaudio/setup/ensure_interface_connection_setup | ||
3046 | 97 | _steps: | ||
3047 | 98 | 1. Play an audio .wav file | ||
3048 | 99 | . | ||
3049 | 100 | $ sudo pulseaudio.paplay ~/file.wav | ||
3050 | 101 | . | ||
3051 | 102 | _verification: | ||
3052 | 103 | Verify that the audio is hearable through the speakers. In case the | ||
3053 | 104 | speakers are not available verify that the sink status has changed | ||
3054 | 105 | from SUSPEND to RUNNING [use the sudo pulseaudio.pactl list sinks | ||
3055 | 106 | command for that] | ||
3056 | diff --git a/com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu b/com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu | |||
3057 | 0 | new file mode 100644 | 107 | new file mode 100644 |
3058 | index 0000000..e01dfe5 | |||
3059 | --- /dev/null | |||
3060 | +++ b/com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu | |||
3061 | @@ -0,0 +1,132 @@ | |||
3062 | 1 | # Copyright 2017 Canonical Ltd. | ||
3063 | 2 | # All rights reserved. | ||
3064 | 3 | # | ||
3065 | 4 | # Written by: | ||
3066 | 5 | # Roberto Mier Escandon <roberto.escandon@canonical.com> | ||
3067 | 6 | |||
3068 | 7 | unit: category | ||
3069 | 8 | id: serial_vault | ||
3070 | 9 | _name: Serial Vault | ||
3071 | 10 | |||
3072 | 11 | id: serial_vault/setup/ensure_interface_connection_setup | ||
3073 | 12 | category_id: serial_vault | ||
3074 | 13 | _description: Ensure that the serial-vault interface is auto-connected | ||
3075 | 14 | plugin: manual | ||
3076 | 15 | _steps: | ||
3077 | 16 | 1. List the interfaces | ||
3078 | 17 | . | ||
3079 | 18 | $ snap interfaces serial-vault | ||
3080 | 19 | . | ||
3081 | 20 | _verification: | ||
3082 | 21 | Verify that you see the following: | ||
3083 | 22 | :network serial-vault | ||
3084 | 23 | :network-bind serial-vault | ||
3085 | 24 | |||
3086 | 25 | id: serial_vault/setup/config | ||
3087 | 26 | category_id: serial_vault | ||
3088 | 27 | _description: Ensure that the serial-vault can access database | ||
3089 | 28 | plugin: manual | ||
3090 | 29 | depends: serial_vault/setup/ensure_interface_connection_setup | ||
3091 | 30 | _steps: | ||
3092 | 31 | 1. Create settings.yaml with proper content to access database. For example: | ||
3093 | 32 | . | ||
3094 | 33 | title: "Serial Vault" | ||
3095 | 34 | logo: "/static/images/logo-ubuntu-white.svg" | ||
3096 | 35 | mode: signing | ||
3097 | 36 | docRoot: "." | ||
3098 | 37 | driver: "postgres" | ||
3099 | 38 | datasource: "dbname=serialvault sslmode=disable" | ||
3100 | 39 | keystore: "database" | ||
3101 | 40 | keystoreSecret: "secret code to encrypt the auth-key hash" | ||
3102 | 41 | csrfAuthKey: "2E6ZYnVYUfDLRLV/ne8M6v1jyB/376BL9ORnN3Kgb04uSFalr2ygReVsOt0PaGEIRuID10TePBje5xdjIOEjQQ==" | ||
3103 | 42 | urlHost: "serial-vault" | ||
3104 | 43 | urlScheme: http | ||
3105 | 44 | enableUserAuth: True | ||
3106 | 45 | . | ||
3107 | 46 | 2. Apply config | ||
3108 | 47 | . | ||
3109 | 48 | $ cat settings.yaml | sudo serial-vault.config | ||
3110 | 49 | . | ||
3111 | 50 | 3. Restart service | ||
3112 | 51 | . | ||
3113 | 52 | $ sudo systemctl restart snap.serial-vault.service.service | ||
3114 | 53 | . | ||
3115 | 54 | 4. Check service status | ||
3116 | 55 | . | ||
3117 | 56 | $ sudo systemctl status snap.serial-vault.service.service | ||
3118 | 57 | . | ||
3119 | 58 | _verification: | ||
3120 | 59 | Verify that you see that service is active (running) and that the database has been created/updated, like this: | ||
3121 | 60 | Created the 'keypair' table. | ||
3122 | 61 | Created the 'model' table. | ||
3123 | 62 | Created the 'settings' table. | ||
3124 | 63 | Created the 'signinglog' table. | ||
3125 | 64 | Created the 'nonce' table. | ||
3126 | 65 | Created the 'account' table. | ||
3127 | 66 | Updated the 'model' table. | ||
3128 | 67 | Updated the 'keypair' table. | ||
3129 | 68 | Created the 'openid nonce' table. | ||
3130 | 69 | Created the 'userinfo' table. | ||
3131 | 70 | Created the 'account-user link' table. | ||
3132 | 71 | Updated the 'userinfo' table. | ||
3133 | 72 | Starting service on port :8080 | ||
3134 | 73 | |||
3135 | 74 | id: serial_vault/operation/ensure-commands-can-be-run | ||
3136 | 75 | category_id: serial_vault | ||
3137 | 76 | _description: Ensure that the serial vault admin commands can be run | ||
3138 | 77 | plugin: manual | ||
3139 | 78 | depends: serial_vault/setup/config | ||
3140 | 79 | _steps: | ||
3141 | 80 | 1. Try to run admin | ||
3142 | 81 | . | ||
3143 | 82 | $ serial-vault.admin | ||
3144 | 83 | . | ||
3145 | 84 | 2. Try to run config | ||
3146 | 85 | . | ||
3147 | 86 | $ serial-vault.config | ||
3148 | 87 | . | ||
3149 | 88 | _verification: | ||
3150 | 89 | Verify that each step ends showing up the help | ||
3151 | 90 | |||
3152 | 91 | id: serial_vault/operation/add_superuser | ||
3153 | 92 | category_id: serial_vault | ||
3154 | 93 | _description: Ensure admin tool can add a superuser | ||
3155 | 94 | plugin: manual | ||
3156 | 95 | depends: serial_vault/operation/ensure-commands-can-be-run | ||
3157 | 96 | _steps: | ||
3158 | 97 | 1. Add a user from console | ||
3159 | 98 | . | ||
3160 | 99 | $ serial-vault.admin user add theuser -n TheName -r superuser -e theemail@email.com | ||
3161 | 100 | . | ||
3162 | 101 | 2. List users | ||
3163 | 102 | . | ||
3164 | 103 | $ serial-vault.admin user list | ||
3165 | 104 | . | ||
3166 | 105 | _verification: | ||
3167 | 106 | Verify that just created user is in users list with superuser role | ||
3168 | 107 | |||
3169 | 108 | id: serial_vault/operation/cache_account | ||
3170 | 109 | category_id: serial_vault | ||
3171 | 110 | _description: Ensure admin tool can fetch store cached account assertions | ||
3172 | 111 | plugin: manual | ||
3173 | 112 | depends: serial_vault/operation/ensure-commands-can-be-run | ||
3174 | 113 | _steps: | ||
3175 | 114 | 1. Fetch cached accounts from the store | ||
3176 | 115 | . | ||
3177 | 116 | $ serial-vault.admin account cache | ||
3178 | 117 | . | ||
3179 | 118 | _verification: | ||
3180 | 119 | Verify that output shows account and keypair processing from Ubuntu store | ||
3181 | 120 | |||
3182 | 121 | id: serial_vault/operation/verify_api_is_reachable | ||
3183 | 122 | category_id: serial_vault | ||
3184 | 123 | _description: Ensure signing service can be reached | ||
3185 | 124 | plugin: manual | ||
3186 | 125 | depends: serial_vault/operation/ensure-commands-can-be-run | ||
3187 | 126 | _steps: | ||
3188 | 127 | 1. Request service version | ||
3189 | 128 | . | ||
3190 | 129 | $ wget http://localhost:8080/v1/version | ||
3191 | 130 | . | ||
3192 | 131 | _verification: | ||
3193 | 132 | Verify that the response content is {"version":"2.0-0"} | ||
3194 | diff --git a/com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu b/com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu | |||
3195 | 0 | new file mode 100644 | 133 | new file mode 100644 |
3196 | index 0000000..8f9e070 | |||
3197 | --- /dev/null | |||
3198 | +++ b/com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu | |||
3199 | @@ -0,0 +1,182 @@ | |||
3200 | 1 | # Copyright 2017 Canonical Ltd. | ||
3201 | 2 | # All rights reserved. | ||
3202 | 3 | # | ||
3203 | 4 | # Written by: | ||
3204 | 5 | # Roberto Mier Escandon <roberto.escandon@canonical.com> | ||
3205 | 6 | |||
3206 | 7 | unit: category | ||
3207 | 8 | id: snapweb | ||
3208 | 9 | _name: SnapWeb | ||
3209 | 10 | |||
3210 | 11 | id: snapweb/setup/ensure_interface_connection_setup | ||
3211 | 12 | category_id: snapweb | ||
3212 | 13 | _description: Ensure that the snapweb interfaces are auto-connected | ||
3213 | 14 | plugin: manual | ||
3214 | 15 | _steps: | ||
3215 | 16 | 1. List the interfaces | ||
3216 | 17 | . | ||
3217 | 18 | $ snap interfaces snapweb | ||
3218 | 19 | . | ||
3219 | 20 | _verification: | ||
3220 | 21 | Verify that you see the following: | ||
3221 | 22 | Slot Plug | ||
3222 | 23 | :network snapweb | ||
3223 | 24 | :network-bind snapweb | ||
3224 | 25 | :snapd-control snapweb | ||
3225 | 26 | :timeserver-control snapweb | ||
3226 | 27 | |||
3227 | 28 | id: snapweb/setup/ensure-http-service-is-up | ||
3228 | 29 | category_id: snapweb | ||
3229 | 30 | _description: Ensure that the http interface is up and running | ||
3230 | 31 | plugin: manual | ||
3231 | 32 | depends: snapweb/setup/ensure_interface_connection_setup | ||
3232 | 33 | _steps: | ||
3233 | 34 | 1. Open a browser in same device and type in address bar: | ||
3234 | 35 | . | ||
3235 | 36 | http://localhost:4200 | ||
3236 | 37 | . | ||
3237 | 38 | _verification: | ||
3238 | 39 | Verify that url is accessible and a warning is shown about web access is | ||
3239 | 40 | not secure/private (depending on the browser) | ||
3240 | 41 | |||
3241 | 42 | id: snapweb/setup/ensure-https-service-is-up | ||
3242 | 43 | category_id: snapweb | ||
3243 | 44 | _description: Ensure that the snapweb web interface is up and running | ||
3244 | 45 | plugin: manual | ||
3245 | 46 | depends: snapweb/setup/ensure-http-service-is-up | ||
3246 | 47 | _steps: | ||
3247 | 48 | 1. Open a browser in same device and type in address bar: | ||
3248 | 49 | . | ||
3249 | 50 | http://localhost:4200 | ||
3250 | 51 | . | ||
3251 | 52 | 2. After warning alert showing that web access is not secure/private, | ||
3252 | 53 | proceed to access localhost. In some browsers it is needed to confirm | ||
3253 | 54 | a security exception. | ||
3254 | 55 | _verification: | ||
3255 | 56 | Verify that url is accessible and browser shows a page with title | ||
3256 | 57 | 'Access Control', requesting a Snapweb Access Token to continue. | ||
3257 | 58 | Verify that url address is now https://localhost:4201/access-control | ||
3258 | 59 | |||
3259 | 60 | id: snapweb/setup/ensure-web-service-is-accessible-from-lan | ||
3260 | 61 | category_id: snapweb | ||
3261 | 62 | _description: Ensure that the snapweb web interface is accessible from lan | ||
3262 | 63 | plugin: manual | ||
3263 | 64 | depends: snapweb/setup/ensure-https-service-is-up | ||
3264 | 65 | _steps: | ||
3265 | 66 | 1. Open a browser in other device connected to same LAN than the one | ||
3266 | 67 | hosting snapweb and type in address bar: | ||
3267 | 68 | . | ||
3268 | 69 | http://[hostname]:4200 | ||
3269 | 70 | . | ||
3270 | 71 | 2. After warning alert showing that web access is not secure/private, | ||
3271 | 72 | proceed to access localhost. In some browsers it is needed to confirm | ||
3272 | 73 | a security exception. | ||
3273 | 74 | _verification: | ||
3274 | 75 | Verify that url is accessible and browser shows a page with title | ||
3275 | 76 | 'Access Control', requesting a Snapweb Access Token to continue. | ||
3276 | 77 | Verify that url address is now https://[hostname]:4201/access-control | ||
3277 | 78 | |||
3278 | 79 | id: snapweb/setup/ensure-token-access | ||
3279 | 80 | category_id: snapweb | ||
3280 | 81 | _description: Ensure ui allows access when entered a valid token generated from cli | ||
3281 | 82 | plugin: manual | ||
3282 | 83 | depends: snapweb/setup/ensure-https-service-is-up | ||
3283 | 84 | _steps: | ||
3284 | 85 | 1. Reboot the device. This step is only needed to be done just after | ||
3285 | 86 | first installation. If snap was previously installed and this is | ||
3286 | 87 | an update, you can go to step 2. | ||
3287 | 88 | 2. Open a terminal in the device and type: | ||
3288 | 89 | . | ||
3289 | 90 | $ sudo snapweb.generate-token | ||
3290 | 91 | . | ||
3291 | 92 | 3. Copy result token to clipboard | ||
3292 | 93 | 4. Access browser and type: | ||
3293 | 94 | . | ||
3294 | 95 | https://localhost:4201 | ||
3295 | 96 | . | ||
3296 | 97 | 5. Paste clipboard token into Snapweb Access Token textbox | ||
3297 | 98 | _verification: | ||
3298 | 99 | Verify that access is allowed and installed apps list is shown | ||
3299 | 100 | |||
3300 | 101 | id: snapweb/snaps/installed-snaps | ||
3301 | 102 | category_id: snapweb | ||
3302 | 103 | _description: Verify installed snaps list | ||
3303 | 104 | plugin: manual | ||
3304 | 105 | depends: snapweb/setup/ensure-token-access | ||
3305 | 106 | _steps: | ||
3306 | 107 | 1. Access browser and type: | ||
3307 | 108 | . | ||
3308 | 109 | https://localhost:4201 | ||
3309 | 110 | . | ||
3310 | 111 | 2. In a device terminal type: | ||
3311 | 112 | . | ||
3312 | 113 | $ snap list | ||
3313 | 114 | . | ||
3314 | 115 | _verification: | ||
3315 | 116 | Verify that the list of 'Apps installed' in browser is the same | ||
3316 | 117 | as the list shown in terminal, except snapweb itself that should | ||
3317 | 118 | be only shown in terminal list | ||
3318 | 119 | |||
3319 | 120 | id: snapweb/snaps/installable-snaps | ||
3320 | 121 | category_id: snapweb | ||
3321 | 122 | _description: Verify that snaps can be installed and filtered | ||
3322 | 123 | plugin: manual | ||
3323 | 124 | depends: snapweb/setup/ensure-token-access | ||
3324 | 125 | _steps: | ||
3325 | 126 | 1. Access browser and type: | ||
3326 | 127 | . | ||
3327 | 128 | https://localhost:4201 | ||
3328 | 129 | . | ||
3329 | 130 | 2. Click on last entry on Apps installed section named 'Get more apps' | ||
3330 | 131 | or click on 'Store' upper tab | ||
3331 | 132 | 3. Click on the links over snaps to filter them | ||
3332 | 133 | 4. Search for certain snap name in upper search box | ||
3333 | 134 | _verification: | ||
3334 | 135 | Verify that at the beginning there is a list of snaps that can be installed, | ||
3335 | 136 | everyone with its icon, version, author and a button with label 'Install'. | ||
3336 | 137 | Verify that the list can be filtered by pressing links over | ||
3337 | 138 | Verify you get results when searching for a snap that it's in the list of | ||
3338 | 139 | installables | ||
3339 | 140 | |||
3340 | 141 | id: snapweb/snaps/install-snap | ||
3341 | 142 | category_id: snapweb | ||
3342 | 143 | _description: Ensure that a snap can be installed using web ui | ||
3343 | 144 | plugin: manual | ||
3344 | 145 | depends: snapweb/setup/ensure-token-access | ||
3345 | 146 | _steps: | ||
3346 | 147 | 1. Access browser and type: | ||
3347 | 148 | . | ||
3348 | 149 | https://localhost:4201 | ||
3349 | 150 | . | ||
3350 | 151 | 2. Click on 'Install' button of any available snap | ||
3351 | 152 | 3. Wait for snap to be installed and open a terminal | ||
3352 | 153 | 4. Type in terminal: | ||
3353 | 154 | . | ||
3354 | 155 | $ snap list | ||
3355 | 156 | . | ||
3356 | 157 | _verification: | ||
3357 | 158 | Verify that the snap requested to be installed is there in the terminal resultant list | ||
3358 | 159 | Verify that button in step 2 changes its label to 'Installing' while installing | ||
3359 | 160 | Verify that button of the instaled snap has now 'Remove' in its label | ||
3360 | 161 | |||
3361 | 162 | id: snapweb/snaps/remove-snap | ||
3362 | 163 | category_id: snapweb | ||
3363 | 164 | _description: Ensure that a snap can be removed using web ui | ||
3364 | 165 | plugin: manual | ||
3365 | 166 | depends: snapweb/snaps/install-snap | ||
3366 | 167 | _steps: | ||
3367 | 168 | 1. Access browser and type: | ||
3368 | 169 | . | ||
3369 | 170 | https://localhost:4201 | ||
3370 | 171 | . | ||
3371 | 172 | 2. Click on 'Remove' button of installed snap | ||
3372 | 173 | 3. Wait for snap to be removed and open a terminal | ||
3373 | 174 | 4. Type in terminal: | ||
3374 | 175 | . | ||
3375 | 176 | $ snap list | ||
3376 | 177 | . | ||
3377 | 178 | _verification: | ||
3378 | 179 | Verify that the snap requested to be removed is not in the terminal resultant list | ||
3379 | 180 | Verify that button in step 2 changes its label to 'Removing' while installing | ||
3380 | 181 | Verify that button of the removed snap has now 'Install' in its label | ||
3381 | 182 | |||
3382 | diff --git a/com.canonical.se:engineering-tests/units/test-plan.pxu b/com.canonical.se:engineering-tests/units/test-plan.pxu | |||
3383 | 0 | new file mode 100644 | 183 | new file mode 100644 |
3384 | index 0000000..a7f31d1 | |||
3385 | --- /dev/null | |||
3386 | +++ b/com.canonical.se:engineering-tests/units/test-plan.pxu | |||
3387 | @@ -0,0 +1,9 @@ | |||
3388 | 1 | id: engineering-tests | ||
3389 | 2 | unit: test plan | ||
3390 | 3 | _name: System Enablement Engineering Tests | ||
3391 | 4 | _description: | ||
3392 | 5 | Set of tests to verify functionality of the snaps produced by the | ||
3393 | 6 | System Enablement team at Canonical. | ||
3394 | 7 | estimated_duration: 2h | ||
3395 | 8 | include: | ||
3396 | 9 | 2017.com.canonical.se::.* | ||
3397 | diff --git a/com.canonical.se:engineering-tests/units/tpm/tpm.pxu b/com.canonical.se:engineering-tests/units/tpm/tpm.pxu | |||
3398 | 0 | new file mode 100644 | 10 | new file mode 100644 |
3399 | index 0000000..b00bd89 | |||
3400 | --- /dev/null | |||
3401 | +++ b/com.canonical.se:engineering-tests/units/tpm/tpm.pxu | |||
3402 | @@ -0,0 +1,135 @@ | |||
3403 | 1 | # Copyright 2016 Canonical Ltd. | ||
3404 | 2 | # All rights reserved. | ||
3405 | 3 | # | ||
3406 | 4 | # Written by: | ||
3407 | 5 | # Scott Sweeny <scott.sweeny@canonical.com> | ||
3408 | 6 | |||
3409 | 7 | unit: category | ||
3410 | 8 | id: tpm1.2 | ||
3411 | 9 | _name: TPM 1.2 | ||
3412 | 10 | |||
3413 | 11 | id: tpm1.2/setup/ensure_interface_connection_setup | ||
3414 | 12 | category_id: tpm1.2 | ||
3415 | 13 | _description: Ensure that the tpm1.2 interfaces are connected | ||
3416 | 14 | plugin: manual | ||
3417 | 15 | _steps: | ||
3418 | 16 | 1. Connect required tpm1.2 slots/plugs | ||
3419 | 17 | . | ||
3420 | 18 | $ sudo snap connect tpm:network :network | ||
3421 | 19 | $ sudo snap connect tpm:network-bind :network-bind | ||
3422 | 20 | $ sudo snap connect tpm:tpm :tpm | ||
3423 | 21 | . | ||
3424 | 22 | _verification: | ||
3425 | 23 | Verify that you see the following when running snap interfaces: | ||
3426 | 24 | :network tpm | ||
3427 | 25 | :network-bind tpm | ||
3428 | 26 | :tpm tpm | ||
3429 | 27 | |||
3430 | 28 | id: tpm1.2/setup/get_version | ||
3431 | 29 | category_id: tpm1.2 | ||
3432 | 30 | plugin: manual | ||
3433 | 31 | depends: tpm1.2/setup/ensure_interface_connection_setup | ||
3434 | 32 | _summary: Can get version information from the TPM chip | ||
3435 | 33 | _purpose: | ||
3436 | 34 | Check that basic communication with the TPM chip is working and that version | ||
3437 | 35 | information can be retrieved with the expected command. | ||
3438 | 36 | _steps: | ||
3439 | 37 | 1. Execute the following command to show the TPM version: | ||
3440 | 38 | . | ||
3441 | 39 | $ /snap/bin/tpm.version | ||
3442 | 40 | _verification: | ||
3443 | 41 | Output is similar to below with all fields showing data: | ||
3444 | 42 | . | ||
3445 | 43 | TPM 1.2 Version Info: | ||
3446 | 44 | Chip Version: 1.2.5.81 | ||
3447 | 45 | Spec Level: 2 | ||
3448 | 46 | Errata Revision: 3 | ||
3449 | 47 | TPM Vendor ID: WEC | ||
3450 | 48 | Vendor Specific data: 0000 | ||
3451 | 49 | TPM Version: 01010000 | ||
3452 | 50 | Manufacturer Info: 57454300 | ||
3453 | 51 | |||
3454 | 52 | id: tpm1.2/setup/self_test | ||
3455 | 53 | category_id: tpm1.2 | ||
3456 | 54 | plugin: manual | ||
3457 | 55 | depends: tpm1.2/setup/ensure_interface_connection_setup | ||
3458 | 56 | _summary: TPM self test runs successfully | ||
3459 | 57 | _purpose: | ||
3460 | 58 | Check that the TPM self test runs successfully and returns no errors. | ||
3461 | 59 | _steps: | ||
3462 | 60 | 1. Execute the following command to run the TPM self test: | ||
3463 | 61 | . | ||
3464 | 62 | $ /snap/bin/tpm.selftest | ||
3465 | 63 | _verification: | ||
3466 | 64 | Output is similar to below (actual values are not important) and no | ||
3467 | 65 | error messages are shown: | ||
3468 | 66 | . | ||
3469 | 67 | TPM Test Results: | ||
3470 | 68 | ff010205 51ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff | ||
3471 | 69 | ffffffff ffffffff ffffffff ffff0000 00000000 00000000 00000000 00000000 | ||
3472 | 70 | 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000 | ||
3473 | 71 | |||
3474 | 72 | |||
3475 | 73 | id: tpm1.2/configuration/take_ownership | ||
3476 | 74 | category_id: tpm1.2 | ||
3477 | 75 | plugin: manual | ||
3478 | 76 | depends: tpm1.2/setup/ensure_interface_connection_setup | ||
3479 | 77 | _summary: Taking ownership of the device is possible | ||
3480 | 78 | _purpose: | ||
3481 | 79 | Check that you are able to take ownership of the device using TPM commands. | ||
3482 | 80 | _steps: | ||
3483 | 81 | 1.Execute the following command to take ownership of the TPM chip: | ||
3484 | 82 | . | ||
3485 | 83 | $ /snap/bin/tpm.takeownership | ||
3486 | 84 | . | ||
3487 | 85 | _verification: | ||
3488 | 86 | Verify that you are prompted for both the owner key and the SRK (storage | ||
3489 | 87 | root key) and that no errors are returned. | ||
3490 | 88 | . | ||
3491 | 89 | NOTE: This command will only work if it has not been run before. You can | ||
3492 | 90 | reset the TPM with: | ||
3493 | 91 | . | ||
3494 | 92 | $ /snap/bin/tpm.clear | ||
3495 | 93 | . | ||
3496 | 94 | Which will invalidate all existing keys and passwords and disable the chip. | ||
3497 | 95 | Once this is done you must re-enable the TPM from the device's BIOS before | ||
3498 | 96 | it can be used. | ||
3499 | 97 | |||
3500 | 98 | id: tpm1.2/crypto/show_public_key | ||
3501 | 99 | category_id: tpm1.2 | ||
3502 | 100 | plugin: manual | ||
3503 | 101 | depends: tpm1.2/setup/ensure_interface_connection_setup | ||
3504 | 102 | _summary: Showing the public endorsement key succeeds | ||
3505 | 103 | _purpose: | ||
3506 | 104 | Check to make sure that the endorsement key pair exists and the public key | ||
3507 | 105 | can be queried. | ||
3508 | 106 | _steps: | ||
3509 | 107 | 1. Execute the following command to see the public key: | ||
3510 | 108 | . | ||
3511 | 109 | $ /snap/bin/tpm.getpubek | ||
3512 | 110 | . | ||
3513 | 111 | You may see an error similar to: | ||
3514 | 112 | . | ||
3515 | 113 | Tspi_TPM_GetPubEndorsementKey failed: 0x00000008 - layer=tpm, code=0008 (8), The TPM target command has been disabled | ||
3516 | 114 | . | ||
3517 | 115 | This can be safely ignored as long as the public key data is displayed. | ||
3518 | 116 | _verification: | ||
3519 | 117 | Verify that the public key data is shown, for example: | ||
3520 | 118 | . | ||
3521 | 119 | Public Endorsement Key: | ||
3522 | 120 | Version: 01010000 | ||
3523 | 121 | Usage: 0x0002 (Unknown) | ||
3524 | 122 | Flags: 0x00000000 (!VOLATILE, !MIGRATABLE, !REDIRECTION) | ||
3525 | 123 | AuthUsage: 0x00 (Never) | ||
3526 | 124 | Algorithm: 0x00000020 (Unknown) | ||
3527 | 125 | Encryption Scheme: 0x00000012 (Unknown) | ||
3528 | 126 | Signature Scheme: 0x00000010 (Unknown) | ||
3529 | 127 | Public Key: | ||
3530 | 128 | 8b59fad6 83514128 d56e2aa0 5eef7cff ad23c90d 0dd9b1e2 31ef093d 72d947d8 | ||
3531 | 129 | e02fbe3a 3c235ff0 9c487973 40a28c9b 8b83aaaf dc1254ad 31a95410 811742e5 | ||
3532 | 130 | 92c16823 6f663413 f7067d3a 9af09ccc 12944a13 51d32980 59a98740 4008ab0c | ||
3533 | 131 | 07b7d93b 9393691c 8ae7d84c 5fd4fcef 147934f1 09326225 d5d1b652 ab3e12ee | ||
3534 | 132 | fbd1cfba b18abedc de2215cb 97006b92 839fd9a4 3158bc8f 028fe516 550905b3 | ||
3535 | 133 | e3eef1e1 9f8dd3ab 331cbe62 d32ce937 0c11ad41 1d2e50f3 c69c7cde cd0bf564 | ||
3536 | 134 | 4b7b16f8 0885dc66 d4411aba a824c1f1 ea8aa743 5c62fad7 e9540b85 5c0dc7af | ||
3537 | 135 | 3c1615ae 56af18e4 770aa107 06ef274b 202e2e3e d4c280d8 5ca9e886 9d889e31 | ||
3538 | diff --git a/com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu b/com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu | |||
3539 | 0 | new file mode 100644 | 136 | new file mode 100644 |
3540 | index 0000000..7667aa5 | |||
3541 | --- /dev/null | |||
3542 | +++ b/com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu | |||
3543 | @@ -0,0 +1,319 @@ | |||
3544 | 1 | # Copyright 2017 Canonical Ltd. | ||
3545 | 2 | # All rights reserved. | ||
3546 | 3 | # | ||
3547 | 4 | # Written by: | ||
3548 | 5 | # Scott Sweeny <scott.sweeny@canonical.com> | ||
3549 | 6 | |||
3550 | 7 | unit: category | ||
3551 | 8 | id: udisks2 | ||
3552 | 9 | _name: UDisks2 | ||
3553 | 10 | |||
3554 | 11 | id: udisks2/setup/ensure_interface_connection_setup | ||
3555 | 12 | category_id: udisks2 | ||
3556 | 13 | _description: Ensure that the udisks2 interfaces are connected | ||
3557 | 14 | plugin: manual | ||
3558 | 15 | _steps: | ||
3559 | 16 | 1. Run the following: | ||
3560 | 17 | $ sudo snap interfaces udisks2 | ||
3561 | 18 | . | ||
3562 | 19 | _verification: | ||
3563 | 20 | Verify that you see the following: | ||
3564 | 21 | Slot Plug | ||
3565 | 22 | :mount-observe udisks2 | ||
3566 | 23 | :network-bind udisks2 | ||
3567 | 24 | udisks2:service udisks2:client | ||
3568 | 25 | - udisks2:hardware-observe | ||
3569 | 26 | |||
3570 | 27 | id: udisks2/client/can_communicate_with_udisksd | ||
3571 | 28 | category_id: udisks2 | ||
3572 | 29 | plugin: manual | ||
3573 | 30 | depends: udisks2/setup/ensure_interface_connection_setup | ||
3574 | 31 | _summary: udisksctl can communicate with udisksd | ||
3575 | 32 | _purpose: | ||
3576 | 33 | Makes sure udisksctl can communicate with udisksd | ||
3577 | 34 | _steps: | ||
3578 | 35 | 1. Run a simple udisksctl command | ||
3579 | 36 | . | ||
3580 | 37 | $ sudo udisks2.udisksctl status | ||
3581 | 38 | . | ||
3582 | 39 | _verification: | ||
3583 | 40 | Verify that the command returns a list of connected storage devices and no | ||
3584 | 41 | errors. | ||
3585 | 42 | |||
3586 | 43 | id: udisks2/service/can_receive_hotplug_events | ||
3587 | 44 | category_id: udisks2 | ||
3588 | 45 | plugin:manual | ||
3589 | 46 | depends: udisks2/client/can_communicate_with_udisksd | ||
3590 | 47 | _summary: udisks can see when a drive is plugged in | ||
3591 | 48 | _purpose: | ||
3592 | 49 | Makes sure that udisks gets the hotplug event when a USB drive is | ||
3593 | 50 | plugged in | ||
3594 | 51 | _steps: | ||
3595 | 52 | 1. Start the udisks client and have it watch for new events | ||
3596 | 53 | . | ||
3597 | 54 | $ sudo udisks2.udisksctl monitor | ||
3598 | 55 | . | ||
3599 | 56 | 2. Plug in a USB storage device and wait for activity from the client | ||
3600 | 57 | . | ||
3601 | 58 | 3. Unplug the USB storage device and wait for activity from the client | ||
3602 | 59 | . | ||
3603 | 60 | _verification: | ||
3604 | 61 | Verify that udisks shows information about the USB device when it's plugged | ||
3605 | 62 | in, and that it recognizes when the device is removed. | ||
3606 | 63 | . | ||
3607 | 64 | The information shown when the device is plugged in will be everything | ||
3608 | 65 | udisks knows about the device and its partitions, expressed as DBus objects. | ||
3609 | 66 | You will likely see something like: | ||
3610 | 67 | . | ||
3611 | 68 | 21:37:20.621: Added /org/freedesktop/UDisks2/drives/Kingston_DataTraveler_2_2e0_0607151625382 | ||
3612 | 69 | org.freedesktop.UDisks2.Drive: | ||
3613 | 70 | CanPowerOff: true | ||
3614 | 71 | Configuration: {} | ||
3615 | 72 | ConnectionBus: usb | ||
3616 | 73 | Ejectable: true | ||
3617 | 74 | Id: Kingston-DataTraveler-2.0-0607151625382 | ||
3618 | 75 | Media: thumb | ||
3619 | 76 | MediaAvailable: true | ||
3620 | 77 | MediaChangeDetected: true | ||
3621 | 78 | . | ||
3622 | 79 | and so on for the drive itself, each block device, and each filesystem | ||
3623 | 80 | |||
3624 | 81 | id: udisks2/service/can_mount_unmount | ||
3625 | 82 | category_id: udisks2 | ||
3626 | 83 | plugin: manual | ||
3627 | 84 | depends: udisks2/client/can_communicate_with_udisksd | ||
3628 | 85 | _summary: udisks can mount and unmount a storage device | ||
3629 | 86 | _purpose: | ||
3630 | 87 | Makes sure that udisks can mount and unmount a storage device, and that | ||
3631 | 88 | the mount points are visible outside of the snap | ||
3632 | 89 | _steps: | ||
3633 | 90 | 1. Plug in a USB storage device | ||
3634 | 91 | 2. Run the following: | ||
3635 | 92 | . | ||
3636 | 93 | $ sudo udisks2.udisksctl status | ||
3637 | 94 | . | ||
3638 | 95 | and note the name under the "DEVICE" column for the drive you just | ||
3639 | 96 | plugged in. It should be "sdb" or similar | ||
3640 | 97 | 3. Mount the filesystem on the device: | ||
3641 | 98 | . | ||
3642 | 99 | $ sudo udisks2.udisksctl mount -b /dev/<device>1 | ||
3643 | 100 | . | ||
3644 | 101 | Where <device> is the value from the status call above. This should mount | ||
3645 | 102 | the first filesystem on the device and return the path | ||
3646 | 103 | 4. Examine the mount point: | ||
3647 | 104 | . | ||
3648 | 105 | $ sudo -s # You must be root to see the mount point | ||
3649 | 106 | $ ls /mountpoint/path/returned/above | ||
3650 | 107 | . | ||
3651 | 108 | Make sure the contents of that directory match what you expect to see on | ||
3652 | 109 | the drive. | ||
3653 | 110 | . | ||
3654 | 111 | Leave the root shell | ||
3655 | 112 | $ exit | ||
3656 | 113 | 5. Unmount the filesystem: | ||
3657 | 114 | . | ||
3658 | 115 | $ sudo udisks2.udisksctl unmount -b /dev/<device>1 | ||
3659 | 116 | _verification: | ||
3660 | 117 | Verify that mounts and unmounts are performed successfully, and that the | ||
3661 | 118 | contents of the drive can be seen from your shell (i.e. outside of the snap's | ||
3662 | 119 | own namespace) | ||
3663 | 120 | |||
3664 | 121 | id: udisks2/automount/default_off | ||
3665 | 122 | category_id: udisks2 | ||
3666 | 123 | plugin: manual | ||
3667 | 124 | depends: udisks2/setup/ensure_interface_connection_setup | ||
3668 | 125 | _summary: The automount option defaults to off | ||
3669 | 126 | _purpose: | ||
3670 | 127 | Makes sure that the automount option defaults to disabled | ||
3671 | 128 | _steps: | ||
3672 | 129 | 1. Install the udisks2 snap fresh (i.e. not an upgrade) | ||
3673 | 130 | 2. Run the following: | ||
3674 | 131 | . | ||
3675 | 132 | $ sudo snap get udisks2 automount.enable | ||
3676 | 133 | _verification: | ||
3677 | 134 | Verify that the returned value is "false" | ||
3678 | 135 | |||
3679 | 136 | id: udisks2/automount/disabling_works | ||
3680 | 137 | category_id: udisks2 | ||
3681 | 138 | plugin: manual | ||
3682 | 139 | depends: udisks2/automount/default_off | ||
3683 | 140 | _summary: Disabling automount actually disables automount | ||
3684 | 141 | _purpose: | ||
3685 | 142 | Makes sure that when automount.enabled is set to "false" automounts are | ||
3686 | 143 | prevented | ||
3687 | 144 | _steps: | ||
3688 | 145 | 1. Make sure that automount is disabled. Run: | ||
3689 | 146 | . | ||
3690 | 147 | $ sudo snap set udisks2 automount.enable=false | ||
3691 | 148 | 2. Plug in a USB storage device | ||
3692 | 149 | _verification: | ||
3693 | 150 | Verify that no filesystem on the USB device was mounted. /media/root/ should | ||
3694 | 151 | be empty | ||
3695 | 152 | |||
3696 | 153 | id: udisks2/automount/automount_works | ||
3697 | 154 | category_id: udisks2 | ||
3698 | 155 | plugin: manual | ||
3699 | 156 | depends: udisks2/automount/default_off | ||
3700 | 157 | _summary: When enabled, automounting works | ||
3701 | 158 | _purpose: | ||
3702 | 159 | Makes sure that automounting a USB drive works when the option is enabled | ||
3703 | 160 | _steps: | ||
3704 | 161 | 1. Make sure that automount is enabled. Run: | ||
3705 | 162 | . | ||
3706 | 163 | $ sudo snap set udisks2 automount.enable=true | ||
3707 | 164 | 2. Plug in a USB storage drive | ||
3708 | 165 | _verification: | ||
3709 | 166 | Verify that the filesystem on the USB device was mounted to | ||
3710 | 167 | /media/root/<filesystem label>, for example /media/root/7C69-3855 | ||
3711 | 168 | |||
3712 | 169 | id: udisks2/automount/automount_does_not_mount_system_devices | ||
3713 | 170 | category_id: udisks2 | ||
3714 | 171 | plugin: manual | ||
3715 | 172 | depends: udisks2/automount/automount_works | ||
3716 | 173 | _summary: When enabled, automount does not mount system devices | ||
3717 | 174 | _purpose: | ||
3718 | 175 | Makes sure that automount is only restricted to pluggable devices, not system | ||
3719 | 176 | _steps: | ||
3720 | 177 | 1. Make sure that automount is enabled. Run: | ||
3721 | 178 | . | ||
3722 | 179 | $ sudo snap set udisks2 automount.enable=true | ||
3723 | 180 | 3. Reboot the device and wait for it to power on again | ||
3724 | 181 | 4. Run the following: | ||
3725 | 182 | . | ||
3726 | 183 | $ sudo udisks2.udisksctl status | ||
3727 | 184 | . | ||
3728 | 185 | and check the names under the "DEVICE" column. It should just contain | ||
3729 | 186 | thumb drives [if any is plugged-in] and the filesystem. For example, | ||
3730 | 187 | in case of RaspberryPi it would contain just: mmcblk0. | ||
3731 | 188 | Make sure that system devices, such as an ESP partition, are | ||
3732 | 189 | not displayed here. | ||
3733 | 190 | 5. Examine the mount point: | ||
3734 | 191 | . | ||
3735 | 192 | $ sudo -s # You must be root to see the mount point | ||
3736 | 193 | $ ls /media/root | ||
3737 | 194 | . | ||
3738 | 195 | Make sure the contents of that directory match what you expect to see on | ||
3739 | 196 | the drive. | ||
3740 | 197 | . | ||
3741 | 198 | Leave the root shell | ||
3742 | 199 | $ exit | ||
3743 | 200 | _verification: | ||
3744 | 201 | Verify that none of the system devices were mounted and their filesystems | ||
3745 | 202 | are not available /media/root/<filesystem label> | ||
3746 | 203 | |||
3747 | 204 | id: udisks2/automount/automount_does_mount_usb_devices_plugged_before_boot | ||
3748 | 205 | category_id: udisks2 | ||
3749 | 206 | plugin: manual | ||
3750 | 207 | depends: udisks2/automount/automount_works | ||
3751 | 208 | _summary: When enabled, automount mount USB devices plugged before boot | ||
3752 | 209 | _purpose: | ||
3753 | 210 | Makes sure that system can mount devices plugged in before boot | ||
3754 | 211 | _steps: | ||
3755 | 212 | 1. Make sure that automount is enabled. Run: | ||
3756 | 213 | . | ||
3757 | 214 | $ sudo snap set udisks2 automount.enable=true | ||
3758 | 215 | 2. Switch the device off, insert USB flash drive and boot the device again | ||
3759 | 216 | 3. Run the following: | ||
3760 | 217 | . | ||
3761 | 218 | $ sudo udisks2.udisksctl status | ||
3762 | 219 | . | ||
3763 | 220 | and check the names under the "DEVICE" column. It should contain the device | ||
3764 | 221 | that has been plugged before booting. | ||
3765 | 222 | 4. Examine the mount point: | ||
3766 | 223 | . | ||
3767 | 224 | $ sudo -s # You must be root to see the mount point | ||
3768 | 225 | $ ls /media/root | ||
3769 | 226 | . | ||
3770 | 227 | Make sure the contents of that directory match what you expect to see on | ||
3771 | 228 | the drive. | ||
3772 | 229 | . | ||
3773 | 230 | Leave the root shell | ||
3774 | 231 | $ exit | ||
3775 | 232 | _verification: | ||
3776 | 233 | Verify that the cold-plugged device is mounted on boot | ||
3777 | 234 | |||
3778 | 235 | id: udisks2/automount/automount_works_after_manual_unmount | ||
3779 | 236 | category_id: udisks2 | ||
3780 | 237 | plugin: manual | ||
3781 | 238 | depends: udisks2/automount/automount_works | ||
3782 | 239 | _summary: When enabled, automount still works after unmount has been called manually | ||
3783 | 240 | _purpose: | ||
3784 | 241 | Make sure that the system can auto mount devices after the unmount has been called | ||
3785 | 242 | _steps: | ||
3786 | 243 | 1. Make sure that automount is enabled. Run: | ||
3787 | 244 | . | ||
3788 | 245 | $ sudo snap set udisks2 automount.enable=true | ||
3789 | 246 | 2. Insert USB flash drive | ||
3790 | 247 | 3. Examine the mount point: | ||
3791 | 248 | . | ||
3792 | 249 | $ sudo ls /media/root | ||
3793 | 250 | . | ||
3794 | 251 | Make sure the USB drive that just have been plugged in is listed there. | ||
3795 | 252 | 4. Run the following: | ||
3796 | 253 | . | ||
3797 | 254 | $ sudo udisks2.udisksctl status | ||
3798 | 255 | . | ||
3799 | 256 | and check the names under the "DEVICE" column. It should contain the device | ||
3800 | 257 | that has been plugged before booting. | ||
3801 | 258 | 5. Unmount manually: | ||
3802 | 259 | . | ||
3803 | 260 | $ sudo udisks2.udisksctl unmount -b /dev/<device>1 | ||
3804 | 261 | 6. Insert another USB flash drive | ||
3805 | 262 | 7. Examine the mount point: | ||
3806 | 263 | . | ||
3807 | 264 | $ sudo ls /media/root | ||
3808 | 265 | . | ||
3809 | 266 | Make sure the USB drive that just have been plugged in is listed there. | ||
3810 | 267 | _verification: | ||
3811 | 268 | Verify that the USB drive that has been plugged in after the first one has | ||
3812 | 269 | been unmounted manually is mounted. | ||
3813 | 270 | |||
3814 | 271 | id: udisks2/debug/default_off | ||
3815 | 272 | category_id: udisks2 | ||
3816 | 273 | plugin: manual | ||
3817 | 274 | depends: udisks2/setup/ensure_interface_connection_setup | ||
3818 | 275 | _summary: The debug option defaults to off | ||
3819 | 276 | _purpose: | ||
3820 | 277 | Makes sure that the debug option defaults to disabled | ||
3821 | 278 | _steps: | ||
3822 | 279 | 1. Install the udisks2 snap fresh (i.e. not an upgrade) | ||
3823 | 280 | 2. Run the following: | ||
3824 | 281 | . | ||
3825 | 282 | $ sudo snap get udisks2 debug.enable | ||
3826 | 283 | _verification: | ||
3827 | 284 | Verify that the returned value is "false" | ||
3828 | 285 | |||
3829 | 286 | id: udisks2/debug/disabling_works | ||
3830 | 287 | category_id: udisks2 | ||
3831 | 288 | plugin: manual | ||
3832 | 289 | depends: udisks2/debug/default_off | ||
3833 | 290 | _summary: Disabling debug actually disables debug logging | ||
3834 | 291 | _purpose: | ||
3835 | 292 | Makes sure that when debug.enabled is set to "false" no loggs are written | ||
3836 | 293 | _steps: | ||
3837 | 294 | 1. Make sure that debug is disabled. Run: | ||
3838 | 295 | . | ||
3839 | 296 | $ sudo snap set udisks2 debug.enable=false | ||
3840 | 297 | 2. Plug in a USB storage device | ||
3841 | 298 | _verification: | ||
3842 | 299 | Verify that no debug information coming from files such as jobs.go, | ||
3843 | 300 | dispatcher.go, udisks2.go is written to the journal. | ||
3844 | 301 | |||
3845 | 302 | id: udisks2/automount/debug_works | ||
3846 | 303 | category_id: udisks2 | ||
3847 | 304 | plugin: manual | ||
3848 | 305 | depends: udisks2/debug/default_off | ||
3849 | 306 | _summary: When debug is enabled logs are available | ||
3850 | 307 | _purpose: | ||
3851 | 308 | Makes sure that when debug option is enabled the logs are available | ||
3852 | 309 | _steps: | ||
3853 | 310 | 1. Make sure that debug is enabled. Run: | ||
3854 | 311 | . | ||
3855 | 312 | $ sudo snap set udisks2 debug.enable=true | ||
3856 | 313 | 2. Restart ciborium service for the above change to take effect | ||
3857 | 314 | . | ||
3858 | 315 | $ sudo systemctl restart snap.udisks2.ciborium.service | ||
3859 | 316 | 3. Plug in a USB storage drive | ||
3860 | 317 | _verification: | ||
3861 | 318 | Verify that debug information coming from udisks2 snap (files such as | ||
3862 | 319 | jobs.go, dispatcher.go, udisks2.go) is written to the journal. | ||
3863 | diff --git a/com.canonical.se:engineering-tests/units/upower/00_general.pxu b/com.canonical.se:engineering-tests/units/upower/00_general.pxu | |||
3864 | 0 | new file mode 100644 | 320 | new file mode 100644 |
3865 | index 0000000..3ab4d2d | |||
3866 | --- /dev/null | |||
3867 | +++ b/com.canonical.se:engineering-tests/units/upower/00_general.pxu | |||
3868 | @@ -0,0 +1,52 @@ | |||
3869 | 1 | # Copyright 2016 Canonical Ltd. | ||
3870 | 2 | # All rights reserved. | ||
3871 | 3 | # | ||
3872 | 4 | # Written by: | ||
3873 | 5 | # Simon Fels <simon.fels@canonical.com> | ||
3874 | 6 | |||
3875 | 7 | unit: category | ||
3876 | 8 | id: upower | ||
3877 | 9 | _name: UPower | ||
3878 | 10 | |||
3879 | 11 | id: upower/general/can_be_installed | ||
3880 | 12 | category_id: upower | ||
3881 | 13 | _description: Ensure that the upower snap can be installed | ||
3882 | 14 | plugin: manual | ||
3883 | 15 | _steps: | ||
3884 | 16 | Install upower snap from the appropiate channel via the following command | ||
3885 | 17 | . | ||
3886 | 18 | $ snap install --candidate upower | ||
3887 | 19 | . | ||
3888 | 20 | NOTE: Depending on which channel you want to test you need to select the | ||
3889 | 21 | right one. The command above uses the candidate channel as that is the | ||
3890 | 22 | most used one. | ||
3891 | 23 | _verification: | ||
3892 | 24 | The installation of the snap should finish with no errors. | ||
3893 | 25 | |||
3894 | 26 | id: upower/general/service_started | ||
3895 | 27 | category_id: upower | ||
3896 | 28 | _description: Ensure that the upowerd service is up and running | ||
3897 | 29 | plugin: manual | ||
3898 | 30 | _steps: | ||
3899 | 31 | Check service status with the following command | ||
3900 | 32 | $ systemctl status snap.upower.service.service | ||
3901 | 33 | _verification: | ||
3902 | 34 | Output should look like this: | ||
3903 | 35 | snap.upower.upowerd.service - Service for snap application upower.upowerd | ||
3904 | 36 | Loaded: loaded (/etc/systemd/system/snap.upower.upowerd.service; enabled; vendor preset: enabled) | ||
3905 | 37 | Active: active (running) since Thu 2016-12-15 16:13:37 UTC; 54ms ago | ||
3906 | 38 | Main PID: 4265 (upowerd) | ||
3907 | 39 | CGroup: /system.slice/snap.upower.upowerd.service | ||
3908 | 40 | 4265 /snap/upower/x1/usr/libexec/upowerd | ||
3909 | 41 | |||
3910 | 42 | id: upower/general/client_can_talk_to_service | ||
3911 | 43 | category_id: upower | ||
3912 | 44 | _description: Verify that the upower client can talk to the service | ||
3913 | 45 | plugin: manual | ||
3914 | 46 | _steps: | ||
3915 | 47 | Enumerate available devices available on the system: | ||
3916 | 48 | $ upower -e | ||
3917 | 49 | _verification: | ||
3918 | 50 | Output should look like this and at least one device should be present: | ||
3919 | 51 | /org/freedesktop/UPower/devices/battery_BAT0 | ||
3920 | 52 | /org/freedesktop/UPower/devices/DisplayDevice | ||
3921 | diff --git a/com.canonical.se:engineering-tests/units/upower/10_battery_powered.pxu b/com.canonical.se:engineering-tests/units/upower/10_battery_powered.pxu | |||
3922 | 0 | new file mode 100644 | 53 | new file mode 100644 |
3923 | index 0000000..d5fe6b1 | |||
3924 | --- /dev/null | |||
3925 | +++ b/com.canonical.se:engineering-tests/units/upower/10_battery_powered.pxu | |||
3926 | @@ -0,0 +1,129 @@ | |||
3927 | 1 | # Copyright 2016 Canonical Ltd. | ||
3928 | 2 | # All rights reserved. | ||
3929 | 3 | # | ||
3930 | 4 | # Written by: | ||
3931 | 5 | # Simon Fels <simon.fels@canonical.com> | ||
3932 | 6 | |||
3933 | 7 | id: upower/battery_powered/battery_detected | ||
3934 | 8 | category_id: upower | ||
3935 | 9 | _description: Verify upower is able to detect the battery of the system | ||
3936 | 10 | plugin: manual | ||
3937 | 11 | _steps: | ||
3938 | 12 | Query upowerd for available power devices on the system | ||
3939 | 13 | $ upower -d | ||
3940 | 14 | _verification: | ||
3941 | 15 | The output should be similar to the following and should list the | ||
3942 | 16 | battery of your system: | ||
3943 | 17 | . | ||
3944 | 18 | Device: /org/freedesktop/UPower/devices/line_power_AC | ||
3945 | 19 | native-path: AC | ||
3946 | 20 | power supply: yes | ||
3947 | 21 | updated: Do 15 Dez 2016 15:06:55 CET (7163 seconds ago) | ||
3948 | 22 | has history: no | ||
3949 | 23 | has statistics: no | ||
3950 | 24 | line-power | ||
3951 | 25 | warning-level: none | ||
3952 | 26 | online: yes | ||
3953 | 27 | icon-name: 'ac-adapter-symbolic' | ||
3954 | 28 | . | ||
3955 | 29 | Device: /org/freedesktop/UPower/devices/battery_BAT0 | ||
3956 | 30 | native-path: BAT0 | ||
3957 | 31 | vendor: SANYO | ||
3958 | 32 | model: 45N1779 | ||
3959 | 33 | serial: 115 | ||
3960 | 34 | power supply: yes | ||
3961 | 35 | updated: Do 15 Dez 2016 17:05:18 CET (60 seconds ago) | ||
3962 | 36 | has history: yes | ||
3963 | 37 | has statistics: yes | ||
3964 | 38 | battery | ||
3965 | 39 | present: yes | ||
3966 | 40 | rechargeable: yes | ||
3967 | 41 | state: fully-charged | ||
3968 | 42 | warning-level: none | ||
3969 | 43 | energy: 97,05 Wh | ||
3970 | 44 | energy-empty: 0 Wh | ||
3971 | 45 | energy-full: 97,13 Wh | ||
3972 | 46 | energy-full-design: 99,47 Wh | ||
3973 | 47 | energy-rate: 7,983 W | ||
3974 | 48 | voltage: 12,374 V | ||
3975 | 49 | percentage: 99% | ||
3976 | 50 | capacity: 97,6475% | ||
3977 | 51 | technology: lithium-ion | ||
3978 | 52 | icon-name: 'battery-full-charged-symbolic' | ||
3979 | 53 | . | ||
3980 | 54 | Device: /org/freedesktop/UPower/devices/DisplayDevice | ||
3981 | 55 | power supply: yes | ||
3982 | 56 | updated: Do 15 Dez 2016 16:41:14 CET (1504 seconds ago) | ||
3983 | 57 | has history: no | ||
3984 | 58 | has statistics: no | ||
3985 | 59 | battery | ||
3986 | 60 | present: yes | ||
3987 | 61 | state: fully-charged | ||
3988 | 62 | warning-level: none | ||
3989 | 63 | energy: 97,05 Wh | ||
3990 | 64 | energy-full: 97,13 Wh | ||
3991 | 65 | energy-rate: 7,983 W | ||
3992 | 66 | percentage: 99% | ||
3993 | 67 | icon-name: 'battery-full-charged-symbolic' | ||
3994 | 68 | . | ||
3995 | 69 | Daemon: | ||
3996 | 70 | daemon-version: 0.99.4 | ||
3997 | 71 | on-battery: no | ||
3998 | 72 | lid-is-closed: no | ||
3999 | 73 | lid-is-present: yes | ||
4000 | 74 | critical-action: PowerOff | ||
4001 | 75 | |||
4002 | 76 | id: upower/battery_powered/battery_discharging | ||
4003 | 77 | category_id: upower | ||
4004 | 78 | _description: Verify upower reports discharging battery | ||
4005 | 79 | plugin: manual | ||
4006 | 80 | _steps: | ||
4007 | 81 | 1. Unplug the power cable from your battery powered device | ||
4008 | 82 | 2. Listen to reported changes from upower | ||
4009 | 83 | $ upower -m | ||
4010 | 84 | _verification: | ||
4011 | 85 | Leave the monitor running for some time. It should report the device changes | ||
4012 | 86 | for the battery device: | ||
4013 | 87 | . | ||
4014 | 88 | [17:22:55.277]device changed: /org/freedesktop/UPowerr/devices/battery_BAT0 | ||
4015 | 89 | [17:22:55.277]device changed: /org/freedesktop/UPower/devices/battery_BAT0 | ||
4016 | 90 | . | ||
4017 | 91 | Verify with the following command that the actual battery capacity is changing | ||
4018 | 92 | . | ||
4019 | 93 | $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | capacity | ||
4020 | 94 | capacity: 97,6475% | ||
4021 | 95 | . | ||
4022 | 96 | and that the state of the battery device is changed to 'discharging' | ||
4023 | 97 | . | ||
4024 | 98 | $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state | ||
4025 | 99 | state: discharging | ||
4026 | 100 | |||
4027 | 101 | id: upower/battery_powered/low_battery_causes_poweroff | ||
4028 | 102 | category_id: upower | ||
4029 | 103 | _description: Verify upower reports discharging battery | ||
4030 | 104 | plugin: manual | ||
4031 | 105 | _steps: | ||
4032 | 106 | A battery with a low capacity should cause the device to power off. This | ||
4033 | 107 | involves as a first step to wait until the battery of the device under test | ||
4034 | 108 | is close to being empty. The default trigger of the poweroff action is by | ||
4035 | 109 | default at <= 2% | ||
4036 | 110 | . | ||
4037 | 111 | Depending on how full your device battery is you have to wait some time | ||
4038 | 112 | until it is discharged enough. | ||
4039 | 113 | . | ||
4040 | 114 | Watch the system via | ||
4041 | 115 | . | ||
4042 | 116 | $ sudo journalctl --no-pager -f | ||
4043 | 117 | _verification: | ||
4044 | 118 | Once the defined threshold of the battery capacity is reached the system | ||
4045 | 119 | should power off itself. You can spot this by looking at the output | ||
4046 | 120 | of the journalctl command which should print something like: | ||
4047 | 121 | . | ||
4048 | 122 | Dec 15 16:37:02 localhost.localdomain systemd-logind[1022]: System is powering down | ||
4049 | 123 | [...] | ||
4050 | 124 | Dec 15 16:37:02 localhost.localdomain systemd[1]: Starting Power-Off... | ||
4051 | 125 | Dec 15 16:37:02 localhost.localdomain systemd[1]: Starting Update UTMP about System Runlevel Changes... | ||
4052 | 126 | Dec 15 16:37:02 localhost.localdomain systemd[1]: Started Power-Off. | ||
4053 | 127 | Dec 15 16:37:02 localhost.localdomain systemd[1]: Started Update UTMP about System Runlevel Changes. | ||
4054 | 128 | Dec 15 16:37:02 localhost.localdomain systemd[1]: Reached target Power-Off. | ||
4055 | 129 | Dec 15 16:37:02 localhost.localdomain systemd-logind[1022]: Operation 'shutdown' finished. | ||
4056 | diff --git a/com.canonical.se:engineering-tests/units/upower/20_ac_powered.pxu b/com.canonical.se:engineering-tests/units/upower/20_ac_powered.pxu | |||
4057 | 0 | new file mode 100644 | 130 | new file mode 100644 |
4058 | index 0000000..169f0e3 | |||
4059 | --- /dev/null | |||
4060 | +++ b/com.canonical.se:engineering-tests/units/upower/20_ac_powered.pxu | |||
4061 | @@ -0,0 +1,49 @@ | |||
4062 | 1 | # Copyright 2016 Canonical Ltd. | ||
4063 | 2 | # All rights reserved. | ||
4064 | 3 | # | ||
4065 | 4 | # Written by: | ||
4066 | 5 | # Simon Fels <simon.fels@canonical.com> | ||
4067 | 6 | |||
4068 | 7 | id: upower/ac_powered/source_detected | ||
4069 | 8 | category_id: upower | ||
4070 | 9 | _description: Verify upower is able to detect the AC power source | ||
4071 | 10 | plugin: manual | ||
4072 | 11 | _steps: | ||
4073 | 12 | Query upowerd for available power devices on the system | ||
4074 | 13 | . | ||
4075 | 14 | $ upower -e | ||
4076 | 15 | _verification: | ||
4077 | 16 | The AC power source should be listed in the result, e.g.: | ||
4078 | 17 | . | ||
4079 | 18 | /org/freedesktop/UPower/devices/line_power_AC | ||
4080 | 19 | |||
4081 | 20 | id: upower/ac_powered/status_plugged | ||
4082 | 21 | category_id: upower | ||
4083 | 22 | _description: Verify upower report AC source as plugged | ||
4084 | 23 | plugin: manual | ||
4085 | 24 | _steps: | ||
4086 | 25 | Plug in the AC adapter to your device and query upower with | ||
4087 | 26 | . | ||
4088 | 27 | $ upower -i /org/freedesktop/UPower/devices/line_power_AC | grep online | ||
4089 | 28 | for the online status of the source. | ||
4090 | 29 | _verification: | ||
4091 | 30 | The output should be | ||
4092 | 31 | . | ||
4093 | 32 | online: yes | ||
4094 | 33 | . | ||
4095 | 34 | If the source is not plugged upower will report a "no" instead of "yes". | ||
4096 | 35 | |||
4097 | 36 | id: upower/ac_powered/status_unplugged | ||
4098 | 37 | category_id: upower | ||
4099 | 38 | _description: Verify upower report AC source as unplugged | ||
4100 | 39 | plugin: manual | ||
4101 | 40 | _steps: | ||
4102 | 41 | Unplug the AC adapter from your device and query upower with | ||
4103 | 42 | $ upower -i /org/freedesktop/UPower/devices/line_power_AC | grep online | ||
4104 | 43 | for the online status of the source. | ||
4105 | 44 | _verification: | ||
4106 | 45 | The output should be | ||
4107 | 46 | . | ||
4108 | 47 | online: no | ||
4109 | 48 | . | ||
4110 | 49 | If the source is plugged upower will report a "yes" instead of "no". | ||
4111 | diff --git a/com.canonical.se:engineering-tests/units/wifi-ap/wifi-ap.pxu b/com.canonical.se:engineering-tests/units/wifi-ap/wifi-ap.pxu | |||
4112 | 0 | new file mode 100644 | 50 | new file mode 100644 |
4113 | index 0000000..2f61369 | |||
4114 | --- /dev/null | |||
4115 | +++ b/com.canonical.se:engineering-tests/units/wifi-ap/wifi-ap.pxu | |||
4116 | @@ -0,0 +1,213 @@ | |||
4117 | 1 | # Copyright 2016 Canonical Ltd. | ||
4118 | 2 | # All rights reserved. | ||
4119 | 3 | # | ||
4120 | 4 | # Written by: | ||
4121 | 5 | # Jim Hodapp <jim.hodapp@canonical.com> | ||
4122 | 6 | # Simon Fels <simon.fels@canonical.com> | ||
4123 | 7 | # Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com> | ||
4124 | 8 | |||
4125 | 9 | unit: category | ||
4126 | 10 | id: wifi_ap | ||
4127 | 11 | _name: WiFi Access Point | ||
4128 | 12 | |||
4129 | 13 | id: wifi_ap/setup/ensure_interface_connection_setup | ||
4130 | 14 | category_id: wifi_ap | ||
4131 | 15 | _description: Ensure that the wifi_ap interfaces are connected | ||
4132 | 16 | plugin: manual | ||
4133 | 17 | _steps: | ||
4134 | 18 | 0. If the wifi-ap snap is already installed remove it via | ||
4135 | 19 | . | ||
4136 | 20 | $ snap remove wifi-ap | ||
4137 | 21 | . | ||
4138 | 22 | 1. Network Manager setup | ||
4139 | 23 | . | ||
4140 | 24 | For snaps on Classic: | ||
4141 | 25 | NetworkManager is part of the base Ubuntu Desktop system | ||
4142 | 26 | and does not need to be installed again. | ||
4143 | 27 | . | ||
4144 | 28 | For an Ubuntu Core system you have to install | ||
4145 | 29 | the NetworkManager snap from the Ubuntu store. | ||
4146 | 30 | $ snap install network-manager | ||
4147 | 31 | . | ||
4148 | 32 | 2. Install now the wifi-ap snap via | ||
4149 | 33 | . | ||
4150 | 34 | $ snap install wifi-ap | ||
4151 | 35 | . | ||
4152 | 36 | _verification: | ||
4153 | 37 | Verify that you see the following when running snap interfaces: | ||
4154 | 38 | :firewall-control wifi-ap | ||
4155 | 39 | :network-control wifi-ap | ||
4156 | 40 | :network wifi-ap | ||
4157 | 41 | :network-bind wifi-ap | ||
4158 | 42 | . | ||
4159 | 43 | For snaps on Classic: | ||
4160 | 44 | :network-manager wifi-ap | ||
4161 | 45 | . | ||
4162 | 46 | For full-snap based system: | ||
4163 | 47 | network-manager:service wifi-ap:network-manager | ||
4164 | 48 | |||
4165 | 49 | id: wifi_ap/configuration/get_all | ||
4166 | 50 | category_id: wifi_ap | ||
4167 | 51 | plugin: manual | ||
4168 | 52 | depends: wifi_ap/setup/ensure_interface_connection_setup | ||
4169 | 53 | _summary: All WiFi AP configuration items are listed | ||
4170 | 54 | _purpose: | ||
4171 | 55 | Check if the configuration of the WiFi AP can be listed | ||
4172 | 56 | with the expected command. | ||
4173 | 57 | _steps: | ||
4174 | 58 | 1. Execute the following command to retrieve all configuration items: | ||
4175 | 59 | . | ||
4176 | 60 | $ /snap/bin/wifi-ap.config get | ||
4177 | 61 | _verification: | ||
4178 | 62 | All available configuration items are listed as output. | ||
4179 | 63 | |||
4180 | 64 | id: wifi_ap/configuration/set_any | ||
4181 | 65 | category_id: wifi_ap | ||
4182 | 66 | plugin: manual | ||
4183 | 67 | depends: wifi_ap/setup/ensure_interface_connection_setup | ||
4184 | 68 | _summary: Setting any configuration key is possible | ||
4185 | 69 | _purpose: | ||
4186 | 70 | Check if any configuration key can be set via the | ||
4187 | 71 | configuration system of the snap. | ||
4188 | 72 | _steps: | ||
4189 | 73 | 1. Retrieve the current value of a specific configuration item | ||
4190 | 74 | e.g. 'wifi.interface'. | ||
4191 | 75 | . | ||
4192 | 76 | $ /snap/bin/wifi-ap.config get wifi.interface | ||
4193 | 77 | . | ||
4194 | 78 | 2. Set a new value for the same configuration item | ||
4195 | 79 | . | ||
4196 | 80 | $ sudo /snap/bin/wifi-ap.config set wifi.interface=wlan1 | ||
4197 | 81 | . | ||
4198 | 82 | 3. Retrieve the current value of the same configuration item | ||
4199 | 83 | for comparison. | ||
4200 | 84 | . | ||
4201 | 85 | $ /snap/bin/wifi-ap.config get wifi.interface | ||
4202 | 86 | _verification: | ||
4203 | 87 | Verify that the new value for the configuration is not the same | ||
4204 | 88 | as before the 'set' operation and is now the the value specified | ||
4205 | 89 | in step 2. | ||
4206 | 90 | |||
4207 | 91 | id: wifi_ap/connect/enable_ap | ||
4208 | 92 | category_id: wifi_ap | ||
4209 | 93 | plugin: manual | ||
4210 | 94 | depends: wifi_ap/setup/ensure_interface_connection_setup | ||
4211 | 95 | _summary: Enabling the AP succeeds | ||
4212 | 96 | _purpose: | ||
4213 | 97 | Check to make sure the AP can be enabled. | ||
4214 | 98 | _steps: | ||
4215 | 99 | 0. If the AP is already enabled as on some devices where the | ||
4216 | 100 | automated wizard was able to find a good configuration | ||
4217 | 101 | automatically you can skip the following steps. You can | ||
4218 | 102 | verify if the AP is active by calling | ||
4219 | 103 | . | ||
4220 | 104 | $ /snap/bin/wifi-ap.status | ||
4221 | 105 | ap.active: true | ||
4222 | 106 | . | ||
4223 | 107 | 1. Look up and set the wifi interface to the proper name | ||
4224 | 108 | e.g. from default wlan0 to enp0s3 | ||
4225 | 109 | . | ||
4226 | 110 | $ ifconfig | ||
4227 | 111 | $ /snap/bin/wifi-ap.config set wifi.interface=<interface_name> | ||
4228 | 112 | . | ||
4229 | 113 | 2. Enable the AP with the default configuration for other key values | ||
4230 | 114 | . | ||
4231 | 115 | $ sudo /snap/bin/wifi-ap.config set disabled=false | ||
4232 | 116 | . | ||
4233 | 117 | 3. Verify that the AP is enabled by looking at the key/value pair | ||
4234 | 118 | . | ||
4235 | 119 | $ /snap/bin/wifi-ap.config get disabled | ||
4236 | 120 | _verification: | ||
4237 | 121 | Verify that the new value for the disabled is set to false. Also verify that a | ||
4238 | 122 | different machine such as a phone or a laptop can connect to the AP using | ||
4239 | 123 | SSID of "Ubuntu" and no security type. | ||
4240 | 124 | |||
4241 | 125 | id: wifi_ap/configuration/control_socket | ||
4242 | 126 | category_id: wifi_ap | ||
4243 | 127 | plugin: manual | ||
4244 | 128 | depends: wifi_ap/setup/ensure_interface_connection_setup | ||
4245 | 129 | _summary: Check content interface | ||
4246 | 130 | _purpose: | ||
4247 | 131 | Check if the content interface is accessible and | ||
4248 | 132 | it exports a socket for a consumer snap. | ||
4249 | 133 | _steps: | ||
4250 | 134 | 1. Install the wifiap-consumer snap | ||
4251 | 135 | . | ||
4252 | 136 | $ sudo snap install wifiap-consumer | ||
4253 | 137 | . | ||
4254 | 138 | 2. Connect the wifi-ap and wifiap-consumer content interface | ||
4255 | 139 | . | ||
4256 | 140 | $ sudo snap connect wifiap-consumer:control wifi-ap:control | ||
4257 | 141 | . | ||
4258 | 142 | 3. Get the configuration with the unix HTTP client | ||
4259 | 143 | . | ||
4260 | 144 | $ sudo wifiap-consumer.unixhttpc /v1/configuration | ||
4261 | 145 | . | ||
4262 | 146 | _verification: | ||
4263 | 147 | Verify that the configuration is a valid JSON with reasonable data, like: | ||
4264 | 148 | { | ||
4265 | 149 | "result": { | ||
4266 | 150 | "debug": false, | ||
4267 | 151 | "disabled": false, | ||
4268 | 152 | "wifi.interface": "wlan0", | ||
4269 | 153 | "wifi.security": "open", | ||
4270 | 154 | "wifi.ssid": "Ubuntu" | ||
4271 | 155 | }, | ||
4272 | 156 | "status": "OK", | ||
4273 | 157 | "status-code": 200, | ||
4274 | 158 | "type": "sync" | ||
4275 | 159 | } | ||
4276 | 160 | |||
4277 | 161 | id: wifi_ap/configuration/default_ssid | ||
4278 | 162 | category_id: wifi_ap | ||
4279 | 163 | plugin: manual | ||
4280 | 164 | _summary: WiFi AP default SSID is set from gadget snap | ||
4281 | 165 | _purpose: | ||
4282 | 166 | Check if the configuration of the WiFi AP SSID is set to the value | ||
4283 | 167 | coming from the gadget snap, when present. | ||
4284 | 168 | _steps: | ||
4285 | 169 | 1. Install a gadget snap which contains in gadget.yaml: | ||
4286 | 170 | . | ||
4287 | 171 | defaults: | ||
4288 | 172 | # Below snap ID matches the one assigned for wifi-ap in the Ubuntu Store | ||
4289 | 173 | 2rGgvyaY0CCzlWuKAPwFtCWrgwkM8lqS: | ||
4290 | 174 | default.wifi.ssid: GadgetSnap | ||
4291 | 175 | . | ||
4292 | 176 | 2. Reboot | ||
4293 | 177 | 3. Remove wifi-ap if present: | ||
4294 | 178 | . | ||
4295 | 179 | $ snap remove wifi-ap | ||
4296 | 180 | . | ||
4297 | 181 | 4. Install wifi-ap (this must be done from the store, otherwise the gadget | ||
4298 | 182 | will not set the defaults for the snap). Assuming we are testing candidate: | ||
4299 | 183 | . | ||
4300 | 184 | $ snap install --candidate wifi-ap | ||
4301 | 185 | . | ||
4302 | 186 | 5. Get the SSID value: | ||
4303 | 187 | . | ||
4304 | 188 | $ /snap/bin/wifi-ap.config get wifi.ssid | ||
4305 | 189 | . | ||
4306 | 190 | _verification: | ||
4307 | 191 | Check that wifi.ssid=GadgetSnap | ||
4308 | 192 | |||
4309 | 193 | id: wifi_ap/configuration/country_code | ||
4310 | 194 | category_id: wifi_ap | ||
4311 | 195 | plugin: manual | ||
4312 | 196 | depends: wifi_ap/connect/enable_ap | ||
4313 | 197 | _summary: WiFi AP sends the country code IE in beacon frames | ||
4314 | 198 | _purpose: | ||
4315 | 199 | Check if the WiFi AP sends the configured country code in beacon frames | ||
4316 | 200 | _steps: | ||
4317 | 201 | 1. Set the ISO/IEC 3166-1 code of the country you are in at the moment, | ||
4318 | 202 | for instance | ||
4319 | 203 | . | ||
4320 | 204 | $ sudo wifi-ap.config set wifi.country-code=ES | ||
4321 | 205 | . | ||
4322 | 206 | 2. Use a device with wifi to capture the beacon frames. You have to | ||
4323 | 207 | turn on monitor mode for the wifi card to achieve this. See, for | ||
4324 | 208 | instance https://sandilands.info/sgordon/capturing-wifi-in-monitor-mode-with-iw. | ||
4325 | 209 | 3. Capture the packets with tcpdump or wireshark | ||
4326 | 210 | 4. Check that the beacon frames from the SSID from the device where | ||
4327 | 211 | you are testing wifi-ap contain the country code information element. | ||
4328 | 212 | _verification: | ||
4329 | 213 | Check that IE contains the configure country code. | ||
4330 | diff --git a/com.canonical.se:engineering-tests/units/wifi-connect/wifi.connect.pxu b/com.canonical.se:engineering-tests/units/wifi-connect/wifi.connect.pxu | |||
4331 | 0 | new file mode 100644 | 214 | new file mode 100644 |
4332 | index 0000000..78fce85 | |||
4333 | --- /dev/null | |||
4334 | +++ b/com.canonical.se:engineering-tests/units/wifi-connect/wifi.connect.pxu | |||
4335 | @@ -0,0 +1,202 @@ | |||
4336 | 1 | # Copyright 2017 Canonical Ltd. | ||
4337 | 2 | # All rights reserved. | ||
4338 | 3 | # | ||
4339 | 4 | # Written by: | ||
4340 | 5 | # Roberto Mier Escandon <roberto.escandon@canonical.com> | ||
4341 | 6 | |||
4342 | 7 | unit: category | ||
4343 | 8 | id: wifi-connect | ||
4344 | 9 | _name: WiFi Connect | ||
4345 | 10 | |||
4346 | 11 | id: wifi-connect/setup/ensure_interface_connection_setup | ||
4347 | 12 | category_id: wifi-connect | ||
4348 | 13 | _description: Ensure that the wifi-connect interfaces are connected | ||
4349 | 14 | plugin: manual | ||
4350 | 15 | _steps: | ||
4351 | 16 | 0. If the wifi-connect snap is already installed remove it via | ||
4352 | 17 | . | ||
4353 | 18 | $ snap remove wifi-connect | ||
4354 | 19 | . | ||
4355 | 20 | 1. Network Manager setup | ||
4356 | 21 | . | ||
4357 | 22 | For snaps on Classic: | ||
4358 | 23 | NetworkManager is part of the base Ubuntu Desktop system | ||
4359 | 24 | and does not need to be installed again. | ||
4360 | 25 | . | ||
4361 | 26 | For an Ubuntu Core system you have to install | ||
4362 | 27 | the NetworkManager snap from the Ubuntu store. | ||
4363 | 28 | $ snap install network-manager | ||
4364 | 29 | . | ||
4365 | 30 | 2. Wifi AP setup | ||
4366 | 31 | . | ||
4367 | 32 | You have to install Wifi AP snap. | ||
4368 | 33 | $ snap install wifi-ap | ||
4369 | 34 | . | ||
4370 | 35 | 3. Install now the wifi-connect snap via | ||
4371 | 36 | . | ||
4372 | 37 | $ snap install wifi-connect | ||
4373 | 38 | . | ||
4374 | 39 | 4. Connect wifi-connect interfaces | ||
4375 | 40 | . | ||
4376 | 41 | $ snap connect wifi-connect:control wifi-ap:control | ||
4377 | 42 | $ snap connect wifi-connect:network core:network | ||
4378 | 43 | $ snap connect wifi-connect:network-bind core:network-bind | ||
4379 | 44 | . | ||
4380 | 45 | For snaps on Classic you have to connect: | ||
4381 | 46 | $ snap connect wifi-connect:network-manager core:network-manager | ||
4382 | 47 | . | ||
4383 | 48 | For an Ubuntu Core system you have to connect: | ||
4384 | 49 | $ snap connect wifi-connect:network-manager network-manager:service | ||
4385 | 50 | . | ||
4386 | 51 | _verification: | ||
4387 | 52 | Verify that you see the following when running snap interfaces: | ||
4388 | 53 | :firewall-control wifi-ap | ||
4389 | 54 | :network-control wifi-ap | ||
4390 | 55 | :network wifi-ap,wifi-connect | ||
4391 | 56 | :network-bind wifi-ap,wifi-connect | ||
4392 | 57 | wifi-ap:control wifi-connect | ||
4393 | 58 | . | ||
4394 | 59 | For snaps on Classic: | ||
4395 | 60 | :network-manager wifi-ap,wifi-connect | ||
4396 | 61 | . | ||
4397 | 62 | For full-snap based system: | ||
4398 | 63 | network-manager:service wifi-ap:network-manager,wifi-connect:network-manager | ||
4399 | 64 | |||
4400 | 65 | id: wifi-connect/configuration/network_manager_does_not_control_network_before_reboot | ||
4401 | 66 | category_id: wifi-connect | ||
4402 | 67 | plugin: manual | ||
4403 | 68 | depends: wifi-connect/setup/ensure_interface_connection_setup | ||
4404 | 69 | _summary: NetworkManager does not control all networking before rebooting | ||
4405 | 70 | _purpose: | ||
4406 | 71 | Check if netplan is configured for NetworkManager to control networking | ||
4407 | 72 | _steps: | ||
4408 | 73 | 0. Backup existing /etc/netplan/00-snapd-config.yaml file | ||
4409 | 74 | . | ||
4410 | 75 | $ mv /etc/netplan/00-snapd-config.yaml ~/ | ||
4411 | 76 | . | ||
4412 | 77 | 1. Create a new netplan config file named /etc/netplan/00-default-nm-renderer.yaml | ||
4413 | 78 | . | ||
4414 | 79 | $ echo -e "network:\n renderer: NetworkManager" > /etc/netplan/00-default-nm-renderer.yaml | ||
4415 | 80 | . | ||
4416 | 81 | 2. See current managed devices by NetworkManager: | ||
4417 | 82 | . | ||
4418 | 83 | $ nmcli d | ||
4419 | 84 | . | ||
4420 | 85 | _verification: | ||
4421 | 86 | Verify that wireless device (wlan0 by default) STATE column value does not equals to 'connected' or 'disconnected' | ||
4422 | 87 | |||
4423 | 88 | id: wifi-connect/configuration/network_manager_controls_network_after_reboot | ||
4424 | 89 | category_id: wifi-connect | ||
4425 | 90 | plugin: manual | ||
4426 | 91 | depends: wifi-connect/configuration/network_manager_does_not_control_network_before_reboot | ||
4427 | 92 | _summary: NetworkManager controls network after configure netplan file and reboot | ||
4428 | 93 | _steps: | ||
4429 | 94 | 0. Reboot the device | ||
4430 | 95 | . | ||
4431 | 96 | $ sudo reboot | ||
4432 | 97 | . | ||
4433 | 98 | 1. When the device finished booting, check nm status with the following command: | ||
4434 | 99 | . | ||
4435 | 100 | $ nmcli d | ||
4436 | 101 | . | ||
4437 | 102 | _verification: | ||
4438 | 103 | Verify that wireless device (wlan0 by default) STATE column value does NOT equals to 'unmanaged'. | ||
4439 | 104 | If it is connected to external Wi-Fi, it should be displayed in green with 'connected' state, and | ||
4440 | 105 | if it is not connected to external Wi-Fi, it should be shown in red iwth 'disconnected' state | ||
4441 | 106 | |||
4442 | 107 | id: wifi-connect/configuration/content_interface_is_plugged_after_reboot | ||
4443 | 108 | category_id: wifi-connect | ||
4444 | 109 | plugin: manual | ||
4445 | 110 | depends: wifi-connect/configuration/network_manager_controls_network_after_reboot | ||
4446 | 111 | _summary: Check that wifi-ap control interface is connected and working | ||
4447 | 112 | _steps: | ||
4448 | 113 | 0. Enter in snap runtime environment | ||
4449 | 114 | . | ||
4450 | 115 | $ snap run --shell wifi-connect.wifi-connect | ||
4451 | 116 | . | ||
4452 | 117 | 1. List $SNAP_COMMON content | ||
4453 | 118 | . | ||
4454 | 119 | $ ls /var/snap/wifi-connect/common | ||
4455 | 120 | . | ||
4456 | 121 | _verification: | ||
4457 | 122 | Check that exists /var/snap/wifi-connect/common/control | ||
4458 | 123 | |||
4459 | 124 | id: wifi-connect/configuration/set_AP_ssid_and_passphrase | ||
4460 | 125 | category_id: wifi-connect | ||
4461 | 126 | plugin: manual | ||
4462 | 127 | depends: wifi-connect/configuration/content_interface_is_plugged_after_reboot | ||
4463 | 128 | _summary: Verify it is possible changing wifi-ap access point ssid and passphrase params | ||
4464 | 129 | _steps: | ||
4465 | 130 | 0. Set wifi-ap AP ssid | ||
4466 | 131 | . | ||
4467 | 132 | $ wifi-connect ssid MYSSID | ||
4468 | 133 | . | ||
4469 | 134 | 1. Set wifi-ap AP passphrase | ||
4470 | 135 | . | ||
4471 | 136 | $ wifi-connect passphrase MYPASSPHRASE | ||
4472 | 137 | . | ||
4473 | 138 | 2. Display config | ||
4474 | 139 | . | ||
4475 | 140 | $ wifi-connect show-ap | ||
4476 | 141 | . | ||
4477 | 142 | _verification: | ||
4478 | 143 | Verify into returning values exist: | ||
4479 | 144 | wifi.ssid: MYSSID | ||
4480 | 145 | wifi.security-passphrase: MYPASSPHRASE | ||
4481 | 146 | |||
4482 | 147 | id: wifi-connect/configuration/set_portal_password | ||
4483 | 148 | category_id: wifi-connect | ||
4484 | 149 | plugin: manual | ||
4485 | 150 | depends: wifi-connect/configuration/content_interface_is_plugged_after_reboot | ||
4486 | 151 | _summary: Verify portal password change | ||
4487 | 152 | _steps: | ||
4488 | 153 | 0. Set portal password | ||
4489 | 154 | . | ||
4490 | 155 | $ wifi-connect set-portal-password WHATEVER | ||
4491 | 156 | . | ||
4492 | 157 | _verification: | ||
4493 | 158 | Verify result of set-portal-password operation is a hash of 60 chars starting with '$2a$08$' string | ||
4494 | 159 | |||
4495 | 160 | id: wifi-connect/connect/local_AP_is_up | ||
4496 | 161 | category_id: wifi-connect | ||
4497 | 162 | plugin: manual | ||
4498 | 163 | depends: wifi-connect/configuration/network_manager_controls_network_after_reboot | ||
4499 | 164 | _summary: Verify management portal is up, running and has got some ssids | ||
4500 | 165 | _steps: | ||
4501 | 166 | 0. From another device different from the one where wifi-connect is deployed: | ||
4502 | 167 | . | ||
4503 | 168 | Search available Wi-Fi access points | ||
4504 | 169 | . | ||
4505 | 170 | _verification: | ||
4506 | 171 | Check that an SSID is available named MYSSID (or the one set when configured). Verify you can | ||
4507 | 172 | connect to that access point by introducing MYPASSPHRASE password | ||
4508 | 173 | |||
4509 | 174 | id: wifi-connect/connect/can_connect_to_external_wifi | ||
4510 | 175 | category_id: wifi-connect | ||
4511 | 176 | plugin: manual | ||
4512 | 177 | depends: wifi-connect/connect/local_AP_is_up | ||
4513 | 178 | _summary: Management portal shows available access points and can connect to them | ||
4514 | 179 | _steps: | ||
4515 | 180 | 0. From another device different from the one where wifi-connect is deployed, once connected to local AP | ||
4516 | 181 | . | ||
4517 | 182 | Open browser and access http://10.0.60.1:8080 | ||
4518 | 183 | . | ||
4519 | 184 | _verification: | ||
4520 | 185 | Verify a list of available external networks are shown. Verify you can access any of them by setting | ||
4521 | 186 | the related passphrase and clicking connect button. | ||
4522 | 187 | You should ssh device where wifi-connect is and see if 'nmcli d' command shows device is connected to | ||
4523 | 188 | selected external Wi-Fi | ||
4524 | 189 | |||
4525 | 190 | id: wifi-connect/connect/can_get_back_to_management_mode | ||
4526 | 191 | category_id: wifi-connect | ||
4527 | 192 | plugin: manual | ||
4528 | 193 | depends: wifi-connect/connect/can_connect_to_external_wifi | ||
4529 | 194 | _summary: It is possible to bring back local AP and management portal | ||
4530 | 195 | _steps: | ||
4531 | 196 | 0. From another device different from the one where wifi-connect is deployed, once connected to external Wi-Fi | ||
4532 | 197 | . | ||
4533 | 198 | Open browser and access http://<device_ip>:8080 (or http://<device_hostname>.local:8080 in case browser device supports avahi) | ||
4534 | 199 | . | ||
4535 | 200 | _verification: | ||
4536 | 201 | Check that a web is shown with a button to return back to management mode. Press button and after passed around a minute | ||
4537 | 202 | verify same steps as the ones in id=wifi-connect/connect/can_connect_to_external_wifi | ||
4538 | diff --git a/com.canonical.se:engineering-tests/units/wireless-tools/wireless-tools.pxu b/com.canonical.se:engineering-tests/units/wireless-tools/wireless-tools.pxu | |||
4539 | 0 | new file mode 100644 | 203 | new file mode 100644 |
4540 | index 0000000..39c070e | |||
4541 | --- /dev/null | |||
4542 | +++ b/com.canonical.se:engineering-tests/units/wireless-tools/wireless-tools.pxu | |||
4543 | @@ -0,0 +1,100 @@ | |||
4544 | 1 | # Copyright 2016 Canonical Ltd. | ||
4545 | 2 | # All rights reserved. | ||
4546 | 3 | # | ||
4547 | 4 | # Written by: | ||
4548 | 5 | # Konrad Zapalowicz <konrad.zapalowicz@canonical.com> | ||
4549 | 6 | |||
4550 | 7 | unit: category | ||
4551 | 8 | id:wireless-tools | ||
4552 | 9 | _name: Wireless Tools | ||
4553 | 10 | |||
4554 | 11 | id: wireless-tools/setup/ensure_interface_connection_setup | ||
4555 | 12 | category_id: wireless-tools | ||
4556 | 13 | _description: Ensure that wireless_tools interfaces are connected | ||
4557 | 14 | plugin: manual | ||
4558 | 15 | _steps: | ||
4559 | 16 | 1. Connect required wireless-tools slots/plugs | ||
4560 | 17 | . | ||
4561 | 18 | $ sudo snap connect wireless-tools:network-control :network-control | ||
4562 | 19 | . | ||
4563 | 20 | _verification: | ||
4564 | 21 | Verify that you see the following when running snap interfaces: | ||
4565 | 22 | :network wireless-tools | ||
4566 | 23 | :network-bind wireless-tools | ||
4567 | 24 | :network-control wireless-tools | ||
4568 | 25 | |||
4569 | 26 | id: wireless-tools/rfkill/list | ||
4570 | 27 | category_id:wireless-tools | ||
4571 | 28 | plugin: manual | ||
4572 | 29 | depends: wireless-tools/setup/ensure_interface_connection_setup | ||
4573 | 30 | _summary: The RF kill switches are listed | ||
4574 | 31 | _purpose: Check if all RF kill switches that are available on the HW are listed. | ||
4575 | 32 | _steps: | ||
4576 | 33 | 1. Execute the following command to retrieve the list of all RF kill switches: | ||
4577 | 34 | . | ||
4578 | 35 | $ /snap/bin/wireless-tools.rfkill list | ||
4579 | 36 | . | ||
4580 | 37 | _verification: | ||
4581 | 38 | Your expected RF kill switche(s) is/are shown in the output such as: | ||
4582 | 39 | <id>: <name>: <description> | ||
4583 | 40 | Soft blocked: <yes|no> | ||
4584 | 41 | Hard blocked: <yes|no> | ||
4585 | 42 | . | ||
4586 | 43 | For example: | ||
4587 | 44 | 1: phy0: Wireless LAN | ||
4588 | 45 | Soft blocked: no | ||
4589 | 46 | Hard blocked: no | ||
4590 | 47 | 2: hci0: Bluetooth | ||
4591 | 48 | Soft blocked: yes | ||
4592 | 49 | Hard blocked: no | ||
4593 | 50 | |||
4594 | 51 | id: wireless-tools/rfkill/change_state | ||
4595 | 52 | category_id:wireless-tools | ||
4596 | 53 | plugin: manual | ||
4597 | 54 | depends: wireless-tools/rfkill/list | ||
4598 | 55 | _summary: It is possible to change the state of RF kill | ||
4599 | 56 | _purpose: Check if it is possible to change a state of the RF kill switch | ||
4600 | 57 | _steps: | ||
4601 | 58 | 1. Execute the following commands first to list the available RF kill switches | ||
4602 | 59 | . | ||
4603 | 60 | $ /snap/bin/wireles-tools.rfkill list | ||
4604 | 61 | . | ||
4605 | 62 | 2. Change the state of the selected RF kill switch using the id obtained in | ||
4606 | 63 | the previous step. Note that the action: block or unblock shall be selected | ||
4607 | 64 | based on the initial state of the RF kill switch: blocked yes or no. | ||
4608 | 65 | . | ||
4609 | 66 | $ /snap/bin/wireless-tools.rfkill [un]block <id> | ||
4610 | 67 | . | ||
4611 | 68 | _verification: | ||
4612 | 69 | There shall be no output on the standard output however there shall be a | ||
4613 | 70 | change of state visible when listing the RF kill switches. | ||
4614 | 71 | . | ||
4615 | 72 | $ /snap/bin/wireless_tools.rfkill list | ||
4616 | 73 | . | ||
4617 | 74 | |||
4618 | 75 | id: wireless_tools/rfkill/capture_event | ||
4619 | 76 | category_id: wireless-tools | ||
4620 | 77 | plugin: manual | ||
4621 | 78 | depends: wireless-tools/rfkill/list | ||
4622 | 79 | _summary: It is possible to see the events related to RF kill switch(es) | ||
4623 | 80 | _purpose: Check if it is possible to capture the event notifications | ||
4624 | 81 | _steps: | ||
4625 | 82 | 1. Execute the following command to enter the capture-events mode | ||
4626 | 83 | . | ||
4627 | 84 | $ /snap/bin/wireless_tools.rfkill event | ||
4628 | 85 | . | ||
4629 | 86 | 2. Change the state of the RF kill switch using a hardware button if | ||
4630 | 87 | available. | ||
4631 | 88 | _verification: | ||
4632 | 89 | The command executed in the step 1 shall block and display the current state | ||
4633 | 90 | of the RF kill switches in a following form: | ||
4634 | 91 | <timestamp>: idx <id> type <type id> op <op id> soft <0|1> hard <0|1> | ||
4635 | 92 | Pressing the hardware RF kill switch should be printed in the following | ||
4636 | 93 | form as in the above. For example: | ||
4637 | 94 | 1478774281.491635: idx 0 type 2 op 0 soft 0 hard 0 | ||
4638 | 95 | 1478774281.491762: idx 1 type 1 op 0 soft 0 hard 0 | ||
4639 | 96 | 1478774281.491776: idx 2 type 2 op 0 soft 1 hard 0 | ||
4640 | 97 | 1478774301.905695: idx 2 type 2 op 2 soft 0 hard 0 | ||
4641 | 98 | 1478774307.837112: idx 0 type 2 op 2 soft 1 hard 0 | ||
4642 | 99 | 1478774310.817935: idx 2 type 2 op 2 soft 1 hard 0 | ||
4643 | 100 | 1478774310.818989: idx 2 type 2 op 1 soft 1 hard 0 | ||
4644 | diff --git a/com.canonical.se:engineering-tests/units/wpa-supplicant/00_general.pxu b/com.canonical.se:engineering-tests/units/wpa-supplicant/00_general.pxu | |||
4645 | 0 | new file mode 100644 | 101 | new file mode 100644 |
4646 | index 0000000..11d61b4 | |||
4647 | --- /dev/null | |||
4648 | +++ b/com.canonical.se:engineering-tests/units/wpa-supplicant/00_general.pxu | |||
4649 | @@ -0,0 +1,99 @@ | |||
4650 | 1 | # Copyright 2017 Canonical Ltd. | ||
4651 | 2 | # All rights reserved. | ||
4652 | 3 | # | ||
4653 | 4 | # Written by: | ||
4654 | 5 | # Simon Fels <simon.fels@canonical.com> | ||
4655 | 6 | |||
4656 | 7 | unit: category | ||
4657 | 8 | id: wpa_supplicant | ||
4658 | 9 | _name: wpa-supplicant | ||
4659 | 10 | |||
4660 | 11 | id: wpa_supplicant/general/can_be_installed | ||
4661 | 12 | category_id: wpa_supplicant | ||
4662 | 13 | _description: Ensure that the wpa-supplicant snap can be installed | ||
4663 | 14 | plugin: manual | ||
4664 | 15 | _steps: | ||
4665 | 16 | Install wpa-supplicant snap from the appropiate channel via the following command | ||
4666 | 17 | . | ||
4667 | 18 | $ snap install [--<channel>] wpa-supplicant | ||
4668 | 19 | . | ||
4669 | 20 | NOTE: Depending on which channel you want to test you need to select the right one. | ||
4670 | 21 | _verification: | ||
4671 | 22 | The installation of the snap should finish with no errors. | ||
4672 | 23 | |||
4673 | 24 | id: wpa_supplicant/general/slots_and_plugs_connected | ||
4674 | 25 | category_id: wpa_supplicant | ||
4675 | 26 | depends: wpa_supplicant/general/can_be_installed | ||
4676 | 27 | plugin: manual | ||
4677 | 28 | _summary: Verify that all plugs and slots of the snap are connected automatically. | ||
4678 | 29 | _steps: | ||
4679 | 30 | 1. Install the snap from the store: | ||
4680 | 31 | . | ||
4681 | 32 | $ snap wpa-supplicant | ||
4682 | 33 | . | ||
4683 | 34 | _verification: | ||
4684 | 35 | 1. Verify that the 'wpa-supplicant' snap has all required plugs and slots connected | ||
4685 | 36 | and you see a similar output like the example below. If any further plugs | ||
4686 | 37 | from other snaps are shown for the same slot this can be safely ignored. | ||
4687 | 38 | . | ||
4688 | 39 | $ snap interfaces wpa-supplicant | ||
4689 | 40 | Slot Plug | ||
4690 | 41 | :network wpa-supplicant | ||
4691 | 42 | :network-control wpa-supplicant | ||
4692 | 43 | wpa-supplicant:legacy-service - | ||
4693 | 44 | wpa-supplicant:service network-manager:wpa,wpa-supplicant:wpa | ||
4694 | 45 | |||
4695 | 46 | id: wpa_supplicant/general/service_failed_to_start_without_reboot | ||
4696 | 47 | category_id: wpa_supplicant | ||
4697 | 48 | depends: wpa_supplicant/general/can_be_installed | ||
4698 | 49 | _description: | ||
4699 | 50 | Verify that the wpa-supplicant can't be started after installation of the snap | ||
4700 | 51 | without a system reboot. | ||
4701 | 52 | plugin: manual | ||
4702 | 53 | _steps: | ||
4703 | 54 | Check service status with the following command | ||
4704 | 55 | $ systemctl status snap.wpa-supplicant.wpa.service | ||
4705 | 56 | _verification: | ||
4706 | 57 | Output should look like this: | ||
4707 | 58 | . | ||
4708 | 59 | * snap.wpa-supplicant.wpa.service - Service for snap application wpa-supplicant.wpa | ||
4709 | 60 | Loaded: loaded (/etc/systemd/system/snap.wpa-supplicant.wpa.service; enabled; vendor preset: enabled) | ||
4710 | 61 | Active: inactive (dead) (Result: exit-code) since Mon 2017-03-20 10:45:00 UTC; 5s ago | ||
4711 | 62 | Process: 2645 ExecStart=/usr/bin/snap run wpa-supplicant.wpa (code=exited, status=255) | ||
4712 | 63 | Main PID: 2645 (code=exited, status=255) | ||
4713 | 64 | |||
4714 | 65 | id: wpa_supplicant/general/service_starts_after_reboot | ||
4715 | 66 | category_id: wpa_supplicant | ||
4716 | 67 | depends: wpa_supplicant/general/service_failed_to_start_without_reboot | ||
4717 | 68 | _description: Ensure that the wpa-supplicant service is up and running | ||
4718 | 69 | plugin: manual | ||
4719 | 70 | _steps: | ||
4720 | 71 | 1. Reboot the device | ||
4721 | 72 | . | ||
4722 | 73 | $ sudo reboot | ||
4723 | 74 | . | ||
4724 | 75 | 2. When the device finished booting, check service status with the following command: | ||
4725 | 76 | . | ||
4726 | 77 | $ systemctl status snap.wpa-supplicant.wpa.service | ||
4727 | 78 | _verification: | ||
4728 | 79 | Output should look like this: | ||
4729 | 80 | . | ||
4730 | 81 | * snap.wpa-supplicant.wpa.service - Service for snap application wpa-supplicant.wpa | ||
4731 | 82 | Loaded: loaded (/etc/systemd/system/snap.wpa-supplicant.wpa.service; enabled; vendor preset: enabled) | ||
4732 | 83 | Active: active (running) since Mon 2017-03-20 08:50:29 UTC; 1h 50min ago | ||
4733 | 84 | Main PID: 1587 (wpa_supplicant) | ||
4734 | 85 | |||
4735 | 86 | id: wpa_supplicant/general/system_has_a_single_wpa_running | ||
4736 | 87 | category_id: wpa_supplicant | ||
4737 | 88 | depends: wpa_supplicant/general/service_starts_after_reboot | ||
4738 | 89 | _description: Ensure that only a single wpa-supplicant instance runs on the system. | ||
4739 | 90 | plugin: manual | ||
4740 | 91 | _steps: | ||
4741 | 92 | Check which wpa-supplicant processes are running via | ||
4742 | 93 | . | ||
4743 | 94 | $ pgrep wpa_supplicant | ||
4744 | 95 | _verification: | ||
4745 | 96 | The output should list only a single process id, e.g.: | ||
4746 | 97 | . | ||
4747 | 98 | $ pgrep wpa_supplicant | ||
4748 | 99 | 2134 | ||
4749 | diff --git a/com.canonical.se:engineering-tests/units/wpa-supplicant/10_network_manager.pxu b/com.canonical.se:engineering-tests/units/wpa-supplicant/10_network_manager.pxu | |||
4750 | 0 | new file mode 100644 | 100 | new file mode 100644 |
4751 | index 0000000..3b33e4c | |||
4752 | --- /dev/null | |||
4753 | +++ b/com.canonical.se:engineering-tests/units/wpa-supplicant/10_network_manager.pxu | |||
4754 | @@ -0,0 +1,74 @@ | |||
4755 | 1 | # Copyright 2017 Canonical Ltd. | ||
4756 | 2 | # All rights reserved. | ||
4757 | 3 | # | ||
4758 | 4 | # Written by: | ||
4759 | 5 | # Simon Fels <simon.fels@canonical.com> | ||
4760 | 6 | |||
4761 | 7 | id: wpa_supplicant/network_manager/wpa_plug_connected | ||
4762 | 8 | category_id: wpa_supplicant | ||
4763 | 9 | depends: wpa_supplicant/general/system_has_a_single_wpa_running | ||
4764 | 10 | _description: | ||
4765 | 11 | Ensure that the necessary wpa plug of the network-manager snap is connected. | ||
4766 | 12 | plugin: manual | ||
4767 | 13 | _steps: | ||
4768 | 14 | 1. Install the NetworkManager snap from the store | ||
4769 | 15 | . | ||
4770 | 16 | $ snap install network-manager | ||
4771 | 17 | . | ||
4772 | 18 | 2. List plug/slot connections for the wpa-supplicant snap | ||
4773 | 19 | . | ||
4774 | 20 | $ snap interfaces wpa-supplicant | ||
4775 | 21 | _verification: | ||
4776 | 22 | Output should look like: | ||
4777 | 23 | . | ||
4778 | 24 | Slot Plug | ||
4779 | 25 | [...] | ||
4780 | 26 | wpa-supplicant:service network-manager:wpa | ||
4781 | 27 | |||
4782 | 28 | id: wpa_supplicant/network_manager/finds_wifi_networks | ||
4783 | 29 | category_id: wpa_supplicant | ||
4784 | 30 | depends: wpa_supplicant/network_manager/wpa_plug_connected | ||
4785 | 31 | _description: | ||
4786 | 32 | Verify WiFi networks can be found by using the wpa-supplicant and | ||
4787 | 33 | network-manager snaps. | ||
4788 | 34 | plugin: manual | ||
4789 | 35 | _steps: | ||
4790 | 36 | 1. Trigger a scan for WiFi networks | ||
4791 | 37 | . | ||
4792 | 38 | $ nmcli d wifi rescan | ||
4793 | 39 | . | ||
4794 | 40 | 2. List found WiFi networks | ||
4795 | 41 | . | ||
4796 | 42 | $ nmcli d wifi | ||
4797 | 43 | _verification: | ||
4798 | 44 | The output should look similar to the following and should list available | ||
4799 | 45 | WiFi networks in your environment: | ||
4800 | 46 | . | ||
4801 | 47 | * SSID MODE CHAN RATE SIGNAL BARS SECURITY | ||
4802 | 48 | * test1 Infra 6 54 Mbit/s 85 **** WPA1 WPA2 | ||
4803 | 49 | test2 Infra 6 54 Mbit/s 45 ** WPA1 WPA2 | ||
4804 | 50 | |||
4805 | 51 | id: wpa_supplicant/network_manager/connect_secure_wifi_network | ||
4806 | 52 | category_id: wpa_supplicant | ||
4807 | 53 | depends: wpa_supplicant/network_manager/finds_wifi_networks | ||
4808 | 54 | _description: | ||
4809 | 55 | Verify connecting one of the previously found WiFi networks is possible. | ||
4810 | 56 | network-manager snaps. | ||
4811 | 57 | plugin: manual | ||
4812 | 58 | _steps: | ||
4813 | 59 | Connect one of the previously found WiFi networks via: | ||
4814 | 60 | . | ||
4815 | 61 | $ nmcli d wifi connect <SSID> password <password> | ||
4816 | 62 | . | ||
4817 | 63 | Replace <SSID> and <password> with the right values for your selected WiFi | ||
4818 | 64 | network. | ||
4819 | 65 | _verification: | ||
4820 | 66 | The nmcli command call should return with no error. Verify why running | ||
4821 | 67 | . | ||
4822 | 68 | $ echo $? | ||
4823 | 69 | 0 | ||
4824 | 70 | . | ||
4825 | 71 | Also verify that the WiFi network is connected: | ||
4826 | 72 | . | ||
4827 | 73 | $ nmcli d | grep wifi | ||
4828 | 74 | wlan0 wifi connected test1 | ||
4829 | diff --git a/snapcraft.yaml b/snapcraft.yaml | |||
4830 | index 680dca7..32a332e 100644 | |||
4831 | --- a/snapcraft.yaml | |||
4832 | +++ b/snapcraft.yaml | |||
4833 | @@ -1,3 +1,4 @@ | |||
4834 | 1 | <<<<<<< snapcraft.yaml | ||
4835 | 1 | name: easy-openvpn | 2 | name: easy-openvpn |
4836 | 2 | version: 2.3.10-2 | 3 | version: 2.3.10-2 |
4837 | 3 | summary: An easy-to-manage OpenVPN deployment. | 4 | summary: An easy-to-manage OpenVPN deployment. |
4838 | @@ -8,10 +9,22 @@ description: | | |||
4839 | 8 | It is an open source project distributed under MIT License. | 9 | It is an open source project distributed under MIT License. |
4840 | 9 | See the project homepage for more details: | 10 | See the project homepage for more details: |
4841 | 10 | https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/easy-openvpn | 11 | https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/easy-openvpn |
4842 | 12 | ======= | ||
4843 | 13 | name: canonical-se-engineering-tests | ||
4844 | 14 | summary: Canonical System Enablement Engineering Test cases | ||
4845 | 15 | description: > | ||
4846 | 16 | Various test cases the System Enablement team at Canonical | ||
4847 | 17 | executes before a snap is allowed to enter the store and | ||
4848 | 18 | be used by any user. | ||
4849 | 19 | The source code is available for reference and contribution at | ||
4850 | 20 | https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests | ||
4851 | 21 | version: 6 | ||
4852 | 22 | >>>>>>> snapcraft.yaml | ||
4853 | 11 | confinement: strict | 23 | confinement: strict |
4854 | 12 | grade: stable | 24 | grade: stable |
4855 | 13 | 25 | ||
4856 | 14 | apps: | 26 | apps: |
4857 | 27 | <<<<<<< snapcraft.yaml | ||
4858 | 15 | easy-openvpn: | 28 | easy-openvpn: |
4859 | 16 | command: bin/ovpn_run | 29 | command: bin/ovpn_run |
4860 | 17 | daemon: simple | 30 | daemon: simple |
4861 | @@ -97,3 +110,70 @@ parts: | |||
4862 | 97 | - -run-tests.sh | 110 | - -run-tests.sh |
4863 | 98 | - -spread | 111 | - -spread |
4864 | 99 | 112 | ||
4865 | 113 | ======= | ||
4866 | 114 | plainbox: | ||
4867 | 115 | command: bin/plainbox-wrapper | ||
4868 | 116 | run: | ||
4869 | 117 | command: bin/run-tests | ||
4870 | 118 | bluez: | ||
4871 | 119 | command: bin/run-bluez-tests | ||
4872 | 120 | network-manager: | ||
4873 | 121 | command: bin/run-network-manager-tests | ||
4874 | 122 | modem-manager: | ||
4875 | 123 | command: bin/run-modem-manager-tests | ||
4876 | 124 | tpm: | ||
4877 | 125 | command: bin/run-tpm-tests | ||
4878 | 126 | wifi-ap: | ||
4879 | 127 | command: bin/run-wifi-ap-tests | ||
4880 | 128 | wifi-connect: | ||
4881 | 129 | command: bin/run-wifi-connect-tests | ||
4882 | 130 | wireless-tools: | ||
4883 | 131 | command: bin/run-wireless-tools-tests | ||
4884 | 132 | pulseaudio: | ||
4885 | 133 | command: bin/run-pulseaudio-tests | ||
4886 | 134 | snapweb: | ||
4887 | 135 | command: bin/run-snapweb-tests | ||
4888 | 136 | upower: | ||
4889 | 137 | command: bin/run-upower-tests | ||
4890 | 138 | udisks2: | ||
4891 | 139 | command: bin/run-udisks2-tests | ||
4892 | 140 | alsa-utils: | ||
4893 | 141 | command: bin/run-alsa-utils-tests | ||
4894 | 142 | media-hub: | ||
4895 | 143 | command: bin/run-media-hub-tests | ||
4896 | 144 | captive-redirect: | ||
4897 | 145 | command: bin/run-captive-redirect-tests | ||
4898 | 146 | wpa-supplicant: | ||
4899 | 147 | command: bin/run-wpa-supplicant-tests | ||
4900 | 148 | serial-vault: | ||
4901 | 149 | command: bin/run-serial-vault-tests | ||
4902 | 150 | easy-openvpn: | ||
4903 | 151 | command: bin/run-easy-openvpn-tests | ||
4904 | 152 | |||
4905 | 153 | parts: | ||
4906 | 154 | common: | ||
4907 | 155 | plugin: dump | ||
4908 | 156 | source: . | ||
4909 | 157 | prime: | ||
4910 | 158 | - COPYING | ||
4911 | 159 | plainbox-local: | ||
4912 | 160 | plugin: python | ||
4913 | 161 | python-packages: | ||
4914 | 162 | - plainbox | ||
4915 | 163 | - requests-oauthlib | ||
4916 | 164 | - xlsxwriter | ||
4917 | 165 | build-packages: | ||
4918 | 166 | - libxml2-dev | ||
4919 | 167 | - libxslt1-dev | ||
4920 | 168 | - zlib1g-dev | ||
4921 | 169 | - build-essential | ||
4922 | 170 | engineering-provider: | ||
4923 | 171 | plugin: plainbox-provider | ||
4924 | 172 | source: ./com.canonical.se:engineering-tests | ||
4925 | 173 | after: [plainbox-local] | ||
4926 | 174 | launchers: | ||
4927 | 175 | plugin: dump | ||
4928 | 176 | source: . | ||
4929 | 177 | prime: | ||
4930 | 178 | - bin/ | ||
4931 | 179 | >>>>>>> snapcraft.yaml |