Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/alsa-utils:run-on-hw into ~snappy-hwe-team/snappy-hwe-snaps/+git/alsa-utils:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: 4f7f9e9139f19ad3261d7743ff74a2bcce047030
Merged at revision: 0c42fad04f5f5193bf6c7e1c283cca44fdf30fad
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/alsa-utils:run-on-hw
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/alsa-utils:master
Diff against target: 149 lines (+52/-18)
5 files modified
run-tests.sh (+24/-13)
spread.yaml (+15/-2)
tests/integration/main/content-statefile/task.yaml (+5/-0)
tests/integration/main/documentation-builds/task.yaml (+5/-0)
tests/integration/main/validate-manual-tests/task.yaml (+3/-3)
Reviewer Review Type Date Requested Status
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Jim Hodapp (community) Approve
Konrad Zapałowicz (community) code Approve
Review via email: mp+321824@code.launchpad.net

Commit message

Adapt spread tests so we can run them on real HW

Description of the change

Adapt spread tests so we can run them on real HW

To post a comment you must log in.
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

ack

review: Approve (code)
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)
Revision history for this message
Simon Fels (morphis) wrote :

Two comments in line, otherwise LGTM

review: Needs Fixing
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Branch refreshed after addressing review comments. See also comments below.

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)
Revision history for this message
Jim Hodapp (jhodapp) 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: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) :
review: Needs Fixing
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) :
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) :
Revision history for this message
Jim Hodapp (jhodapp) :
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Branch refreshed

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

Still looks good to me.

Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/run-tests.sh b/run-tests.sh
2index f030283..bb879ba 100755
3--- a/run-tests.sh
4+++ b/run-tests.sh
5@@ -22,20 +22,31 @@ TESTS_EXTRAS_PATH=".tests-extras"
6 # Display help.
7 # This has to be in sync with the tests-extras/test-runner.sh script
8 # functionalities as the parameters to this one are passed directly there
9+# this function will quit the script because of the 'exec' keyword
10 show_help() {
11- echo "Usage: run-tests.sh [OPTIONS]"
12- echo
13- echo "This is fetch & forget script and what it does is to fetch the"
14- echo "tests-extras repository and execute the run-tests.sh script from"
15- echo "there passing arguments as-is."
16- echo
17- echo "optional arguments:"
18- echo " --help Show this help message and exit"
19- echo " --channel Select another channel to build the base image from (default: stable)"
20- echo " --snap Extra snap to install"
21- echo " --debug Enable verbose debugging output"
22- echo " --test-from-channel Pull network-manager snap from the specified channel instead of building it from source"
23- echo " --force-new-image Force generating a new image used for testing"
24+ exec cat <<'EOF'
25+Usage: run-tests.sh [OPTIONS]
26+
27+This is fetch & forget script and what it does is to fetch the
28+tests-extras repository and execute the run-tests.sh script from
29+there passing arguments as-is.
30+
31+optional arguments:
32+ --help Show this help message and exit
33+ --channel=<channel> Select another channel to build the base image from (default: $channel)
34+ --snap=<name> Extra snap to install
35+ --debug Enable verbose debugging output
36+ --test-from-channel=<channel> Pull snap from the specified channel instead of building it from source
37+ --spread-system=<system> Name of a spread system to use for testing
38+ --spread-filter=<filter> Spread filter expressions for test cases
39+ --external-address=<IP address> Address of external backend used for testing
40+ --external-user=<user name> User name to use on external test backend (default: $external_user)
41+ --external-password=<password> Password to use for specified external user (default: $external_password)
42+ --force-new-image Force generating a new image used for testing
43+ --image-unsigned-core Use an unsigned core snap for the generated image
44+ --image-unsigned-gadget Use an unsigned gadget snap for the generated image
45+ --image-unsigned-kernel Use an unsigned kernel snap for the generated image
46+EOF
47 }
48
49 # Clone the tests-extras repository
50diff --git a/spread.yaml b/spread.yaml
51index c5e1e1b..a4920c2 100644
52--- a/spread.yaml
53+++ b/spread.yaml
54@@ -13,15 +13,17 @@
55 # You should have received a copy of the GNU General Public License
56 # along with this program. If not, see <http://www.gnu.org/licenses/>.
57
58-
59 project: alsa-utils
60
61+kill-timeout: 2h
62+warn-timeout: 40m
63+
64 environment:
65 SNAP_NAME: alsa-utils
66 PROJECT_PATH: /home/${SNAP_NAME}
67 TESTSLIB: $PROJECT_PATH/tests/integration/lib
68 SNAP_CHANNEL: $(HOST:echo $SNAP_CHANNEL)
69- SNAP_ARCH: amd64
70+ SNAP_ARCH: $(dpkg --print-architecture)
71 SNAP_AUTOCONNECT_CORE_PLUGS: alsa home
72 SNAP_AUTO_ALIASES: arecord aplay alsamixer amixer alsaucm alsactl speaker-test aseqnet alsatplg arecordmidi amidi alsaloop aconnect iecset alsabat aseqdump aplaymidi
73
74@@ -31,6 +33,16 @@ backends:
75 - ubuntu-core-16:
76 username: test
77 password: test
78+ external:
79+ type: adhoc
80+ environment:
81+ SPREAD_EXTERNAL_ADDRESS: "$(HOST: echo ${SPREAD_EXTERNAL_ADDRESS:-localhost:8022})"
82+ allocate: |
83+ ADDRESS $SPREAD_EXTERNAL_ADDRESS
84+ systems:
85+ - hw-ubuntu-core-16:
86+ username: $(HOST:echo $SPREAD_EXTERNAL_USER)
87+ password: $(HOST:echo $SPREAD_EXTERNAL_PASSWORD)
88
89 path: /home/alsa-utils
90
91@@ -45,6 +57,7 @@ suites:
92 summary: Full-system tests for the alsa-utils snap
93 systems:
94 - ubuntu-core-16
95+ - hw-ubuntu-core-16
96 prepare: |
97 . $TESTSLIB/prepare.sh
98 restore-each: |
99diff --git a/tests/integration/main/content-statefile/task.yaml b/tests/integration/main/content-statefile/task.yaml
100index 2782c35..6227ef9 100644
101--- a/tests/integration/main/content-statefile/task.yaml
102+++ b/tests/integration/main/content-statefile/task.yaml
103@@ -1,5 +1,10 @@
104 summary: Verify that initial state file can be pulled over the content interface
105
106+systems:
107+ # Do not run on real hardware as this test requires an unsigned gadget snap
108+ # in the image and we cannot guarantee that in this case.
109+ - -hw-ubuntu-core-16
110+
111 prepare: |
112 . $TESTSLIB/snap-names.sh
113 snap list | grep $gadget_name | awk '{print $2}' > gadget_version
114diff --git a/tests/integration/main/documentation-builds/task.yaml b/tests/integration/main/documentation-builds/task.yaml
115index 7fef7b1..ccac8ae 100644
116--- a/tests/integration/main/documentation-builds/task.yaml
117+++ b/tests/integration/main/documentation-builds/task.yaml
118@@ -1,5 +1,10 @@
119 summary: Verify the project documentation is building without errors
120
121+systems:
122+ # Do not run on real hardware as documentation-builder is not available in
123+ # all archs.
124+ - -hw-ubuntu-core-16
125+
126 execute: |
127 # Need to install in devmode as otherwise the snap can't access our project
128 # home which is outside of the home directory of our current user.
129diff --git a/tests/integration/main/validate-manual-tests/task.yaml b/tests/integration/main/validate-manual-tests/task.yaml
130index 1b8b481..8edd337 100644
131--- a/tests/integration/main/validate-manual-tests/task.yaml
132+++ b/tests/integration/main/validate-manual-tests/task.yaml
133@@ -2,7 +2,7 @@ summary: Validate all manual plainbox test cases so that we don't ship any broke
134
135 execute: |
136 snap install --devmode --beta classic
137- cat <<-EOF > /home/test/validate-manual-tests.sh
138+ cat <<-EOF > ${PROJECT_PATH}/validate-manual-tests.sh
139 #!/bin/sh
140 set -ex
141 apt update
142@@ -13,5 +13,5 @@ execute: |
143 python3 manage.py develop
144 python3 manage.py validate
145 EOF
146- chmod +x /home/test/validate-manual-tests.sh
147- sudo classic /home/test/validate-manual-tests.sh
148+ chmod +x ${PROJECT_PATH}/validate-manual-tests.sh
149+ sudo classic ${PROJECT_PATH}/validate-manual-tests.sh

Subscribers

People subscribed via source and target branches