Merge ~morphis/snappy-hwe-snaps/+git/network-manager:b/fix-stable-wifi-ap-tests into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:stable

Proposed by Simon Fels
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: ac4408c843cae3f8ec76cfce8ee324132a8463c7
Merged at revision: 2a20a27b21eeaf78d59d7a6f1d393f99c2e3fee4
Proposed branch: ~morphis/snappy-hwe-snaps/+git/network-manager:b/fix-stable-wifi-ap-tests
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:stable
Diff against target: 76 lines (+16/-18)
3 files modified
tests/lib/prepare-all.sh (+12/-0)
tests/main/suspend-resume/task.yaml (+0/-6)
tests/main/wifi-connect-secured-ap/task.yaml (+4/-12)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Alfonso Sanchez-Beato Approve
Review via email: mp+320601@code.launchpad.net

Description of the change

Backport single change to stable to get unit tests working:

ac4408c Fix wifi-ap.config invokation

To post a comment you must log in.
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/tests/lib/prepare-all.sh b/tests/lib/prepare-all.sh
index 1194d1f..1c1419c 100644
--- a/tests/lib/prepare-all.sh
+++ b/tests/lib/prepare-all.sh
@@ -1,5 +1,17 @@
1#!/bin/bash1#!/bin/bash
22
3cat << EOF > /etc/systemd/system/load-mac80211-hwsim.service
4[Unit]
5Description=Load mac8022_hwsim driver
6[Service]
7ExecStart=/sbin/modprobe mac80211_hwsim radios=2
8[Install]
9WantedBy=multi-user.target
10EOF
11
12systemctl enable load-mac80211-hwsim
13systemctl start load-mac80211-hwsim
14
3# We don't have to build a snap when we should use one from a15# We don't have to build a snap when we should use one from a
4# channel16# channel
5if [ -n "$SNAP_CHANNEL" ] ; then17if [ -n "$SNAP_CHANNEL" ] ; then
diff --git a/tests/main/suspend-resume/task.yaml b/tests/main/suspend-resume/task.yaml
index 09cb2cc..2f89e25 100644
--- a/tests/main/suspend-resume/task.yaml
+++ b/tests/main/suspend-resume/task.yaml
@@ -1,15 +1,9 @@
1summary: Verify suspend/resume tracking works reliable1summary: Verify suspend/resume tracking works reliable
22
3restore: |
4 rmmod mac80211_hwsim
5
6execute: |3execute: |
7 # Install necessary test-tools, we need inotify-tools in this case4 # Install necessary test-tools, we need inotify-tools in this case
8 snap install --edge se-test-tools5 snap install --edge se-test-tools
96
10 # Get two connected wifi network interfaces wlan0 and wlan1
11 modprobe mac80211_hwsim radios=2
12
13 # FIXME: take the one from edge for now as that is the one which7 # FIXME: take the one from edge for now as that is the one which
14 # has automatic setup capabilities8 # has automatic setup capabilities
15 snap install --edge wifi-ap9 snap install --edge wifi-ap
diff --git a/tests/main/wifi-connect-secured-ap/task.yaml b/tests/main/wifi-connect-secured-ap/task.yaml
index aa6a70c..16ebf3f 100644
--- a/tests/main/wifi-connect-secured-ap/task.yaml
+++ b/tests/main/wifi-connect-secured-ap/task.yaml
@@ -4,25 +4,17 @@ environment:
4 WIFI_SSID: Ubuntu4 WIFI_SSID: Ubuntu
5 WIFI_PASSPHRASE: Test12345 WIFI_PASSPHRASE: Test1234
66
7restore: |
8 rmmod mac80211_hwsim
9
10execute: |7execute: |
11 # Get two connected wifi network interfaces wlan0 and wlan1 and
12 # give the system soem time to settle
13 modprobe mac80211_hwsim radios=2
14 sleep 1
15
16 snap install wifi-ap8 snap install wifi-ap
17 # FIXME: until the wifi-ap utility is clever enough to retry9 # FIXME: until the wifi-ap utility is clever enough to retry
18 # connecting with the service we need to add a short sleep here10 # connecting with the service we need to add a short sleep here
19 sleep 0.511 sleep 0.5
2012
21 # Setup the AP on wlan013 # Setup the AP on wlan0
22 /snap/bin/wifi-ap.config set wifi.interface wlan014 /snap/bin/wifi-ap.config set wifi.interface=wlan0
23 /snap/bin/wifi-ap.config set wifi.ssid $WIFI_SSID15 /snap/bin/wifi-ap.config set wifi.ssid=$WIFI_SSID
24 /snap/bin/wifi-ap.config set wifi.security wpa216 /snap/bin/wifi-ap.config set wifi.security=wpa2
25 /snap/bin/wifi-ap.config set wifi.security-passphrase $WIFI_PASSPHRASE17 /snap/bin/wifi-ap.config set wifi.security-passphrase=$WIFI_PASSPHRASE
2618
27 # AP needs a bit to appear and be visible for NetworkManager19 # AP needs a bit to appear and be visible for NetworkManager
28 /snap/bin/network-manager.nmcli d wifi rescan20 /snap/bin/network-manager.nmcli d wifi rescan

Subscribers

People subscribed via source and target branches