summaryrefslogtreecommitdiff
diff options
authorSylvain Pineau <sylvain.pineau@canonical.com>2020-09-30 10:26:01 +0200
committerSylvain Pineau <sylvain.pineau@canonical.com>2020-09-30 10:26:01 +0200
commit847a3e06b7bf5b341d519672fc87acfb028e9408 (patch)
tree98c047ad1a547a5967ed2d85d50910318584a9a1
parent103d20732c0b59777cc29d8ac9760e66a0854fe1 (diff)
units:camera: Use a new manifest to trigger the camera/detect job, has_camera
-rw-r--r--units/camera/jobs.pxu3
-rw-r--r--units/camera/manifest.pxu7
2 files changed, 8 insertions, 2 deletions
diff --git a/units/camera/jobs.pxu b/units/camera/jobs.pxu
index 7c0b1d0..42a8413 100644
--- a/units/camera/jobs.pxu
+++ b/units/camera/jobs.pxu
@@ -2,8 +2,9 @@ plugin: shell
category_id: com.canonical.plainbox::camera
id: camera/detect
estimated_duration: 1.2
+imports: from com.canonical.plainbox import manifest
requires:
- device.category == 'CAPTURE'
+ manifest.has_camera == 'True'
command:
camera_test.py detect
_summary: This Automated test attempts to detect a camera.
diff --git a/units/camera/manifest.pxu b/units/camera/manifest.pxu
index de12798..ed79336 100644
--- a/units/camera/manifest.pxu
+++ b/units/camera/manifest.pxu
@@ -1,4 +1,9 @@
unit: manifest entry
id: has_rpi_camera
_name: RaspberryPi Camera Module
-value-type: bool \ No newline at end of file
+value-type: bool
+
+unit: manifest entry
+id: has_camera
+_name: Camera/Capture Device
+value-type: bool