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

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 2bcc89298dcd62896995b90ff90d5ef22c7c986d
Merged at revision: 5258219ef8fd27d9c42ca04e155be4b870972543
Proposed branch: ~sylvain-pineau/plainbox-provider-resource:fix-1851473
Merge into: plainbox-provider-resource:master
Diff against target: 29 lines (+6/-5)
1 file modified
jobs/resource.pxu (+6/-5)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+375203@code.launchpad.net

Description of the change

Fixes linked bug

ID: com.canonical.certification::usb
Category: com.canonical.plainbox::uncategorised
... 8< -------------------------------------------------------------------------
 WARNING: Failure to read usb.ids
(<class 'FileNotFoundError'>, FileNotFoundError(2, 'No such file or directory'), <traceback object at 0x7fb0288a1048>)
usb2: supported
 WARNING: Failure to read usb.ids
(<class 'FileNotFoundError'>, FileNotFoundError(2, 'No such file or directory'), <traceback object at 0x7f095acedfc8>)
usb3: unsupported

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

self-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/resource.pxu b/jobs/resource.pxu
2index b4adb11..a520deb 100644
3--- a/jobs/resource.pxu
4+++ b/jobs/resource.pxu
5@@ -218,6 +218,7 @@ requires: package.name == "x11-xserver-utils"
6 _summary: Creates display resource info from xrandr output
7
8 id: usb
9+template-engine: jinja2
10 estimated_duration: 0.33
11 plugin: resource
12 _description: Creates resource info for supported USB versions
13@@ -225,11 +226,11 @@ _summary: Collect information about supported types of USB
14 command:
15 for version in 2 3; do
16 echo -n "usb$version: "
17- if [[ -v SNAP ]]; then
18- checkbox-support-lsusb -f $SNAP/checkbox-runtime/var/lib/usbutils/usb.ids | grep -q "Linux Foundation ${version}.00 root hub" && echo "supported" || echo "unsupported"
19- else
20- lsusb | grep -q "Linux Foundation ${version}.0 root hub" && echo "supported" || echo "unsupported"
21- fi
22+ {%- if __on_ubuntucore__ %}
23+ checkbox-support-lsusb -f $SNAP/checkbox-runtime/var/lib/usbutils/usb.ids | grep -q "Linux Foundation ${version}.00 root hub" && echo "supported" || echo "unsupported"
24+ {%- else %}
25+ lsusb | grep -q "Linux Foundation ${version}.0 root hub" && echo "supported" || echo "unsupported"
26+ {% endif -%}
27 done
28
29 id: xinput

Subscribers

People subscribed via source and target branches