Merge ~zongminl/checkbox-limerick/+git/checkbox-limerick:fix-snapcraft7-build-error into ~zongminl/checkbox-limerick/+git/checkbox-limerick:master

Proposed by Vic Liu
Status: Rejected
Rejected by: Vic Liu
Proposed branch: ~zongminl/checkbox-limerick/+git/checkbox-limerick:fix-snapcraft7-build-error
Merge into: ~zongminl/checkbox-limerick/+git/checkbox-limerick:master
Diff against target: 362 lines (+120/-73)
10 files modified
config/config_vars (+20/-11)
dev/null (+0/-19)
launchers/configure (+6/-9)
launchers/test-runner-kr260 (+5/-5)
launchers/test-runner-kv260 (+13/-0)
launchers/test-runner-zcu10x (+13/-0)
launchers/wrapper_local (+12/-6)
snap/hooks/configure (+7/-10)
snap/plugins/checkbox_provider.py (+3/-1)
snap/snapcraft.yaml (+41/-12)
Reviewer Review Type Date Requested Status
Rick Wu Pending
Patrick Liu Pending
Vincent Liao Pending
PeiYao Chang Pending
StanleyHuang Pending
Review via email: mp+457793@code.launchpad.net

Commit message

Fix: Add required packages to build-packages to fix snapcraft 7.x build error

To post a comment you must log in.

Unmerged commits

27d4a51... by Vic Liu

Fix: Add required packages to build-packages to fix snapcraft 7.x build error

747d05f... by Ubuntu <email address hidden>

Merge #455844 from ~liaou3/checkbox-limerick/+git/checkbox-limerick:fix_typo

Fix typo: from intliotg to limerick

0ea92fc... by Vincent Liao

Fix typo: from intliotg to limerick

6a42fe8... by Ubuntu <email address hidden>

Merge #452626 from ~liaou3/checkbox-limerick/+git/checkbox-limerick:modify_core_testplan

Modify project checkbox to fit UC22 tests and snapcraft 7.x

1285c50... by Vincent Liao

Modify all to fit the current UC22 test plan

cefcb87... by Vic Liu

Add: Launcher for KR260 platform

b27a950... by Vic Liu

Remove: Remove unused launchers

b65f84e... by Vic Liu

Add: Add launchers for zcu10x and kv260 platforms

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/config/config_vars b/config/config_vars
2index d06bf07..e25f004 100644
3--- a/config/config_vars
4+++ b/config/config_vars
5@@ -2,23 +2,32 @@
6 WIFI_INTERFACE=wlan0
7 # WATCHDOG_KERNEL_MOD=iTCO_wdt
8 # ALSADEVICE=hw:CARD=bytrt5660,DEV=0
9-OPEN_N_SSID=ubuntu-cert-n-open
10-OPEN_BG_SSID=ubuntu-cert-bg-open
11-OPEN_AC_SSID=ubuntu-cert-ac-open
12-WPA_N_SSID=ubuntu-cert-n-wpa
13-WPA_BG_SSID=ubuntu-cert-bg-wpa
14-WPA_AC_SSID=ubuntu-cert-ac-wpa
15+OPEN_N_SSID=ubuntu-cert-n-open-tpelab
16+OPEN_BG_SSID=ubuntu-cert-bg-open-tpelab
17+OPEN_AC_SSID=ubuntu-cert-ac-open-tpelab
18+OPEN_AX_SSID=ubuntu-cert-ax-open-tpelab
19+WPA_N_SSID=ubuntu-cert-n-wpa-tpelab
20+WPA_BG_SSID=ubuntu-cert-bg-wpa-tpelab
21+WPA_AC_SSID=ubuntu-cert-ac-wpa-tpelab
22+WPA_AX_SSID=ubuntu-cert-ax-wpa-tpelab
23+WPA3_AX_SSID=ubuntu-cert-ax-wpa3-tpelab
24 WPA_N_PSK=insecure
25 WPA_BG_PSK=insecure
26 WPA_AC_PSK=insecure
27-OBEX_TARGET=00:02:72:C5:F9:1F
28+WPA_AX_PSK=insecure
29+WPA3_AX_PSK=insecure
30+BTDEVADDR=C0:B5:D7:C1:74:38
31+# obex server in office: C0:B5:D7:C1:74:38
32+# obex server in lab: 28:3A:4D:46:79:C0, 7C:B2:7D:4B:14:95
33 WWAN_APN=internet
34 WWAN_NET_IF=ppp0
35 WWAN_CONTROL_IF=ttyACM3
36-STRESS_BOOT_ITERATIONS=100
37-STRESS_S3_ITERATIONS=100
38+STRESS_BOOT_ITERATIONS=30
39+STRESS_S3_ITERATIONS=30
40 STRESS_S4_ITERATIONS=100
41-TEST_TARGET_IPERF=10.101.47.93
42+TEST_TARGET_IPERF=10.102.88.220,10.102.182.100,10.102.182.137
43+# iperf server in office: 10.102.88.220
44+# iperf server in lab: 10.102.182.100, 10.102.182.137
45 STRESS_S4_WAIT_DELAY=120
46 STRESS_S4_SLEEP_DELAY=60
47 STRESS_S3_SLEEP_DELAY=60
48@@ -29,4 +38,4 @@ WIFI_AP_SETUPTIME=30
49 WWAN_SETUPTIME=30
50 TPM2TOOLS_TCTI_NAME=device
51 TPM2TOOLS_DEVICE_FILE=/dev/tpm0
52-STORE_ID=foobar
53+MODEL_GRADE=signed
54diff --git a/launchers/configure b/launchers/configure
55index cec1d8a..4970a5f 100755
56--- a/launchers/configure
57+++ b/launchers/configure
58@@ -26,18 +26,15 @@ try:
59 except ImportError:
60 msg = """
61 checkbox-support not found!
62-You need to connect this snap to the checkbox20 snap.
63+You need to connect this snap to the checkbox22 snap.
64
65 You can do this with those commands:
66
67-snap connect $SNAP_NAME:checkbox-runtime checkbox20:checkbox-runtime
68-snap connect $SNAP_NAME:provider-resource checkbox20:provider-resource
69-snap connect $SNAP_NAME:provider-checkbox checkbox20:provider-checkbox
70-snap connect $SNAP_NAME:provider-snappy checkbox20:provider-snappy
71-snap connect $SNAP_NAME:provider-ipdt checkbox20:provider-ipdt
72-snap connect $SNAP_NAME:provider-docker checkbox20:provider-docker
73-snap connect $SNAP_NAME:provider-tpm2 checkbox20:provider-tpm2
74-snap connect $SNAP_NAME:provider-edgex checkbox20:provider-edgex
75+snap connect $SNAP_NAME:checkbox-runtime checkbox22:checkbox-runtime
76+snap connect $SNAP_NAME:provider-resource checkbox22:provider-resource
77+snap connect $SNAP_NAME:provider-checkbox checkbox22:provider-checkbox
78+snap connect $SNAP_NAME:provider-tpm2 checkbox22:provider-tpm2
79+snap connect $SNAP_NAME:provider-certification-client checkbox22:provider-certification-client
80 """
81 print(os.path.expandvars(msg), file=sys.stderr)
82 sys.exit(1)
83diff --git a/launchers/test-runner-automated b/launchers/test-runner-automated
84deleted file mode 100755
85index 7d8ef3b..0000000
86--- a/launchers/test-runner-automated
87+++ /dev/null
88@@ -1,19 +0,0 @@
89-#!/usr/bin/env checkbox-cli-wrapper
90-[launcher]
91-app_id = com.canonical.qa.limerick:checkbox
92-launcher_version = 1
93-stock_reports = text, submission_files
94-
95-[test plan]
96-unit = com.canonical.qa.limerick::limerick-automated
97-forced = yes
98-
99-[test selection]
100-forced = yes
101-
102-[ui]
103-type = silent
104-auto_retry = no
105-max_attempts = 4
106-delay_before_retry = 30
107-
108diff --git a/launchers/test-runner b/launchers/test-runner-kr260
109similarity index 54%
110rename from launchers/test-runner
111rename to launchers/test-runner-kr260
112index c8292ab..8c81dbc 100755
113--- a/launchers/test-runner
114+++ b/launchers/test-runner-kr260
115@@ -5,9 +5,9 @@ launcher_version = 1
116 stock_reports = text, submission_files, certification
117
118 [test plan]
119-unit = com.canonical.qa.limerick::limerick
120-filter = com.canonical.qa.limerick::limerick
121- com.canonical.qa.limerick::limerick-manual
122- com.canonical.qa.limerick::limerick-automated
123- com.canonical.qa.limerick::limerick-stress
124+unit = com.canonical.qa.limerick::kr260-limerick
125+filter = com.canonical.qa.limerick::kr260-limerick
126+ com.canonical.qa.limerick::kr260-limerick-manual
127+ com.canonical.qa.limerick::kr260-limerick-automated
128+ com.canonical.qa.limerick::kr260-limerick-stress
129
130diff --git a/launchers/test-runner-kv260 b/launchers/test-runner-kv260
131new file mode 100755
132index 0000000..923d19f
133--- /dev/null
134+++ b/launchers/test-runner-kv260
135@@ -0,0 +1,13 @@
136+#!/usr/bin/env checkbox-cli-wrapper
137+[launcher]
138+app_id = com.canonical.qa.limerick:checkbox
139+launcher_version = 1
140+stock_reports = text, submission_files, certification
141+
142+[test plan]
143+unit = com.canonical.qa.limerick::kv260-limerick
144+filter = com.canonical.qa.limerick::kv260-limerick
145+ com.canonical.qa.limerick::kv260-limerick-manual
146+ com.canonical.qa.limerick::kv260-limerick-automated
147+ com.canonical.qa.limerick::kv260-limerick-stress
148+
149diff --git a/launchers/test-runner-zcu10x b/launchers/test-runner-zcu10x
150new file mode 100755
151index 0000000..2d61ea4
152--- /dev/null
153+++ b/launchers/test-runner-zcu10x
154@@ -0,0 +1,13 @@
155+#!/usr/bin/env checkbox-cli-wrapper
156+[launcher]
157+app_id = com.canonical.qa.limerick:checkbox
158+launcher_version = 1
159+stock_reports = text, submission_files, certification
160+
161+[test plan]
162+unit = com.canonical.qa.limerick::zcu10x-limerick
163+filter = com.canonical.qa.limerick::zcu10x-limerick
164+ com.canonical.qa.limerick::zcu10x-limerick-manual
165+ com.canonical.qa.limerick::zcu10x-limerick-automated
166+ com.canonical.qa.limerick::zcu10x-limerick-stress
167+
168diff --git a/launchers/wrapper_local b/launchers/wrapper_local
169index 7df956e..9326de4 100755
170--- a/launchers/wrapper_local
171+++ b/launchers/wrapper_local
172@@ -21,11 +21,11 @@ esac
173 if [ -d $SNAP/checkbox-runtime ]; then
174 RUNTIME=$SNAP/checkbox-runtime
175 if [ ! -d $RUNTIME/usr ]; then
176- echo "You need to connect this snap to the checkbox20 snap."
177+ echo "You need to connect this snap to the checkbox22 snap."
178 echo ""
179 echo "You can do this with those commands:"
180- echo "snap install checkbox20"
181- echo "snap connect $SNAP_NAME:checkbox-runtime checkbox20:checkbox-runtime"
182+ echo "snap install checkbox22"
183+ echo "snap connect $SNAP_NAME:checkbox-runtime checkbox22:checkbox-runtime"
184 exit 1
185 fi
186 fi
187@@ -34,14 +34,20 @@ export LC_ALL=C.UTF-8
188 PERL_VERSION=$(perl -e '$^V=~/^v(\d+\.\d+)/;print $1')
189 export PERL5LIB="$PERL5LIB:$SNAP/usr/lib/$ARCH/perl/$PERL_VERSION:$SNAP/usr/lib/$ARCH/perl5/$PERL_VERSION:$SNAP/usr/share/perl/$PERL_VERSION:$SNAP/usr/share/perl5"
190 export GI_TYPELIB_PATH=$SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$ARCH/girepository-1.0
191-export PATH="$PATH:$SNAP/usr/bin:$SNAP/usr/sbin:$SNAP/sbin:/snap/bin"
192+export PATH="$PATH:$SNAP/usr/bin:$SNAP/usr/sbin:$SNAP/sbin:/snap/bin:/snap/checkbox-ce-oem/current/usr/bin/:/snap/checkbox-ce-oem/current/usr/sbin"
193 export PYTHONPATH="$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH"
194+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/snap/checkbox-ce-oem/current/usr/lib/aarch64-linux-gnu"
195
196 if [ -e $RUNTIME/wrapper_common ]; then
197 . $RUNTIME/wrapper_common
198 else
199- echo "ERROR: no $RUNTIME/wrapper_common found"
200- exit 1
201+ CGROUP_NAME=$(cat /proc/self/cgroup | grep -e "^1:name")
202+ if [[ "$CGROUP_NAME" == *"hook.configure"* ]]; then
203+ echo "Running in configure hook, wrapper_common not required"
204+ else
205+ echo "ERROR: no $RUNTIME/wrapper_common found"
206+ exit 0
207+ fi
208 fi
209
210 exec "$@"
211diff --git a/snap/hooks/configure b/snap/hooks/configure
212index 508c6f3..aaf099e 100755
213--- a/snap/hooks/configure
214+++ b/snap/hooks/configure
215@@ -1,5 +1,5 @@
216 #!/usr/bin/env python3
217-# Copyright 2017-2020 Canonical Ltd.
218+# Copyright 2017-2023 Canonical Ltd.
219 # All rights reserved.
220
221 """
222@@ -46,18 +46,15 @@ try:
223 except ImportError:
224 msg = """
225 checkbox-support not found!
226-You need to connect this snap to the checkbox20 snap.
227+You need to connect this snap to the checkbox22 snap.
228
229 You can do this with those commands:
230
231-snap connect $SNAP_NAME:checkbox-runtime checkbox20:checkbox-runtime
232-snap connect $SNAP_NAME:provider-resource checkbox20:provider-resource
233-snap connect $SNAP_NAME:provider-checkbox checkbox20:provider-checkbox
234-snap connect $SNAP_NAME:provider-snappy checkbox20:provider-snappy
235-snap connect $SNAP_NAME:provider-ipdt checkbox20:provider-ipdt
236-snap connect $SNAP_NAME:provider-docker checkbox20:provider-docker
237-snap connect $SNAP_NAME:provider-tpm2 checkbox20:provider-tpm2
238-snap connect $SNAP_NAME:provider-edgex checkbox20:provider-edgex
239+snap connect $SNAP_NAME:checkbox-runtime checkbox22:checkbox-runtime
240+snap connect $SNAP_NAME:provider-resource checkbox22:provider-resource
241+snap connect $SNAP_NAME:provider-checkbox checkbox22:provider-checkbox
242+snap connect $SNAP_NAME:provider-tpm2 checkbox22:provider-tpm2
243+snap connect $SNAP_NAME:provider-certification-client checkbox22:provider-certification-client
244 """
245 print(os.path.expandvars(msg), file=sys.stderr)
246 sys.exit(0)
247diff --git a/snap/plugins/checkbox_provider.py b/snap/plugins/checkbox_provider.py
248index bf51895..ea4581e 100644
249--- a/snap/plugins/checkbox_provider.py
250+++ b/snap/plugins/checkbox_provider.py
251@@ -1,6 +1,6 @@
252 # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
253 #
254-# Copyright (C) 2016-2020 Canonical Ltd
255+# Copyright (C) 2016-2023 Canonical Ltd
256 #
257 # This program is free software: you can redistribute it and/or modify
258 # it under the terms of the GNU General Public License version 3 as
259@@ -39,6 +39,8 @@ class PluginImpl(PluginV2):
260 self.build_snaps.add("checkbox18")
261 if self.project.info.base == "core20":
262 self.build_snaps.add("checkbox20")
263+ if self.project.info.base == "core22":
264+ self.build_snaps.add("checkbox22")
265 return self.build_snaps
266
267 def get_build_packages(self) -> Set[str]:
268diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
269index abe4420..edfb63a 100644
270--- a/snap/snapcraft.yaml
271+++ b/snap/snapcraft.yaml
272@@ -2,29 +2,36 @@ name: checkbox-limerick
273 summary: Checkbox tests for the limerick project
274 description: |
275 Collection of tests to be run on devices that are part of the limerick project
276-version: '0.1.dev'
277+version: '0.2.dev'
278 confinement: strict
279 grade: stable
280
281-base: core20
282+base: core22
283
284 plugs:
285 checkbox-runtime:
286 interface: content
287 target: $SNAP/checkbox-runtime
288- default-provider: checkbox20
289+ default-provider: checkbox22
290 provider-resource:
291 interface: content
292 target: $SNAP/providers/plainbox-provider-resource
293- default-provider: checkbox20
294+ default-provider: checkbox22
295 provider-checkbox:
296 interface: content
297 target: $SNAP/providers/plainbox-provider-checkbox
298- default-provider: checkbox20
299- provider-snappy:
300+ default-provider: checkbox22
301+ provider-tpm2:
302 interface: content
303- target: $SNAP/providers/plainbox-provider-snappy
304- default-provider: checkbox20
305+ target: $SNAP/providers/plainbox-provider-tpm2
306+ default-provider: checkbox22
307+ provider-certification-client:
308+ interface: content
309+ target: $SNAP/providers/plainbox-provider-certification-client
310+ default-provider: checkbox22
311+ provider-ce-oem:
312+ interface: content
313+ target: $SNAP/providers/checkbox-provider-ce-oem
314
315 apps:
316 checkbox-cli:
317@@ -46,9 +53,17 @@ apps:
318 command-chain: [bin/wrapper_local]
319 command: bin/shell-wrapper
320 plugs: *standard
321- test-runner:
322+ test-runner-zcu10x:
323+ command-chain: [bin/wrapper_local]
324+ command: bin/test-runner-zcu10x
325+ plugs: *standard
326+ test-runner-kv260:
327 command-chain: [bin/wrapper_local]
328- command: bin/test-runner
329+ command: bin/test-runner-kv260
330+ plugs: *standard
331+ test-runner-kr260:
332+ command-chain: [bin/wrapper_local]
333+ command: bin/test-runner-kr260
334 plugs: *standard
335
336 passthrough:
337@@ -58,9 +73,23 @@ passthrough:
338
339 parts:
340 checkbox-provider-limerick:
341- plugin: checkbox-provider
342- source: git://git.launchpad.net/~checkbox-dev/checkbox-limerick/+git/checkbox-provider-limerick
343+ plugin: dump
344+ source: https://git.launchpad.net/~checkbox-dev/checkbox-limerick/+git/checkbox-provider-limerick
345 source-type: git
346+ build-snaps:
347+ - checkbox22
348+ override-build: |
349+ export PYTHONPATH=/snap/checkbox22/current/lib/python3.10/site-packages/
350+ for path in $(find "/snap/checkbox22/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done
351+ python3 manage.py validate
352+ python3 manage.py build
353+ python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-limerick --root="$SNAPCRAFT_PART_INSTALL"
354+ build-packages:
355+ - python3-jinja2
356+ - python3-xlsxwriter
357+ - python3-packaging
358+ - python3-urwid
359+ - python3-requests-oauthlib
360 parts-meta-info:
361 plugin: nil
362 override-build: |

Subscribers

People subscribed via source and target branches

to all changes: