summaryrefslogtreecommitdiff
path: root/units
diff options
authorPMR <pmr@pmr-lander>2020-01-20 16:40:43 +0000
committerPMR <pmr@pmr-lander>2020-01-20 16:40:43 +0000
commitd0dc0398c90ab29741086e5dc6a314e2ce8f2b37 (patch)
tree008783377f1278bcf1470d657a7112a7652e84d3 /units
parent69670792f8fd513e69ca9a4a89a357f6bcbbf07b (diff)
parent3ae426572dec6b19f77c5504b9de3e47c35e6fa5 (diff)
Merge #377818 from ~jocave/plainbox-provider-checkbox:picamera-testing
Diffstat (limited to 'units')
-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 0605d18..d7ad2aa 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 0000000..de12798
--- /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 578a7ce..c3b8378 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