summaryrefslogtreecommitdiff
path: root/units/camera
diff options
authorJonathan Cave <jonathan.cave@canonical.com>2018-06-13 12:07:06 +0100
committerJonathan Cave <jonathan.cave@canonical.com>2018-06-14 16:53:19 +0100
commit32dcfbbe4dc12f4698982728acedf80d411bb5dd (patch)
tree45809ade7dfe2c170c1344e21ad6a253fcc1b311 /units/camera
parent4ba088e8272fae98bacc9b975897c6263ae4195a (diff)
camera: remove legacy test, requires for ubuntucore
Diffstat (limited to 'units/camera')
-rw-r--r--units/camera/jobs.pxu24
1 files changed, 20 insertions, 4 deletions
diff --git a/units/camera/jobs.pxu b/units/camera/jobs.pxu
index 4db52223..e67e876c 100644
--- a/units/camera/jobs.pxu
+++ b/units/camera/jobs.pxu
@@ -4,7 +4,8 @@ id: camera/detect
estimated_duration: 1.2
requires:
device.category == 'CAPTURE'
-command: if [ "`lsb_release -c | awk {'print $2'}`" == "precise" ]; then camera_test_legacy detect; else camera_test detect; fi
+command:
+ camera_test detect
_description: This Automated test attempts to detect a camera.
plugin: user-interact-verify
@@ -14,7 +15,8 @@ estimated_duration: 120.0
depends: camera/detect
requires:
device.category == 'CAPTURE'
-command: if [ "`lsb_release -c | awk {'print $2'}`" == "precise" ]; then camera_test_legacy display; else camera_test display; fi
+command:
+ camera_test display
_description:
PURPOSE:
This test will check that the built-in camera works
@@ -24,16 +26,23 @@ _description:
Did you see the video capture?
plugin: user-interact-verify
+template-engine: jinja2
category_id: com.canonical.plainbox::camera
id: camera/still
estimated_duration: 120.0
depends: camera/detect
requires:
+ {%- if __on_ubuntucore__ %}
+ executable.name == 'fswebcam'
+ device.category == 'CAPTURE'
+ {%- else %}
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
package.name == 'eog'
package.name == 'fswebcam' or package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
device.category == 'CAPTURE'
-command: if [ "`lsb_release -c | awk {'print $2'}`" == "precise" ]; then camera_test_legacy still; else camera_test still; fi
+ {% endif -%}
+command:
+ camera_test still
_description:
PURPOSE:
This test will check that the built-in camera works
@@ -43,14 +52,21 @@ _description:
Did you see the image?
plugin: shell
+template-engine: jinja2
category_id: com.canonical.plainbox::camera
id: camera/multiple-resolution-images
estimated_duration: 1.2
depends: camera/detect
requires:
+ {%- if __on_ubuntucore__ %}
+ executable.name == 'fswebcam'
+ device.category == 'CAPTURE'
+ {%- else %}
package.name == 'fswebcam' or package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
device.category == 'CAPTURE'
-command: if [ "`lsb_release -c | awk {'print $2'}`" == "precise" ]; then camera_test_legacy resolutions; else camera_test resolutions; fi
+ {% endif -%}
+command:
+ camera_test resolutions
_description:
Takes multiple pictures based on the resolutions supported by the camera and
validates their size and that they are of a valid format.