summaryrefslogtreecommitdiff
diff options
authorMaciej Kisielewski <maciej.kisielewski@canonical.com>2022-05-03 22:51:45 +0000
committerMaciej Kisielewski <maciej.kisielewski@canonical.com>2022-05-08 14:56:35 +0000
commit9df63071d03df2bd89d5c42691e8117b5324fa4f (patch)
treefdb24b24f24e1fcad1f70dec2de1abbb88aea70e
parent23690b465167c38e8a977358c6998a844ebbd8bb (diff)
Add: Zapper-enabled usb insertion and removal jobs
-rw-r--r--units/zapper/jobs.pxu36
-rw-r--r--units/zapper/test-plan.pxu2
2 files changed, 38 insertions, 0 deletions
diff --git a/units/zapper/jobs.pxu b/units/zapper/jobs.pxu
index acf65f1..5850476 100644
--- a/units/zapper/jobs.pxu
+++ b/units/zapper/jobs.pxu
@@ -5,3 +5,39 @@ estimated_duration: 60
_summary: Check if the system automatically changes the resolution based on EDID
environ: ZAPPER_HOST
command: edid_cycle.py "$ZAPPER_HOST"
+
+unit: template
+template-resource: zapper_capabilities
+template-filter: zapper_capabilities.capability == 'USB hotplug' and zapper_capabilities.usb_version == '3'
+id: usb3/zapper-usb-insert-{{ port_alias }}
+template-engine: jinja2
+_summary: Zapper-driven USB insertion test on port {{ port_alias }}
+requires: usb.usb3 == 'supported'
+plugin: shell
+user: root
+environ: ZAPPER_ADDRESS
+command:
+ {%- if __on_ubuntucore__ %}
+ checkbox-support-run_watcher --zapper-usb-address={{ port_alias }} insertion usb3
+ {%- else %}
+ removable_storage_watcher.py --unmounted -m 500000000 --zapper-usb-address={{ port_alias }} insert usb
+ {% endif -%}
+estimated_duration: 20
+
+unit: template
+template-resource: zapper_capabilities
+template-filter: zapper_capabilities.capability == 'USB hotplug' and zapper_capabilities.usb_version == '3'
+id: usb3/zapper-usb-remove-{{ port_alias }}
+template-engine: jinja2
+_summary: Zapper-driven USB removal test on port {{ port_alias }}
+requires: usb.usb3 == 'supported'
+plugin: shell
+user: root
+environ: ZAPPER_ADDRESS
+command:
+ {%- if __on_ubuntucore__ %}
+ checkbox-support-run_watcher --zapper-usb-address={{ port_alias }} removal usb3
+ {%- else %}
+ removable_storage_watcher.py --unmounted -m 500000000 --zapper-usb-address={{ port_alias }} remove usb
+ {% endif -%}
+estimated_duration: 20
diff --git a/units/zapper/test-plan.pxu b/units/zapper/test-plan.pxu
index db7ded7..889fb50 100644
--- a/units/zapper/test-plan.pxu
+++ b/units/zapper/test-plan.pxu
@@ -12,5 +12,7 @@ _name: Tests using Zapper
_description: Tests using Zapper
include:
monitor/zapper-edid
+ usb3/zapper-usb-insert-.*
+ usb3/zapper-usb-remove-.*
bootstrap_include:
zapper_capabilities