Merge ~morphis/snappy-hwe-snaps/+git/wifi-ap:f/support-spread-on-hw into ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-ap:master
- Git
- lp:~morphis/snappy-hwe-snaps/+git/wifi-ap
- f/support-spread-on-hw
- Merge into master
Status: | Needs review |
---|---|
Proposed branch: | ~morphis/snappy-hwe-snaps/+git/wifi-ap:f/support-spread-on-hw |
Merge into: | ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-ap:master |
Diff against target: |
594 lines (+223/-104) 23 files modified
.gitignore (+6/-0) dev/null (+0/-69) run-tests.sh (+8/-7) spread.yaml (+18/-0) tests/lib/prepare-all.sh (+15/-2) tests/lib/prepare.sh (+26/-24) tests/lib/restore-all.sh (+9/-0) tests/lib/restore-each.sh (+7/-0) tests/main/background-process-control/task.yaml (+4/-1) tests/main/conf-wizard-auto-at-boot/task.yaml (+3/-0) tests/main/conf-wizard-auto-can-be-blocked/task.yaml (+3/-0) tests/main/conf-wizard-auto-nodefaultip/task.yaml (+3/-0) tests/main/conf-wizard-auto-noip/task.yaml (+3/-0) tests/main/conf-wizard-auto-nowifi/task.yaml (+3/-0) tests/main/conf-wizard-auto/task.yaml (+3/-0) tests/main/conf-wizard-disabled-from-gadget/task.yaml (+3/-0) tests/main/configuration-changes/task.yaml (+3/-0) tests/main/default-conf-brings-up-ap/task.yaml (+3/-0) tests/main/default-configuration/tasks.yaml (+3/-0) tests/main/documentation-builds/task.yaml (+6/-0) tests/main/socket-plug/task.yaml (+3/-0) tests/main/stress-ap/task.yaml (+88/-0) tests/main/utf8-ssid/task.yaml (+3/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matteo Croce (community) | Approve | ||
System Enablement Bot | continuous-integration | Needs Fixing | |
Review via email: mp+319046@code.launchpad.net |
Commit message
Description of the change
Allow running our stress test on real hardware
This is based on recent changes to tests-extras which allow us now executing all white-listed tests via something like this:
$ ./run-tests.sh \
--spread-
--external-
--external-
--external-
--spread-
--debug
This relies on having a second WiFi network device available on the specified external system. Name of network device can be specified via the two parameters in spread.yaml
- 71e58bc... by Simon Fels
-
Respect review comments
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2a530d35ad8
https:/
Executed test runs:
FAILURE: https:/
None: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:71e58bce565
https:/
Executed test runs:
FAILURE: https:/
None: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
System Enablement Bot (system-enablement-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:71e58bce565
https:/
Executed test runs:
FAILURE: https:/
None: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unmerged commits
- 71e58bc... by Simon Fels
-
Respect review comments
- c036235... by Simon Fels
-
Add .gitignore file
- 1b7bc1c... by Simon Fels
-
Allow running our stress test on real hardware
Preview Diff
1 | diff --git a/.gitignore b/.gitignore | |||
2 | 0 | new file mode 100644 | 0 | new file mode 100644 |
3 | index 0000000..2aaa3a0 | |||
4 | --- /dev/null | |||
5 | +++ b/.gitignore | |||
6 | @@ -0,0 +1,6 @@ | |||
7 | 1 | parts | ||
8 | 2 | stage | ||
9 | 3 | prime | ||
10 | 4 | |||
11 | 5 | .spread* | ||
12 | 6 | .tests-extras | ||
13 | diff --git a/run-tests.sh b/run-tests.sh | |||
14 | index 0b0679d..54f23f7 100755 | |||
15 | --- a/run-tests.sh | |||
16 | +++ b/run-tests.sh | |||
17 | @@ -32,12 +32,12 @@ tests-extras repository and execute the run-tests.sh script from | |||
18 | 32 | there passing arguments as-is. | 32 | there passing arguments as-is. |
19 | 33 | 33 | ||
20 | 34 | optional arguments: | 34 | optional arguments: |
27 | 35 | --help Show this help message and exit | 35 | --help Show this help message and exit |
28 | 36 | --channel Select another channel to build the base image from (default: stable) | 36 | --channel=<channel> Select another channel to build the base image from (default: $channel) |
29 | 37 | --snap Extra snap to install | 37 | --snap=<name> Extra snap to install |
30 | 38 | --debug Enable verbose debugging output | 38 | --debug Enable verbose debugging output |
31 | 39 | --test-from-channel Pull network-manager snap from the specified channel instead of building it from source | 39 | --test-from-channel=<channel> Pull snap from the specified channel instead of building it from source |
32 | 40 | --force-new-image Force generating a new image used for testing | 40 | --force-new-image Force generating a new image used for testing |
33 | 41 | EOF | 41 | EOF |
34 | 42 | } | 42 | } |
35 | 43 | 43 | ||
36 | @@ -67,7 +67,7 @@ restore_and_update_tests_extras() { | |||
37 | 67 | # hidden directory which is re-used since then. | 67 | # hidden directory which is re-used since then. |
38 | 68 | 68 | ||
39 | 69 | # Display help w/o fetching anything and exit | 69 | # Display help w/o fetching anything and exit |
41 | 70 | [ "$1" = "--help" ] && show_help | 70 | [ ! -d "$TESTS_EXTRAS_PATH" ] && [ "$1" = "--help" ] && show_help |
42 | 71 | 71 | ||
43 | 72 | if [ -d "$TESTS_EXTRAS_PATH" ]; then | 72 | if [ -d "$TESTS_EXTRAS_PATH" ]; then |
44 | 73 | restore_and_update_tests_extras | 73 | restore_and_update_tests_extras |
45 | @@ -75,5 +75,6 @@ else | |||
46 | 75 | clone_tests_extras | 75 | clone_tests_extras |
47 | 76 | fi | 76 | fi |
48 | 77 | 77 | ||
49 | 78 | |||
50 | 78 | echo "INFO: Executing tests runner" | 79 | echo "INFO: Executing tests runner" |
51 | 79 | cd $TESTS_EXTRAS_PATH && ./tests-runner.sh "$@" | 80 | cd $TESTS_EXTRAS_PATH && ./tests-runner.sh "$@" |
52 | diff --git a/spread.yaml b/spread.yaml | |||
53 | index 4bea33a..9a2c2f3 100644 | |||
54 | --- a/spread.yaml | |||
55 | +++ b/spread.yaml | |||
56 | @@ -22,6 +22,10 @@ environment: | |||
57 | 22 | SNAP_NAME: wifi-ap | 22 | SNAP_NAME: wifi-ap |
58 | 23 | # Allow the host to pass the channel to use for the test rim | 23 | # Allow the host to pass the channel to use for the test rim |
59 | 24 | SNAP_CHANNEL: $(HOST:echo $SNAP_CHANNEL) | 24 | SNAP_CHANNEL: $(HOST:echo $SNAP_CHANNEL) |
60 | 25 | # Set these to different names when you run the tests on hardware where | ||
61 | 26 | # you need to use different interfaces. | ||
62 | 27 | HW_WLAN0_NAME: wlan0 | ||
63 | 28 | HW_WLAN1_NAME: wlan1 | ||
64 | 25 | 29 | ||
65 | 26 | backends: | 30 | backends: |
66 | 27 | qemu: | 31 | qemu: |
67 | @@ -29,6 +33,16 @@ backends: | |||
68 | 29 | - ubuntu-core-16: | 33 | - ubuntu-core-16: |
69 | 30 | username: test | 34 | username: test |
70 | 31 | password: test | 35 | password: test |
71 | 36 | external: | ||
72 | 37 | type: adhoc | ||
73 | 38 | environment: | ||
74 | 39 | SPREAD_EXTERNAL_ADDRESS: "$(HOST: echo ${SPREAD_EXTERNAL_ADDRESS:-localhost:8022})" | ||
75 | 40 | allocate: | | ||
76 | 41 | ADDRESS $SPREAD_EXTERNAL_ADDRESS | ||
77 | 42 | systems: | ||
78 | 43 | - hw-ubuntu-core-16: | ||
79 | 44 | username: $(HOST:echo $SPREAD_EXTERNAL_USER) | ||
80 | 45 | password: $(HOST:echo $SPREAD_EXTERNAL_PASSWORD) | ||
81 | 32 | 46 | ||
82 | 33 | # Put this somewhere where we have read-write access | 47 | # Put this somewhere where we have read-write access |
83 | 34 | path: /home/wifi-ap | 48 | path: /home/wifi-ap |
84 | @@ -39,6 +53,9 @@ exclude: | |||
85 | 39 | prepare: | | 53 | prepare: | |
86 | 40 | . $TESTSLIB/prepare-all.sh | 54 | . $TESTSLIB/prepare-all.sh |
87 | 41 | 55 | ||
88 | 56 | restore: | | ||
89 | 57 | . $TESTSLIB/restore-all.sh | ||
90 | 58 | |||
91 | 42 | prepare-each: | | 59 | prepare-each: | |
92 | 43 | # Cleanup logs so we can just dump what has happened in the debug-each | 60 | # Cleanup logs so we can just dump what has happened in the debug-each |
93 | 44 | # step below after a test case ran. | 61 | # step below after a test case ran. |
94 | @@ -58,6 +75,7 @@ suites: | |||
95 | 58 | summary: Full-system tests for the wifi-ap snap | 75 | summary: Full-system tests for the wifi-ap snap |
96 | 59 | systems: | 76 | systems: |
97 | 60 | - ubuntu-core-16 | 77 | - ubuntu-core-16 |
98 | 78 | - hw-ubuntu-core-16 | ||
99 | 61 | prepare: | | 79 | prepare: | |
100 | 62 | . $TESTSLIB/prepare.sh | 80 | . $TESTSLIB/prepare.sh |
101 | 63 | restore-each: | | 81 | restore-each: | |
102 | diff --git a/tests/lib/prepare-all.sh b/tests/lib/prepare-all.sh | |||
103 | index 38380e2..49be914 100644 | |||
104 | --- a/tests/lib/prepare-all.sh | |||
105 | +++ b/tests/lib/prepare-all.sh | |||
106 | @@ -1,7 +1,20 @@ | |||
107 | 1 | #!/bin/bash | 1 | #!/bin/bash |
108 | 2 | 2 | ||
111 | 3 | # Simulate two WiFi radio network interfaces | 3 | if [ "$SPREAD_SYSTEM" = "ubuntu-core-16" ]; then |
112 | 4 | modprobe mac80211_hwsim radios=2 | 4 | # Simulate two WiFi radio network interfaces |
113 | 5 | modprobe mac80211_hwsim radios=2 | ||
114 | 6 | elif [ "$SPREAD_SYSTEM" = "hw-ubuntu-core-16" ]; then | ||
115 | 7 | if ! snap list | grep -q wifi-ap; then | ||
116 | 8 | echo "ERROR: wifi-ap snap is not installed. You need to manually install" | ||
117 | 9 | echo " the version you want to test." | ||
118 | 10 | exit 1 | ||
119 | 11 | fi | ||
120 | 12 | systemctl stop snap.wifi-ap.management-service | ||
121 | 13 | tar czf $SPREAD_PATH/wifi-ap-state.tar.gz /var/snap/wifi-ap/current /var/snap/wifi-ap/common | ||
122 | 14 | rm -rf /var/snap/wifi-ap/current/* /var/snap/wifi-ap/common/* | ||
123 | 15 | systemctl start snap.wifi-ap.management-service | ||
124 | 16 | exit 0 | ||
125 | 17 | fi | ||
126 | 5 | 18 | ||
127 | 6 | # We don't have to build a snap when we should use one from a | 19 | # We don't have to build a snap when we should use one from a |
128 | 7 | # channel | 20 | # channel |
129 | diff --git a/tests/lib/prepare.sh b/tests/lib/prepare.sh | |||
130 | index d4b7020..19e6b83 100644 | |||
131 | --- a/tests/lib/prepare.sh | |||
132 | +++ b/tests/lib/prepare.sh | |||
133 | @@ -2,34 +2,36 @@ | |||
134 | 2 | 2 | ||
135 | 3 | . $TESTSLIB/utilities.sh | 3 | . $TESTSLIB/utilities.sh |
136 | 4 | 4 | ||
143 | 5 | echo "Wait for firstboot change to be ready" | 5 | if [ "$SPREAD_SYSTEM" = "ubuntu-core-16" ]; then |
144 | 6 | while ! snap changes | grep -q "Done"; do | 6 | echo "Wait for firstboot change to be ready" |
145 | 7 | snap changes || true | 7 | while ! snap changes | grep -q "Done"; do |
146 | 8 | snap change 1 || true | 8 | snap changes || true |
147 | 9 | sleep 1 | 9 | snap change 1 || true |
148 | 10 | done | 10 | sleep 1 |
149 | 11 | done | ||
150 | 11 | 12 | ||
161 | 12 | echo "Ensure fundamental snaps are still present" | 13 | echo "Ensure fundamental snaps are still present" |
162 | 13 | . $TESTSLIB/snap-names.sh | 14 | . $TESTSLIB/snap-names.sh |
163 | 14 | for name in $gadget_name $kernel_name $core_name; do | 15 | for name in $gadget_name $kernel_name $core_name; do |
164 | 15 | if ! snap list | grep -q $name ; then | 16 | if ! snap list | grep -q $name ; then |
165 | 16 | echo "Not all fundamental snaps are available, all-snap image not valid" | 17 | echo "Not all fundamental snaps are available, all-snap image not valid" |
166 | 17 | echo "Currently installed snaps:" | 18 | echo "Currently installed snaps:" |
167 | 18 | snap list | 19 | snap list |
168 | 19 | exit 1 | 20 | exit 1 |
169 | 20 | fi | 21 | fi |
170 | 21 | done | 22 | done |
171 | 22 | 23 | ||
174 | 23 | echo "Kernel has a store revision" | 24 | echo "Kernel has a store revision" |
175 | 24 | snap list | grep ^${kernel_name} | grep -E " [0-9]+\s+canonical" | 25 | snap list | grep ^${kernel_name} | grep -E " [0-9]+\s+canonical" |
176 | 25 | 26 | ||
178 | 26 | install_snap_under_test | 27 | install_snap_under_test |
179 | 27 | 28 | ||
185 | 28 | # Snapshot of the current snapd state for a later restore | 29 | # Snapshot of the current snapd state for a later restore |
186 | 29 | if [ ! -f $SPREAD_PATH/snapd-state.tar.gz ] ; then | 30 | if [ ! -f $SPREAD_PATH/snapd-state.tar.gz ] ; then |
187 | 30 | systemctl stop snapd.service snapd.socket | 31 | systemctl stop snapd.service snapd.socket |
188 | 31 | tar czf $SPREAD_PATH/snapd-state.tar.gz /var/lib/snapd /etc/netplan | 32 | tar czf $SPREAD_PATH/snapd-state.tar.gz /var/lib/snapd /etc/netplan |
189 | 32 | systemctl start snapd.socket | 33 | systemctl start snapd.socket |
190 | 34 | fi | ||
191 | 33 | fi | 35 | fi |
192 | 34 | 36 | ||
193 | 35 | # For debugging dump all snaps and connected slots/plugs | 37 | # For debugging dump all snaps and connected slots/plugs |
194 | diff --git a/tests/lib/restore-all.sh b/tests/lib/restore-all.sh | |||
195 | 36 | new file mode 100644 | 38 | new file mode 100644 |
196 | index 0000000..5c371ef | |||
197 | --- /dev/null | |||
198 | +++ b/tests/lib/restore-all.sh | |||
199 | @@ -0,0 +1,9 @@ | |||
200 | 1 | #!/bin/bash | ||
201 | 2 | |||
202 | 3 | if [ "$SPREAD_SYSTEM" = "hw-ubuntu-core-16" ]; then | ||
203 | 4 | if [ -e $SPREAD_PATH/wifi-ap-state.tar.gz ]; then | ||
204 | 5 | systemctl stop snap.wifi-ap.management-service || true | ||
205 | 6 | tar xzf $SPREAD_PATH/wifi-ap-state.tar.gz -C / | ||
206 | 7 | systemctl start snap.wifi-ap.management-service | ||
207 | 8 | fi | ||
208 | 9 | fi | ||
209 | diff --git a/tests/lib/restore-each.sh b/tests/lib/restore-each.sh | |||
210 | index fa474b4..324b4d6 100644 | |||
211 | --- a/tests/lib/restore-each.sh | |||
212 | +++ b/tests/lib/restore-each.sh | |||
213 | @@ -3,6 +3,13 @@ | |||
214 | 3 | . $TESTSLIB/snap-names.sh | 3 | . $TESTSLIB/snap-names.sh |
215 | 4 | . $TESTSLIB/utilities.sh | 4 | . $TESTSLIB/utilities.sh |
216 | 5 | 5 | ||
217 | 6 | if [ "$SPREAD_SYSTEM" = "hw-ubuntu-core-16" ]; then | ||
218 | 7 | systemctl stop snap.wifi-ap.management-service || true | ||
219 | 8 | rm -rf /var/snap/wifi-ap/current/* /var/snap/wifi-ap/common/* | ||
220 | 9 | systemctl start snap.wifi-ap.management-service | ||
221 | 10 | exit 0 | ||
222 | 11 | fi | ||
223 | 12 | |||
224 | 6 | # Remove all snaps not being the core, gadget, kernel or snap we're testing | 13 | # Remove all snaps not being the core, gadget, kernel or snap we're testing |
225 | 7 | for snap in /snap/*; do | 14 | for snap in /snap/*; do |
226 | 8 | snap="${snap:6}" | 15 | snap="${snap:6}" |
227 | diff --git a/tests/main/background-process-control/task.yaml b/tests/main/background-process-control/task.yaml | |||
228 | index 58dd047..070aadf 100644 | |||
229 | --- a/tests/main/background-process-control/task.yaml | |||
230 | +++ b/tests/main/background-process-control/task.yaml | |||
231 | @@ -1,5 +1,8 @@ | |||
232 | 1 | summary: Test correct service behavior to ensure the background AP process is running | 1 | summary: Test correct service behavior to ensure the background AP process is running |
233 | 2 | 2 | ||
234 | 3 | systems: | ||
235 | 4 | - -hw-ubuntu-core-16 | ||
236 | 5 | |||
237 | 3 | prepare: | | 6 | prepare: | |
238 | 4 | # We need some tools for scanning etc. | 7 | # We need some tools for scanning etc. |
239 | 5 | snap install wireless-tools | 8 | snap install wireless-tools |
240 | @@ -24,7 +27,7 @@ execute: | | |||
241 | 24 | 27 | ||
242 | 25 | # Restart should get us back into the same state we were in before | 28 | # Restart should get us back into the same state we were in before |
243 | 26 | /snap/bin/wifi-ap.status restart-ap | 29 | /snap/bin/wifi-ap.status restart-ap |
245 | 27 | # Restart needs some time | 30 | # Restart needs some time |
246 | 28 | sleep 5 | 31 | sleep 5 |
247 | 29 | /snap/bin/wifi-ap.status | grep "ap.active: true" | 32 | /snap/bin/wifi-ap.status | grep "ap.active: true" |
248 | 30 | /snap/bin/wireless-tools.iw dev wlan1 scan | grep 'SSID: Ubuntu' | 33 | /snap/bin/wireless-tools.iw dev wlan1 scan | grep 'SSID: Ubuntu' |
249 | diff --git a/tests/main/conf-wizard-auto-at-boot/task.yaml b/tests/main/conf-wizard-auto-at-boot/task.yaml | |||
250 | index b042097..01d8ddb 100644 | |||
251 | --- a/tests/main/conf-wizard-auto-at-boot/task.yaml | |||
252 | +++ b/tests/main/conf-wizard-auto-at-boot/task.yaml | |||
253 | @@ -1,5 +1,8 @@ | |||
254 | 1 | summary: Verify that the automatic wizard works | 1 | summary: Verify that the automatic wizard works |
255 | 2 | 2 | ||
256 | 3 | systems: | ||
257 | 4 | - -hw-ubuntu-core-16 | ||
258 | 5 | |||
259 | 3 | execute: | | 6 | execute: | |
260 | 4 | # Check that we get good default values | 7 | # Check that we get good default values |
261 | 5 | test "$(/snap/bin/wifi-ap.config get disabled)" = false | 8 | test "$(/snap/bin/wifi-ap.config get disabled)" = false |
262 | diff --git a/tests/main/conf-wizard-auto-can-be-blocked/task.yaml b/tests/main/conf-wizard-auto-can-be-blocked/task.yaml | |||
263 | index ecacd6f..4f921a0 100644 | |||
264 | --- a/tests/main/conf-wizard-auto-can-be-blocked/task.yaml | |||
265 | +++ b/tests/main/conf-wizard-auto-can-be-blocked/task.yaml | |||
266 | @@ -1,5 +1,8 @@ | |||
267 | 1 | summary: Verify the automatic wizard running on service startup can be blocked with a configuration option | 1 | summary: Verify the automatic wizard running on service startup can be blocked with a configuration option |
268 | 2 | 2 | ||
269 | 3 | systems: | ||
270 | 4 | - -hw-ubuntu-core-16 | ||
271 | 5 | |||
272 | 3 | environment: | 6 | environment: |
273 | 4 | SNAP_COMMON: /var/snap/wifi-ap/common | 7 | SNAP_COMMON: /var/snap/wifi-ap/common |
274 | 5 | SNAP_DATA: /var/snap/wifi-ap/current | 8 | SNAP_DATA: /var/snap/wifi-ap/current |
275 | diff --git a/tests/main/conf-wizard-auto-nodefaultip/task.yaml b/tests/main/conf-wizard-auto-nodefaultip/task.yaml | |||
276 | index 8be2f75..81c168c 100644 | |||
277 | --- a/tests/main/conf-wizard-auto-nodefaultip/task.yaml | |||
278 | +++ b/tests/main/conf-wizard-auto-nodefaultip/task.yaml | |||
279 | @@ -1,5 +1,8 @@ | |||
280 | 1 | summary: Verify that the wizard is able to find an unused IP | 1 | summary: Verify that the wizard is able to find an unused IP |
281 | 2 | 2 | ||
282 | 3 | systems: | ||
283 | 4 | - -hw-ubuntu-core-16 | ||
284 | 5 | |||
285 | 3 | prepare: | | 6 | prepare: | |
286 | 4 | # Dummy interface to assign an IP to | 7 | # Dummy interface to assign an IP to |
287 | 5 | modprobe dummy | 8 | modprobe dummy |
288 | diff --git a/tests/main/conf-wizard-auto-noip/task.yaml b/tests/main/conf-wizard-auto-noip/task.yaml | |||
289 | index 10822e1..e557c19 100644 | |||
290 | --- a/tests/main/conf-wizard-auto-noip/task.yaml | |||
291 | +++ b/tests/main/conf-wizard-auto-noip/task.yaml | |||
292 | @@ -1,5 +1,8 @@ | |||
293 | 1 | summary: Verify that wizard fails when all private subnets are busy | 1 | summary: Verify that wizard fails when all private subnets are busy |
294 | 2 | 2 | ||
295 | 3 | systems: | ||
296 | 4 | - -hw-ubuntu-core-16 | ||
297 | 5 | |||
298 | 3 | prepare: | | 6 | prepare: | |
299 | 4 | # Dummy interface to assign an IP to | 7 | # Dummy interface to assign an IP to |
300 | 5 | modprobe dummy | 8 | modprobe dummy |
301 | diff --git a/tests/main/conf-wizard-auto-nowifi/task.yaml b/tests/main/conf-wizard-auto-nowifi/task.yaml | |||
302 | index ce89798..71e0190 100644 | |||
303 | --- a/tests/main/conf-wizard-auto-nowifi/task.yaml | |||
304 | +++ b/tests/main/conf-wizard-auto-nowifi/task.yaml | |||
305 | @@ -1,5 +1,8 @@ | |||
306 | 1 | summary: Verify that wizard fails when there are no WiFi devices | 1 | summary: Verify that wizard fails when there are no WiFi devices |
307 | 2 | 2 | ||
308 | 3 | systems: | ||
309 | 4 | - -hw-ubuntu-core-16 | ||
310 | 5 | |||
311 | 3 | prepare: | | 6 | prepare: | |
312 | 4 | rmmod mac80211_hwsim | 7 | rmmod mac80211_hwsim |
313 | 5 | 8 | ||
314 | diff --git a/tests/main/conf-wizard-auto/task.yaml b/tests/main/conf-wizard-auto/task.yaml | |||
315 | index ae6219c..0b1f8cf 100644 | |||
316 | --- a/tests/main/conf-wizard-auto/task.yaml | |||
317 | +++ b/tests/main/conf-wizard-auto/task.yaml | |||
318 | @@ -1,5 +1,8 @@ | |||
319 | 1 | summary: Verify that the automatic wizard works | 1 | summary: Verify that the automatic wizard works |
320 | 2 | 2 | ||
321 | 3 | systems: | ||
322 | 4 | - -hw-ubuntu-core-16 | ||
323 | 5 | |||
324 | 3 | execute: | | 6 | execute: | |
325 | 4 | # The automatic wizard was already started | 7 | # The automatic wizard was already started |
326 | 5 | 8 | ||
327 | diff --git a/tests/main/conf-wizard-disabled-from-gadget/task.yaml b/tests/main/conf-wizard-disabled-from-gadget/task.yaml | |||
328 | index 227ecfb..caf7f84 100644 | |||
329 | --- a/tests/main/conf-wizard-disabled-from-gadget/task.yaml | |||
330 | +++ b/tests/main/conf-wizard-disabled-from-gadget/task.yaml | |||
331 | @@ -1,5 +1,8 @@ | |||
332 | 1 | summary: Verify the wizard can be disabled by default from a gadget snap | 1 | summary: Verify the wizard can be disabled by default from a gadget snap |
333 | 2 | 2 | ||
334 | 3 | systems: | ||
335 | 4 | - -hw-ubuntu-core-16 | ||
336 | 5 | |||
337 | 3 | # FIXME: This test needs to stay manual until a snap is in edge which | 6 | # FIXME: This test needs to stay manual until a snap is in edge which |
338 | 4 | # contains a configure hook. Otherwise the snap installation will | 7 | # contains a configure hook. Otherwise the snap installation will |
339 | 5 | # always fail. | 8 | # always fail. |
340 | diff --git a/tests/main/configuration-changes/task.yaml b/tests/main/configuration-changes/task.yaml | |||
341 | index 1800102..056580e 100644 | |||
342 | --- a/tests/main/configuration-changes/task.yaml | |||
343 | +++ b/tests/main/configuration-changes/task.yaml | |||
344 | @@ -1,5 +1,8 @@ | |||
345 | 1 | summary: Test that we can change the configuration | 1 | summary: Test that we can change the configuration |
346 | 2 | 2 | ||
347 | 3 | systems: | ||
348 | 4 | - -hw-ubuntu-core-16 | ||
349 | 5 | |||
350 | 3 | execute: | | 6 | execute: | |
351 | 4 | test "`/snap/bin/wifi-ap.config get wifi.interface`" = wlan0 | 7 | test "`/snap/bin/wifi-ap.config get wifi.interface`" = wlan0 |
352 | 5 | /snap/bin/wifi-ap.config set wifi.interface=wlan1 | 8 | /snap/bin/wifi-ap.config set wifi.interface=wlan1 |
353 | diff --git a/tests/main/default-conf-brings-up-ap/task.yaml b/tests/main/default-conf-brings-up-ap/task.yaml | |||
354 | index 6777c8d..b57850e 100644 | |||
355 | --- a/tests/main/default-conf-brings-up-ap/task.yaml | |||
356 | +++ b/tests/main/default-conf-brings-up-ap/task.yaml | |||
357 | @@ -1,5 +1,8 @@ | |||
358 | 1 | summary: Verify that the default configuration is able to spawn up an AP | 1 | summary: Verify that the default configuration is able to spawn up an AP |
359 | 2 | 2 | ||
360 | 3 | systems: | ||
361 | 4 | - -hw-ubuntu-core-16 | ||
362 | 5 | |||
363 | 3 | execute: | | 6 | execute: | |
364 | 4 | . $TESTSLIB/utilities.sh | 7 | . $TESTSLIB/utilities.sh |
365 | 5 | 8 | ||
366 | diff --git a/tests/main/default-configuration/tasks.yaml b/tests/main/default-configuration/tasks.yaml | |||
367 | index d6c1cba..67f9cb4 100644 | |||
368 | --- a/tests/main/default-configuration/tasks.yaml | |||
369 | +++ b/tests/main/default-configuration/tasks.yaml | |||
370 | @@ -1,5 +1,8 @@ | |||
371 | 1 | summary: Verify snap has correct default configuration | 1 | summary: Verify snap has correct default configuration |
372 | 2 | 2 | ||
373 | 3 | systems: | ||
374 | 4 | - -hw-ubuntu-core-16 | ||
375 | 5 | |||
376 | 3 | execute: | | 6 | execute: | |
377 | 4 | test `/snap/bin/wifi-ap.config get debug` = false | 7 | test `/snap/bin/wifi-ap.config get debug` = false |
378 | 5 | test `/snap/bin/wifi-ap.config get disabled` = true | 8 | test `/snap/bin/wifi-ap.config get disabled` = true |
379 | diff --git a/tests/main/documentation-builds/task.yaml b/tests/main/documentation-builds/task.yaml | |||
380 | index e746465..8780a98 100644 | |||
381 | --- a/tests/main/documentation-builds/task.yaml | |||
382 | +++ b/tests/main/documentation-builds/task.yaml | |||
383 | @@ -1,5 +1,11 @@ | |||
384 | 1 | summary: Verify the project documentation is building without errors | 1 | summary: Verify the project documentation is building without errors |
385 | 2 | 2 | ||
386 | 3 | systems: | ||
387 | 4 | - -hw-ubuntu-core-16 | ||
388 | 5 | |||
389 | 6 | systems: | ||
390 | 7 | - -hw-ubuntu-core-16 | ||
391 | 8 | |||
392 | 3 | execute: | | 9 | execute: | |
393 | 4 | # Need to install in devmode as otherwise the snap can't access our project | 10 | # Need to install in devmode as otherwise the snap can't access our project |
394 | 5 | # home which is outside of the home directory of our current user. | 11 | # home which is outside of the home directory of our current user. |
395 | diff --git a/tests/main/socket-plug/task.yaml b/tests/main/socket-plug/task.yaml | |||
396 | index 8306aaf..e18d0db 100644 | |||
397 | --- a/tests/main/socket-plug/task.yaml | |||
398 | +++ b/tests/main/socket-plug/task.yaml | |||
399 | @@ -1,5 +1,8 @@ | |||
400 | 1 | summary: Verify that the exported content interface does work | 1 | summary: Verify that the exported content interface does work |
401 | 2 | 2 | ||
402 | 3 | systems: | ||
403 | 4 | - -hw-ubuntu-core-16 | ||
404 | 5 | |||
405 | 3 | execute: | | 6 | execute: | |
406 | 4 | # The automatic wizard was already started | 7 | # The automatic wizard was already started |
407 | 5 | 8 | ||
408 | diff --git a/tests/main/stress-ap-status-control/task.yaml b/tests/main/stress-ap-status-control/task.yaml | |||
409 | 6 | deleted file mode 100644 | 9 | deleted file mode 100644 |
410 | index 89ded92..0000000 | |||
411 | --- a/tests/main/stress-ap-status-control/task.yaml | |||
412 | +++ /dev/null | |||
413 | @@ -1,69 +0,0 @@ | |||
414 | 1 | summary: Stress test for the AP status control API | ||
415 | 2 | |||
416 | 3 | environment: | ||
417 | 4 | RESTART_ITERATIONS: 15 | ||
418 | 5 | SCAN_ITERATIONS: 10 | ||
419 | 6 | |||
420 | 7 | prepare: | | ||
421 | 8 | # We need some tools for scanning etc. | ||
422 | 9 | snap install wireless-tools | ||
423 | 10 | snap connect wireless-tools:network-control core | ||
424 | 11 | |||
425 | 12 | execute: | | ||
426 | 13 | # Bring up the access point first | ||
427 | 14 | /snap/bin/wifi-ap.config set disabled=false | ||
428 | 15 | until /snap/bin/wifi-ap.status | grep "ap.active: true" ; do | ||
429 | 16 | sleep 0.5 | ||
430 | 17 | done | ||
431 | 18 | |||
432 | 19 | # Scan for networks on the other side of the WiFi network | ||
433 | 20 | # and ensure the network is available. | ||
434 | 21 | ifconfig wlan1 up | ||
435 | 22 | n=0 | ||
436 | 23 | found_ap=0 | ||
437 | 24 | while [ $n -lt $SCAN_ITERATIONS ] ; do | ||
438 | 25 | if /snap/bin/wireless-tools.iw dev wlan1 scan | grep 'SSID: Ubuntu'; then | ||
439 | 26 | found_ap=1 | ||
440 | 27 | break | ||
441 | 28 | fi | ||
442 | 29 | sleep 0.5 | ||
443 | 30 | let n=n+1 | ||
444 | 31 | done | ||
445 | 32 | test $found_ap -eq 1 | ||
446 | 33 | |||
447 | 34 | # We will restart the AP a huge number of times again and again | ||
448 | 35 | # and expect that the AP afterwards comes back up normally and | ||
449 | 36 | # we can still search and connect to it. | ||
450 | 37 | n=0 | ||
451 | 38 | while [ $n -lt $RESTART_ITERATIONS ] ; do | ||
452 | 39 | /snap/bin/wifi-ap.status restart-ap | ||
453 | 40 | sleep 0.5 | ||
454 | 41 | let n=n+1 | ||
455 | 42 | done | ||
456 | 43 | |||
457 | 44 | # Wait for AP to be marked as active again | ||
458 | 45 | until /snap/bin/wifi-ap.status | fgrep "ap.active: true" ; do | ||
459 | 46 | sleep 0.5 | ||
460 | 47 | done | ||
461 | 48 | |||
462 | 49 | # The AP should be still available in our scan result | ||
463 | 50 | n=0 | ||
464 | 51 | found_ap=0 | ||
465 | 52 | while [ $n -lt $SCAN_ITERATIONS ] ; do | ||
466 | 53 | if /snap/bin/wireless-tools.iw dev wlan1 scan | grep 'SSID: Ubuntu'; then | ||
467 | 54 | found_ap=1 | ||
468 | 55 | break | ||
469 | 56 | fi | ||
470 | 57 | sleep 0.5 | ||
471 | 58 | let n=n+1 | ||
472 | 59 | done | ||
473 | 60 | test $found_ap -eq 1 | ||
474 | 61 | |||
475 | 62 | # Verify we can associate with the AP | ||
476 | 63 | sudo /snap/bin/wireless-tools.iw wlan1 connect Ubuntu | ||
477 | 64 | sudo /snap/bin/wireless-tools.iw dev wlan1 link | grep 'SSID: Ubuntu' | ||
478 | 65 | |||
479 | 66 | # We should only have one hostapd and one dnsmasq process at this time | ||
480 | 67 | # (we have to ignore the grep'ing process as otherwise we get a count of 2) | ||
481 | 68 | test `pgrep -c hostapd` -eq 1 | ||
482 | 69 | test `pgrep -c dnsmasq` -eq 1 | ||
483 | diff --git a/tests/main/stress-ap/task.yaml b/tests/main/stress-ap/task.yaml | |||
484 | 70 | new file mode 100644 | 0 | new file mode 100644 |
485 | index 0000000..4b667b8 | |||
486 | --- /dev/null | |||
487 | +++ b/tests/main/stress-ap/task.yaml | |||
488 | @@ -0,0 +1,88 @@ | |||
489 | 1 | summary: Stress test for the WiFi AP | ||
490 | 2 | |||
491 | 3 | environment: | ||
492 | 4 | RESTART_ITERATIONS: 30 | ||
493 | 5 | SCAN_ITERATIONS: 15 | ||
494 | 6 | AP_NAME: "StressUbuntuAP" | ||
495 | 7 | |||
496 | 8 | prepare: | | ||
497 | 9 | # We need some tools for scanning etc. | ||
498 | 10 | snap install wireless-tools | ||
499 | 11 | snap connect wireless-tools:network-control core | ||
500 | 12 | |||
501 | 13 | execute: | | ||
502 | 14 | # Bring up the access point first | ||
503 | 15 | /snap/bin/wifi-ap.config set \ | ||
504 | 16 | wifi.interface=$HW_WLAN0_NAME \ | ||
505 | 17 | wifi.ssid=$AP_NAME \ | ||
506 | 18 | disabled=false | ||
507 | 19 | |||
508 | 20 | until /snap/bin/wifi-ap.status | grep "ap.active: true" ; do | ||
509 | 21 | sleep 0.5 | ||
510 | 22 | done | ||
511 | 23 | |||
512 | 24 | scan_command() { | ||
513 | 25 | if [ -e /snap/bin/nmcli ]; then | ||
514 | 26 | /snap/bin/nmcli d wifi rescan | ||
515 | 27 | /snap/bin/nmcli d wifi list ifname $1 | ||
516 | 28 | return | ||
517 | 29 | fi | ||
518 | 30 | /snap/bin/wireless-tools.iw dev $1 scan | ||
519 | 31 | } | ||
520 | 32 | |||
521 | 33 | # Scan for networks on the other side of the WiFi network | ||
522 | 34 | # and ensure the network is available. | ||
523 | 35 | ifconfig $HW_WLAN1_NAME up | ||
524 | 36 | n=0 | ||
525 | 37 | found_ap=0 | ||
526 | 38 | while [ $n -lt $SCAN_ITERATIONS ] ; do | ||
527 | 39 | if scan_command $HW_WLAN1_NAME | grep $AP_NAME; then | ||
528 | 40 | found_ap=1 | ||
529 | 41 | break | ||
530 | 42 | fi | ||
531 | 43 | sleep 0.5 | ||
532 | 44 | let n=n+1 | ||
533 | 45 | done | ||
534 | 46 | test $found_ap -eq 1 | ||
535 | 47 | |||
536 | 48 | # We will restart the AP a huge number of times again and again | ||
537 | 49 | # and expect that the AP afterwards comes back up normally and | ||
538 | 50 | # we can still search and connect to it. | ||
539 | 51 | n=0 | ||
540 | 52 | while [ $n -lt $RESTART_ITERATIONS ] ; do | ||
541 | 53 | /snap/bin/wifi-ap.status restart-ap | ||
542 | 54 | sleep 0.5 | ||
543 | 55 | let n=n+1 | ||
544 | 56 | done | ||
545 | 57 | |||
546 | 58 | # Wait for AP to be marked as active again | ||
547 | 59 | until /snap/bin/wifi-ap.status | fgrep "ap.active: true" ; do | ||
548 | 60 | sleep 0.5 | ||
549 | 61 | done | ||
550 | 62 | |||
551 | 63 | # The AP should be still available in our scan result | ||
552 | 64 | n=0 | ||
553 | 65 | found_ap=0 | ||
554 | 66 | while [ $n -lt $SCAN_ITERATIONS ] ; do | ||
555 | 67 | if scan_command $HW_WLAN1_NAME | grep $AP_NAME; then | ||
556 | 68 | found_ap=1 | ||
557 | 69 | break | ||
558 | 70 | fi | ||
559 | 71 | sleep 0.5 | ||
560 | 72 | let n=n+1 | ||
561 | 73 | done | ||
562 | 74 | test $found_ap -eq 1 | ||
563 | 75 | |||
564 | 76 | if [ -e /snap/bin/nmcli ]; then | ||
565 | 77 | /snap/bin/nmcli d wifi connect $AP_NAME ifname $HW_WLAN1_NAME | ||
566 | 78 | /snap/bin/nmcli d | grep "$HW_WLAN1_NAME.*connected" | ||
567 | 79 | else | ||
568 | 80 | # Verify we can associate with the AP | ||
569 | 81 | sudo /snap/bin/wireless-tools.iw $HW_WLAN1_NAME connect $AP_NAME | ||
570 | 82 | sudo /snap/bin/wireless-tools.iw dev $HW_WLAN1_NAME link | grep $AP_NAME | ||
571 | 83 | fi | ||
572 | 84 | |||
573 | 85 | # We should only have one hostapd and one dnsmasq process at this time | ||
574 | 86 | # (we have to ignore the grep'ing process as otherwise we get a count of 2) | ||
575 | 87 | test `pgrep -c hostapd` -eq 1 | ||
576 | 88 | test `pgrep -c dnsmasq` -eq 1 | ||
577 | diff --git a/tests/main/utf8-ssid/task.yaml b/tests/main/utf8-ssid/task.yaml | |||
578 | index 9b6faa6..1c2759d 100644 | |||
579 | --- a/tests/main/utf8-ssid/task.yaml | |||
580 | +++ b/tests/main/utf8-ssid/task.yaml | |||
581 | @@ -1,5 +1,8 @@ | |||
582 | 1 | summary: Verify that the AP can accept an UTF8 SSID | 1 | summary: Verify that the AP can accept an UTF8 SSID |
583 | 2 | 2 | ||
584 | 3 | systems: | ||
585 | 4 | - -hw-ubuntu-core-16 | ||
586 | 5 | |||
587 | 3 | environment: | 6 | environment: |
588 | 4 | SCAN_ITERATIONS: 15 | 7 | SCAN_ITERATIONS: 15 |
589 | 5 | 8 | ||
590 | @@ -45,4 +48,3 @@ execute: | | |||
591 | 45 | # Verify we can associate with the AP | 48 | # Verify we can associate with the AP |
592 | 46 | /snap/bin/wireless-tools.iw wlan1 connect 'Ubuntu👍' | 49 | /snap/bin/wireless-tools.iw wlan1 connect 'Ubuntu👍' |
593 | 47 | /snap/bin/wireless-tools.iw dev wlan1 link | fgrep 'SSID: Ubuntu\xf0\x9f\x91\x8d' | 50 | /snap/bin/wireless-tools.iw dev wlan1 link | fgrep 'SSID: Ubuntu\xf0\x9f\x91\x8d' |
594 | 48 |
FAILED: Continuous integration, rev:c036235691d 6e1937893979ef4 8681e3a7128ccf /jenkins. canonical. com/system- enablement/ job/generic- build-snap/ 1175/ /jenkins. canonical. com/system- enablement/ job/generic- build-snap- worker/ 223/console /jenkins. canonical. com/system- enablement/ job/generic- update- snap-mp/ 1086/console /jenkins. canonical. com/system- enablement/ job/generic- test-snap/ 907/console
https:/
Executed test runs:
FAILURE: https:/
None: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/system- enablement/ job/generic- build-snap/ 1175/rebuild
https:/