Merge ~sylvain-pineau/plainbox-provider-resource:fix_flake8_shellcheck_errors into plainbox-provider-resource:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: e5959f6a045d0e3784575424b07c432eb300aed1
Merged at revision: 9e5f8cff2b244b4e11eb96fbd9f56ee50e9c93cd
Proposed branch: ~sylvain-pineau/plainbox-provider-resource:fix_flake8_shellcheck_errors
Merge into: plainbox-provider-resource:master
Diff against target: 307 lines (+47/-36)
12 files modified
bin/block_device_resource.py (+3/-2)
bin/cpuinfo_resource.py (+3/-1)
bin/efi_resource.py (+2/-1)
bin/graphics_card_resource.py (+5/-2)
bin/lsb_resource.py (+1/-3)
bin/mobilebroadband_resource.sh (+6/-9)
bin/module_resource.py (+1/-0)
bin/optical_resource.py (+1/-0)
bin/udev_resource.py (+4/-3)
jobs/resource.pxu (+19/-14)
requirements/container-tests-provider-resource-generic (+1/-1)
requirements/deb-base.txt (+1/-0)
Reviewer Review Type Date Requested Status
Devices Certification Bot Needs Fixing
Sylvain Pineau (community) Approve
Review via email: mp+387517@code.launchpad.net

Description of the change

sylvain@sylvain-ThinkPad-T480s:/tmp/plainbox-provider-resource$ ./manage.py test
test_job_command_jobs/resource.pxu:103-109_module (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:111-119_package (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:121-128_executable (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:130-135_device (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:137-142_removable_partition (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:144-153_staging/udev (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:155-166_dmi_present (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:168-175_dmi (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:177-182_efi (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:184-189_uname (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:191-196_sleep (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:198-205_optical_drive_{name} (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:207-212_block_device (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:214-219_display (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:221-235_usb (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:237-242_xinput (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:244-252_environment (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:254-258_mobilebroadband (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:260-272_virtualization (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:274-278_IEEE_80211 (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:280-291_wireless_sta_protocol (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:293-303_rtc (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:305-338_requirements (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:340-344_graphics_card (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:346-352_fwts (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:354-361_mir (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:363-373_wifi_interface_mode (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:375-382_snap (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:384-391_interface (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:393-400_connections (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:402-409_model_assertion (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:411-418_serial_assertion (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:420-432_serial_ports_static (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:434-443_ubuntu_core_features (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:445-457_net_if_management (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:459-469_net_if_management_attachment (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:471-480_bootloader (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:482-495_nvdimm_resource (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:67-72_cpuinfo (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:74-80_cdimage (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:82-87_dpkg (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:89-94_lsb (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_job_command_jobs/resource.pxu:96-101_meminfo (plainbox.provider_manager.InlineShellcheckTests) ... ok
test_shellcheck_/tmp/plainbox-provider-resource/bin/mobilebroadband_resource.sh (plainbox.provider_manager.ShellcheckTests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/block_device_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/bootloader_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/cdimage_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/cpuinfo_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/display_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/dmi_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/dpkg_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/efi_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/graphics_card_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/lsb_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/meminfo_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/module_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/net_if_management.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/optical_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/snapd_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/udev2resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/udev_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/uname_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test_flake8_/tmp/plainbox-provider-resource/bin/xinput_resource.py (plainbox.provider_manager.Flake8Tests) ... ok
test (test_net_if_management.Test_CARA_T) ... ok
test (test_net_if_management.Test_CASCADE_500) ... ok
test (test_net_if_management.Test_RPI2_UC16_CCONF) ... ok
test (test_net_if_management.Test_RPI3B_UC16_CLOUDINIT) ... ok
test (test_net_if_management.Test_XENIAL_DESKTOP) ... ok

----------------------------------------------------------------------
Ran 68 tests in 4.519s

OK

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

re-starting from a fresh proposal

review: Approve
Revision history for this message
Devices Certification Bot (ce-certification-qa) wrote :

The merge was fine but running tests failed.

[bionic] [12:15:02] starting container
Device project added to bionic-testing
[xenial] [12:15:11] starting container
Device project added to xenial-testing
[bionic] [12:15:16] provisioning container
[focal] [12:15:20] starting container
[xenial] [12:15:21] provisioning container
Device project added to focal-testing
[focal] [12:15:35] provisioning container
[bionic] [12:15:49] Starting tests...
[bionic] Found a test script: ./requirements/container-tests-provider-resource-generic
[xenial] [12:15:51] Starting tests...
[xenial] Found a test script: ./requirements/container-tests-provider-resource-generic
[focal] [12:16:14] Starting tests...
[focal] Found a test script: ./requirements/container-tests-provider-resource-generic
[xenial] [12:17:00] container-tests-provider-resource-generic: PASS
[xenial] [12:17:00] Fixing file permissions in source directory
[xenial] [12:17:00] Destroying container
[bionic] [12:17:19] container-tests-provider-resource-generic: PASS
[bionic] [12:17:19] Fixing file permissions in source directory
[bionic] [12:17:19] Destroying container
[focal] [12:17:23] container-tests-provider-resource-generic: FAIL
[focal] output: https://paste.ubuntu.com/p/SPVGScYyzx/
[focal] [12:17:26] Fixing file permissions in source directory
[focal] [12:17:26] Destroying container

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/block_device_resource.py b/bin/block_device_resource.py
2index 2ce9d29..ad6c5fb 100755
3--- a/bin/block_device_resource.py
4+++ b/bin/block_device_resource.py
5@@ -33,7 +33,7 @@ def usb_support(name, version):
6 path = rootdir_pattern.sub('', os.readlink('/sys/block/%s' % name))
7
8 # Remove the usb config.interface part of the path
9- m = re.match('((.*usb\d+).*\/)\d-[\d\.:\-]+\/.*', path)
10+ m = re.match('((.*usb\d+).*\/)\d-[\d\.:\-]+\/.*', path) # noqa: W605
11 if m:
12 device_path = m.group(1)
13 hub_port_path = m.group(2)
14@@ -137,8 +137,9 @@ def smart_support(name):
15 break
16 return supported
17
18+
19 for path in glob('/sys/block/*/device') + glob('/sys/block/*/dm'):
20- name = re.sub('.*/(.*?)/(device|dm)', '\g<1>', path)
21+ name = re.sub('.*/(.*?)/(device|dm)', '\g<1>', path) # noqa: W605
22 state = device_state(name)
23 usb2 = usb_support(name, 2.00)
24 usb3 = usb_support(name, 3.00)
25diff --git a/bin/cpuinfo_resource.py b/bin/cpuinfo_resource.py
26index d00eeab..31e8b63 100755
27--- a/bin/cpuinfo_resource.py
28+++ b/bin/cpuinfo_resource.py
29@@ -29,7 +29,9 @@ CPUINFO_FILENAME = "/proc/cpuinfo"
30 FREQUENCY_FILENAME = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"
31
32 # Filename where available frequency governors are stored.
33-GOVERNORS_FILENAME = "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
34+GOVERNORS_FILENAME = (
35+ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors")
36+
37
38 class CpuinfoResult:
39
40diff --git a/bin/efi_resource.py b/bin/efi_resource.py
41index 2f53720..fa1e270 100755
42--- a/bin/efi_resource.py
43+++ b/bin/efi_resource.py
44@@ -24,7 +24,8 @@ from checkbox_support.parsers.efi import EfiParser
45
46
47 # Command to retrieve efi information.
48-COMMAND = "[ -d /sys/firmware/efi ] && cat /var/log/kern.log* | grep -m 1 -o --color=never 'EFI v.*' || true"
49+COMMAND = ("[ -d /sys/firmware/efi ] && cat /var/log/kern.log* | "
50+ "grep -m 1 -o --color=never 'EFI v.*' || true")
51
52
53 class EfiResult:
54diff --git a/bin/graphics_card_resource.py b/bin/graphics_card_resource.py
55index 110c5f4..edd3b3b 100755
56--- a/bin/graphics_card_resource.py
57+++ b/bin/graphics_card_resource.py
58@@ -31,6 +31,7 @@ def slugify(_string):
59 "-_.{}{}".format(string.ascii_letters, string.digits))
60 return ''.join(c if c in valid_chars else '_' for c in _string)
61
62+
63 def subprocess_lines_generator(command):
64 """
65 Generator that opens a subprocess and spits out lines
66@@ -118,8 +119,9 @@ def main():
67
68 # udev_devices generates one dict per device, the list shown
69 # below filters that to only VIDEO ones
70- video_devices = list(r for r in udev_devices(udev_output)
71- if r.get("category", "") == 'VIDEO')
72+ video_devices = list(
73+ r for r in udev_devices(udev_output) if r.get(
74+ "category", "") == 'VIDEO')
75 video_devices.sort(key=lambda r: bus_ordering(r))
76
77 # commands needed to switch to and from particular GPU,
78@@ -188,5 +190,6 @@ def main():
79 raise SystemExit(err)
80 return 0
81
82+
83 if __name__ == "__main__":
84 raise SystemExit(main())
85diff --git a/bin/lsb_resource.py b/bin/lsb_resource.py
86index d33db78..297661e 100755
87--- a/bin/lsb_resource.py
88+++ b/bin/lsb_resource.py
89@@ -20,8 +20,6 @@
90 import re
91 import sys
92
93-from subprocess import Popen, PIPE
94-
95
96 def get_lsb_release():
97 lsb_release_map = {
98@@ -41,7 +39,7 @@ def get_lsb_release():
99 key = lsb_release_map[key]
100 # Strip out quotes and newlines
101 lsb_release[key] = re.sub('["\n]', '', value)
102- except:
103+ except OSError:
104 # Missing file or permissions? Return the default lsb_release
105 pass
106
107diff --git a/bin/mobilebroadband_resource.sh b/bin/mobilebroadband_resource.sh
108index 10e9adc..2220c5a 100755
109--- a/bin/mobilebroadband_resource.sh
110+++ b/bin/mobilebroadband_resource.sh
111@@ -18,19 +18,16 @@
112 # along with Checkbox. If not, see <http://www.gnu.org/licenses/>.
113 #
114
115-MMCLI_PATH=$(which mmcli)
116+MMCLI_PATH=$(command -v mmcli)
117
118 if [ -x "$MMCLI_PATH" ]; then
119 # Use mmcli to query for modem capabilities
120 for i in $(mmcli --simple-status -L 2>/dev/null || mmcli -L | \
121 awk '/freedesktop\/ModemManager1\/Modem/ {print $1;}'); do
122- mmcli -m $i |grep -q "supported: .*gsm-umts.*" && GSM=yes
123- mmcli -m $i |grep -q "supported: .*cdma.*" && CDMA=yes
124+ mmcli -m "$i" | grep -q "supported: .*gsm-umts.*" && GSM=yes
125+ mmcli -m "$i" | grep -q "supported: .*cdma.*" && CDMA=yes
126 done
127- # force final exit status to true in case the test fails,
128- # as it's a resource and we don't want it to fail unless it
129- # really failed :D
130- [ "$GSM" = "yes" ] && echo "gsm: supported" || true
131- [ "$CDMA" = "yes" ] && echo "cdma: supported" || true
132+ [ "$GSM" = "yes" ] && echo "gsm: supported"
133+ [ "$CDMA" = "yes" ] && echo "cdma: supported"
134 fi
135-
136+exit 0
137diff --git a/bin/module_resource.py b/bin/module_resource.py
138index 8f3f53d..43d15a0 100755
139--- a/bin/module_resource.py
140+++ b/bin/module_resource.py
141@@ -69,5 +69,6 @@ def main():
142
143 return 0
144
145+
146 if __name__ == "__main__":
147 sys.exit(main())
148diff --git a/bin/optical_resource.py b/bin/optical_resource.py
149index 2e52780..92f9daf 100755
150--- a/bin/optical_resource.py
151+++ b/bin/optical_resource.py
152@@ -76,5 +76,6 @@ def main():
153 if cap in cdrom_id:
154 print(CAP_MAP[cap] + ": supported")
155
156+
157 if __name__ == "__main__":
158 sys.exit(main())
159diff --git a/bin/udev_resource.py b/bin/udev_resource.py
160index 23ec94a..b18e085 100755
161--- a/bin/udev_resource.py
162+++ b/bin/udev_resource.py
163@@ -62,7 +62,8 @@ class UdevResultLister:
164 for c, devices in self._data.items():
165 if short:
166 for d in devices:
167- print("{}".format(d.replace('None ', '').replace(' None', '')))
168+ print("{}".format(
169+ d.replace('None ', '').replace(' None', '')))
170 else:
171 print("{} ({}):".format(c, len(devices)))
172 for d in devices:
173@@ -107,13 +108,13 @@ def main():
174 metavar=("CATEGORY"), default=(),
175 help="""List devices found under the requested
176 categories.
177- Acceptable categories to list are:
178+ Acceptable categories to list are:
179 {}""".format(', '.join(categories)))
180 parser.add_argument('-f', '--filter', nargs='+', choices=categories,
181 metavar=("CATEGORY"), default=(),
182 help="""Filter devices found under the requested
183 categories.
184- Acceptable categories to list are:
185+ Acceptable categories to list are:
186 {}""".format(', '.join(categories)))
187 parser.add_argument('-s', '--short', action='store_true')
188 args = parser.parse_args()
189diff --git a/jobs/resource.pxu b/jobs/resource.pxu
190index bcf4d70..7766b92 100644
191--- a/jobs/resource.pxu
192+++ b/jobs/resource.pxu
193@@ -112,6 +112,7 @@ id: package
194 estimated_duration: 1.16
195 plugin: resource
196 command:
197+ # shellcheck disable=SC2016
198 dpkg-query -W -f='name: ${Package}\nversion: ${Version}\nmodalias: ${Modaliases}\n\n' || \
199 echo -e 'name: plainbox\nversion: 0.1\nmodalias: \n\n' |\
200 awk 'BEGIN {RS = ""; FS = "\n"}{print $1; print $2; if ($3 ~ /^modalias: .+$/) {print $3}; print "" }'
201@@ -124,7 +125,7 @@ plugin: resource
202 _summary: Enumerate available system executables
203 _description: Generates a resource for all available executables
204 command:
205- find -H $(echo "$PATH" | sed -e 's/:/ /g') -maxdepth 1 -xtype f -executable -printf "name: %f\nlocation: %h\n\n"
206+ xargs -n1 -d: <<< "$PATH" | xargs -I{} find -H {} -maxdepth 1 -xtype f -executable -printf "name: %f\nlocation: %h\n\n"
207 true
208
209 id: device
210@@ -191,7 +192,8 @@ _summary: Collect information about the running kernel
211 id: sleep
212 estimated_duration: 0.03
213 plugin: resource
214-command: for state in `cat /sys/power/state`; do echo "$state: supported"; done
215+command:
216+ tr ' ' '\n' < /sys/power/state | while IFS= read -r state; do echo "$state: supported"; done
217 _summary: Create resource info for supported sleep states
218
219 unit: template
220@@ -246,8 +248,8 @@ plugin: resource
221 _summary: Create resource info for environment variables
222 command:
223 IFS=$'\n'
224- for e in `env | sed 's/=/:/g'`; do
225- echo $e | awk -F':' '{print $1 ": " $2}'
226+ for e in $(env | sed 's/=/:/g'); do
227+ echo "$e" | awk -F':' '{print $1 ": " $2}'
228 done
229
230 id: mobilebroadband
231@@ -282,9 +284,11 @@ _summary: Resource job to identify Wi-Fi STA supported protocols
232 _description:
233 Job listing STA supported 802.11 protocols per interfaces.
234 command:
235- for i in `iw dev | grep -oP 'Interface\s+\K\w+'`; do iw phy phy$(iw dev $i info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'VHT' && echo $i"_ac: supported" || echo $i"_ac: unsupported"; done
236+ # shellcheck disable=SC2046
237+ for i in $(iw dev | grep -oP 'Interface\s+\K\w+'); do iw phy phy$(iw dev "$i" info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'VHT' && echo "$i""_ac: supported" || echo "$i""_ac: unsupported"; done
238 # MCS 10 and 11 if present support the ax only 1024-QAM
239- for i in `iw dev | grep -oP 'Interface\s+\K\w+'`; do iw phy phy$(iw dev $i info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'MCS 0-11' && echo $i"_ax: supported" || echo $i"_ax: unsupported"; done
240+ # shellcheck disable=SC2046
241+ for i in $(iw dev | grep -oP 'Interface\s+\K\w+'); do iw phy phy$(iw dev "$i" info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'MCS 0-11' && echo "$i""_ax: supported" || echo "$i""_ax: unsupported"; done
242 estimated_duration: 0.5
243 flags: preserve-locale
244
245@@ -304,8 +308,8 @@ id: requirements
246 estimated_duration: 0.01
247 plugin: resource
248 command:
249- if [ -f $PLAINBOX_SESSION_SHARE/requirements_docs.txt ];then
250- cat $PLAINBOX_SESSION_SHARE/requirements_docs.txt
251+ if [ -f "$PLAINBOX_SESSION_SHARE"/requirements_docs.txt ];then
252+ cat "$PLAINBOX_SESSION_SHARE"/requirements_docs.txt
253 else
254 true
255 fi
256@@ -347,7 +351,7 @@ plugin: resource
257 requires: executable.name == "fwts"
258 _summary: Generate an entry for each FWTS test available
259 command:
260- for test in `checkbox-support-fwts_test --list`; do echo "name: $test"; echo ""; done
261+ for test in $(checkbox-support-fwts_test --list); do echo "name: $test"; echo ""; done
262
263 id: mir
264 estimated_duration: 0.5
265@@ -355,17 +359,18 @@ plugin: resource
266 requires: package.name == "mir-test-tools"
267 _summary: Generate an entry for each MIR integration tests
268 command:
269- for test in `mir_integration_tests --gtest_list_tests | sed -n '/\.$/s/\.$//p'`; do echo "category: integration"; echo "name: $test"; echo ""; done
270- for test in `mir_acceptance_tests --gtest_list_tests | sed -n '/\.$/s/\.$//p'`; do echo "category: acceptance"; echo "name: $test"; echo ""; done
271+ for test in $(mir_integration_tests --gtest_list_tests | sed -n '/\.$/s/\.$//p'); do echo "category: integration"; echo "name: $test"; echo ""; done
272+ for test in $(mir_acceptance_tests --gtest_list_tests | sed -n '/\.$/s/\.$//p'); do echo "category: acceptance"; echo "name: $test"; echo ""; done
273
274 id: wifi_interface_mode
275 estimated_duration: 0.1
276 plugin: resource
277 command:
278- for i in `iw dev | grep -oP 'Interface\s+\K\w+'`;
279- do iw phy phy$(iw dev $i info | grep -oP 'wiphy\s+\K\d+') info |
280+ # shellcheck disable=SC2046
281+ for i in $(iw dev | grep -oP 'Interface\s+\K\w+');
282+ do iw phy phy$(iw dev "$i" info | grep -oP 'wiphy\s+\K\d+') info |
283 grep -Pzo '(?s)Supported interface modes:\n\K(\s+\*\s.*?\n)+' |
284- sed "s/.*\* \(.*\)/"$i"_\1: supported/" | tr -d '\000';
285+ sed "s/.*\* \(.*\)/""$i""_\1: supported/" | tr -d '\000';
286 done
287 _summary: Create resource info for supported wifi interface modes
288
289diff --git a/requirements/container-tests-provider-resource-generic b/requirements/container-tests-provider-resource-generic
290index 8bdb200..678a35c 100755
291--- a/requirements/container-tests-provider-resource-generic
292+++ b/requirements/container-tests-provider-resource-generic
293@@ -14,4 +14,4 @@ echo "I: running 'develop' on checkbox-support"
294 ( cd $TMPDIR/checkbox-support/ && python3 setup.py develop --quiet | sed -e 's/^/I (develop output) /' )
295
296 ./manage.py validate
297-./manage.py test -u
298+./manage.py test
299diff --git a/requirements/deb-base.txt b/requirements/deb-base.txt
300index 4d44ad8..ee93fed 100644
301--- a/requirements/deb-base.txt
302+++ b/requirements/deb-base.txt
303@@ -4,3 +4,4 @@ libnl-genl-3-200
304 libnl-genl-3-dev
305 pkg-config
306 shellcheck
307+flake8

Subscribers

People subscribed via source and target branches