Merge ~alextu/plainbox-provider-pc-sanity:check_hid_i2c into plainbox-provider-pc-sanity:master

Proposed by Alex Tu
Status: Merged
Merged at revision: 5f15001d4a9e52509498b21a4b7d7d9155a13d40
Proposed branch: ~alextu/plainbox-provider-pc-sanity:check_hid_i2c
Merge into: plainbox-provider-pc-sanity:master
Diff against target: 32 lines (+15/-0)
2 files modified
usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-check-devices.pxu (+14/-0)
usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-smoke-test.pxu (+1/-0)
Reviewer Review Type Date Requested Status
Shih-Yuan Lee Approve
Yuan-Chen Cheng Pending
You-Sheng Yang Pending
OEM Solutions Group: Engineers Pending
Review via email: mp+382358@code.launchpad.net

Description of the change

check if hid_i2c be loaded

To post a comment you must log in.
Revision history for this message
Alex Tu (alextu) wrote :
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

Regarding https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1834619, executing `dmesg | grep i2c | grep input` is a better way to check the i2c device.

review: Needs Fixing
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-check-devices.pxu b/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-check-devices.pxu
2new file mode 100644
3index 0000000..403ad2e
4--- /dev/null
5+++ b/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-check-devices.pxu
6@@ -0,0 +1,14 @@
7+plugin: shell
8+category_id: com.canonical.plainbox::miscellanea
9+id: miscellanea/check_i2c_hid
10+command:
11+ set -x
12+ if sudo dmidecode -t 3 | grep -i "Notebook\|Laptop"; then
13+ dmesg | grep i2c | grep input || exit 1
14+ else
15+ echo "this machine is not laptop, no need to check i2c touchpad"
16+ fi
17+_summary: check if i2c device exists
18+_description:
19+ check if i2c device exists
20+
21diff --git a/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-smoke-test.pxu b/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-smoke-test.pxu
22index ecf351f..42d14e7 100644
23--- a/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-smoke-test.pxu
24+++ b/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-smoke-test.pxu
25@@ -8,6 +8,7 @@ include:
26 com.canonical.certification::miscellanea/thermal
27 com.canonical.certification::miscellanea/dump_libsmbios_tokens
28 com.canonical.certification::miscellanea/dump_libsmbios_tokens_attachment
29+ com.canonical.certification::miscellanea/check_i2c_hid
30 nested_part:
31 com.canonical.certification::client-cert-auto
32 bootstrap_include:

Subscribers

People subscribed via source and target branches