summaryrefslogtreecommitdiff
diff options
-rw-r--r--units/touchpad/jobs.pxu30
-rw-r--r--units/touchpad/test-plan.pxu1
2 files changed, 31 insertions, 0 deletions
diff --git a/units/touchpad/jobs.pxu b/units/touchpad/jobs.pxu
index 2fcdbc3..bb6f596 100644
--- a/units/touchpad/jobs.pxu
+++ b/units/touchpad/jobs.pxu
@@ -218,6 +218,36 @@ _siblings:
[{ "id": "touchpad/continuous-move-after-suspend",
"depends": "suspend/suspend_advanced touchpad/continuous-move" }]
+unit: template
+template-resource: device
+template-filter: device.category == 'TOUCHPAD'
+template-unit: job
+plugin: shell
+category_id: com.canonical.plainbox::touchpad
+id: touchpad/palm-rejection-firmware-labeling_{product_slug}
+requires: device.driver == 'hid-multitouch'
+estimated_duration: 5.0
+command:
+ abs_caps=$(cat </sys{path}/capabilities/abs)
+ abs_caps_hex=$((16#"$abs_caps"))
+ tool_type_bit=$((abs_caps_hex >> 55))
+ support=$((tool_type_bit & 1))
+ if [ $support -eq 1 ]; then
+ exit 0
+ else
+ echo "Touchapd info:"
+ cat </sys{path}/name
+ cat </sys{path}/modalias
+ echo "Touchpad EV_ABS capabilities:"
+ echo "$abs_caps"
+ exit 1
+ fi
+_summary: Touchpad EV_ABS capability check
+_description:
+ Libinput firmware/labeling palm detection rely on touchpad ABS_MT_TOOL_TYPE
+ capability. This test checks touchpad's EV_ABS capability to
+ make sure that firmware/labeling bit is set in touchpad firmware.
+
id: touchpad/palm-rejection
plugin: user-interact
category_id: com.canonical.plainbox::touchpad
diff --git a/units/touchpad/test-plan.pxu b/units/touchpad/test-plan.pxu
index 188e7f2..39769d0 100644
--- a/units/touchpad/test-plan.pxu
+++ b/units/touchpad/test-plan.pxu
@@ -30,6 +30,7 @@ _description:
Touchpad tests (Automated)
include:
touchpad/detected-as-mouse certification-status=blocker
+ touchpad/palm-rejection-firmware-labeling_.* certification-status=blocker
id: after-suspend-touchpad-cert-full