diff options
author | Jonathan Cave <jonathan.cave@canonical.com> | 2019-12-04 11:32:20 +0000 |
---|---|---|
committer | Jonathan Cave <jonathan.cave@canonical.com> | 2019-12-05 08:58:16 +0000 |
commit | a107f657dca22794a7cf0ea3e06996445bea6bae (patch) | |
tree | 2730048e4d62e751d2dd143809d2fd23387b6f3d | |
parent | 36da3465c30a13e4273844cfebe7332c4000c152 (diff) |
usb: add detect job for preinserted storage
Adds the detect job, a manifest entry and the test plan modifications
-rw-r--r-- | units/usb/manifest.pxu | 5 | ||||
-rw-r--r-- | units/usb/test-plan.pxu | 2 | ||||
-rw-r--r-- | units/usb/usb.pxu | 13 |
3 files changed, 20 insertions, 0 deletions
diff --git a/units/usb/manifest.pxu b/units/usb/manifest.pxu index 914e892..fef1a64 100644 --- a/units/usb/manifest.pxu +++ b/units/usb/manifest.pxu @@ -2,3 +2,8 @@ unit: manifest entry id: has_usb_type_c _name: USB Type-C Support value-type: bool + +unit: manifest entry +id: has_usb_storage +_name: USB Storage Device Connected +value-type: bool diff --git a/units/usb/test-plan.pxu b/units/usb/test-plan.pxu index f177798..02dc6e5 100644 --- a/units/usb/test-plan.pxu +++ b/units/usb/test-plan.pxu @@ -221,6 +221,7 @@ unit: test plan _name: Automated USB tests _description: Automated USB tests for Snappy Ubuntu Core devices include: + usb/storage-detect usb/storage-preinserted-.* bootstrap_include: removable_partition @@ -326,6 +327,7 @@ unit: test plan _name: Automated USB tests _description: Automated USB tests for Snappy Ubuntu Core devices include: + after-suspend-usb/storage-detect after-suspend-usb/storage-preinserted-.* bootstrap_include: removable_partition diff --git a/units/usb/usb.pxu b/units/usb/usb.pxu index 670f649..ed3de93 100644 --- a/units/usb/usb.pxu +++ b/units/usb/usb.pxu @@ -291,6 +291,18 @@ _description: This test will check that your USB 2.0 port transfers data at a minimum expected speed. +id: usb/storage-detect +category_id: com.canonical.plainbox::usb +plugin: shell +_summary: Detect storage partitions on a device on the USB bus +command: + udev_resource -f PARTITION | grep "bus: usb" +estimated_duration: 1.0 +flags: also-after-suspend +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_usb_storage == 'True' + unit: template template-resource: removable_partition template-filter: "usb" in removable_partition.bus @@ -308,6 +320,7 @@ _description: Tests USB 2.0 or 1.1 ports on a system by doing write/read/compare tests on randomly created data. It requires that a USB stick is plugged into an available USB port before running the certification suite. +depends: usb/storage-detect id: usb/hid _summary: USB keyboard works |