summaryrefslogtreecommitdiff
path: root/units/camera
diff options
authorJonathan Cave <jonathan.cave@canonical.com>2020-01-17 11:12:16 +0000
committerJonathan Cave <jonathan.cave@canonical.com>2020-01-20 16:31:29 +0000
commite599b6260ab47e0b553a121d333a23c167f4e968 (patch)
tree579af9024f16a66ec369a13dda806581e89dd3b3 /units/camera
parent94e2818dbebf3d947327844bc2efb2aae680ebda (diff)
camera: tests specific to RPi camera
Diffstat (limited to 'units/camera')
-rw-r--r--units/camera/jobs.pxu30
-rw-r--r--units/camera/manifest.pxu4
-rw-r--r--units/camera/test-plan.pxu26
3 files changed, 59 insertions, 1 deletions
diff --git a/units/camera/jobs.pxu b/units/camera/jobs.pxu
index 0605d182..d7ad2aa4 100644
--- a/units/camera/jobs.pxu
+++ b/units/camera/jobs.pxu
@@ -6,7 +6,19 @@ requires:
device.category == 'CAPTURE'
command:
camera_test detect
-_description: This Automated test attempts to detect a camera.
+_summary: This Automated test attempts to detect a camera.
+user: root
+
+plugin: shell
+category_id: com.canonical.plainbox::camera
+id: camera/detect-rpi
+estimated_duration: 1.0
+imports: from com.canonical.plainbox import manifest
+requires:
+ manifest.has_rpi_camera == 'True'
+command:
+ udev_resource -f MMAL | grep "category: MMAL"
+_summary: Detect presence of a MMAL camera.
unit: template
template-resource: device
@@ -103,3 +115,19 @@ _description:
Takes multiple pictures based on the resolutions supported by the camera and
validates their size and that they are of a valid format.
+unit: template
+template-resource: device
+template-filter: device.category == 'MMAL' and device.name != ''
+template-unit: job
+plugin: shell
+category_id: com.canonical.plainbox::camera
+id: camera/multiple-resolution-images-rpi_{name}
+_summary: Webcam multiple resolution capture test for Pi Camera
+estimated_duration: 16.0
+depends: camera/detect-rpi
+command:
+ camera_test_rpi.py --device /dev/{name}
+_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
diff --git a/units/camera/manifest.pxu b/units/camera/manifest.pxu
new file mode 100644
index 00000000..de127989
--- /dev/null
+++ b/units/camera/manifest.pxu
@@ -0,0 +1,4 @@
+unit: manifest entry
+id: has_rpi_camera
+_name: RaspberryPi Camera Module
+value-type: bool \ No newline at end of file
diff --git a/units/camera/test-plan.pxu b/units/camera/test-plan.pxu
index 578a7ce7..c3b8378b 100644
--- a/units/camera/test-plan.pxu
+++ b/units/camera/test-plan.pxu
@@ -60,3 +60,29 @@ include:
after-suspend-manual-camera/display_.* certification-status=blocker
bootstrap_include:
device
+
+id: camera-full
+unit: test plan
+_name: Camera tests
+_description: Camera tests for Ubuntu Core devices
+include:
+nested_part:
+ camera-automated
+ camera-manual
+
+id: camera-manual
+unit: test plan
+_name: Manual camera tests
+_description: Manual camera tests for Ubuntu Core devices
+include:
+
+id: camera-automated
+unit: test plan
+_name: Automated camera tests
+_description: Automated camera tests for Ubuntu Core devices
+estimated_duration: 1h30m
+include:
+ camera/multiple-resolution-images-_.*
+ camera/multiple-resolution-images-rpi_.*
+bootstrap_include:
+ device