diff options
Diffstat (limited to 'units')
-rw-r--r-- | units/camera/jobs.pxu | 31 | ||||
-rw-r--r-- | units/camera/packaging.pxu | 15 | ||||
-rw-r--r-- | units/camera/test-plan.pxu | 1 |
3 files changed, 46 insertions, 1 deletions
diff --git a/units/camera/jobs.pxu b/units/camera/jobs.pxu index 331f2db..c9f2451 100644 --- a/units/camera/jobs.pxu +++ b/units/camera/jobs.pxu @@ -131,4 +131,33 @@ command: _description: Takes multiple pictures based on the resolutions supported by the camera and validates their size and that they are of a valid format. -user: root \ No newline at end of file +user: root + +unit: template +template-engine: jinja2 +template-resource: device +template-filter: device.category in ('CAPTURE', 'MMAL') and device.name != '' +template-unit: job +plugin: shell +category_id: com.canonical.plainbox::camera +id: camera/roundtrip-qrcode_{{ name }} +_summary: Test video output and camera {{ name }} by displaying and reading a qrcode +estimated_duration: 5.0 +requires: + {%- if __on_ubuntucore__ %} + lsb.release >= '19.1' + {%- else %} + lsb.release >= '19.1' + package.name == 'python3-zbar' + package.name == 'python3-pyqrcode' + package.name == 'python3-pil' + {% endif -%} +command: + roundtrip_qr.py {{ name }} +_description: + Generates a QRcode representing a random string of ascii letters. This is + written to tty1 using ascii escape codes. Either the PiCamera python module or + a gstreamer pipeline is used to capture an image of the display. An attempt + to decode a QRcode in the image is then made and data compared against the + random string. +user: root diff --git a/units/camera/packaging.pxu b/units/camera/packaging.pxu new file mode 100644 index 0000000..0b90c61 --- /dev/null +++ b/units/camera/packaging.pxu @@ -0,0 +1,15 @@ +# For camera/roundtrip-qrcode_.* +unit: packaging meta-data +os-id: ubuntu +Depends: python3-zbar + +# For camera/roundtrip-qrcode_.* +unit: packaging meta-data +os-id: ubuntu +Depends: python3-pil + +# For camera/roundtrip-qrcode_.* +unit: packaging meta-data +os-id: ubuntu +Depends: python3-pyqrcode + diff --git a/units/camera/test-plan.pxu b/units/camera/test-plan.pxu index c3b8378..d69706c 100644 --- a/units/camera/test-plan.pxu +++ b/units/camera/test-plan.pxu @@ -84,5 +84,6 @@ estimated_duration: 1h30m include: camera/multiple-resolution-images-_.* camera/multiple-resolution-images-rpi_.* + camera/roundtrip-qrcode_.* bootstrap_include: device |