From cf516d543ae166e122ee849ff9219718eb4ab3be Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Tue, 25 Sep 2018 09:04:21 +0200 Subject: units:camera: Use template jobs to drive V4L devices Using templates will help to test systems with multiple webcams. Example: IR + HD webcams. Note: - After-suspend-manual flags added to the new jobs. --- units/camera/jobs.pxu | 58 +++++++++++++++++++++++++++++++---------- units/camera/test-plan.pxu | 35 +++++++++++++++---------- units/led/jobs.pxu | 15 ----------- units/led/test-plan.pxu | 8 ++++-- units/suspend/suspend.pxu | 65 ---------------------------------------------- 5 files changed, 72 insertions(+), 109 deletions(-) (limited to 'units') diff --git a/units/camera/jobs.pxu b/units/camera/jobs.pxu index 4219462..b1e4b9c 100644 --- a/units/camera/jobs.pxu +++ b/units/camera/jobs.pxu @@ -8,65 +8,95 @@ command: camera_test detect _description: This Automated test attempts to detect a camera. +unit: template +template-resource: device +template-filter: device.category == 'CAPTURE' and device.name != '' +template-unit: job plugin: user-interact-verify category_id: com.canonical.plainbox::camera -id: camera/display +id: camera/display_{name} +_summary: Webcam video display test for {product_slug} estimated_duration: 120.0 depends: camera/detect -requires: - device.category == 'CAPTURE' command: - camera_test display + camera_test display -d /dev/{name} _description: PURPOSE: - This test will check that the built-in camera works + This test will check that the {product_slug} camera works STEPS: 1. Click on Test to display a video capture from the camera for ten seconds. VERIFICATION: Did you see the video capture? +unit: template +template-resource: device +template-filter: device.category == 'CAPTURE' and device.name != '' +template-unit: job +plugin: user-interact-verify +category_id: com.canonical.plainbox::camera +id: camera/led_{name} +_summary: Webcam LED test for {product_slug} +estimated_duration: 120.0 +depends: camera/detect +command: + camera_test led -d /dev/{name} +_description: + PURPOSE: + This test will check that the {product_slug} camera LED works + STEPS: + 1. Select Test to activate camera + 2. Camera LED should light for a few seconds + VERIFICATION: + Did the camera LED light? + +unit: template +template-resource: device +template-filter: device.category == 'CAPTURE' and device.name != '' +template-unit: job plugin: user-interact-verify template-engine: jinja2 category_id: com.canonical.plainbox::camera -id: camera/still +id: camera/still_{{ name }} +_summary: Webcam still image capture test for {{ product_slug }} 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-1.0' package.name == 'eog' package.name == 'fswebcam' or package.name == 'gir1.2-gst-plugins-base-1.0' - device.category == 'CAPTURE' {% endif -%} command: - camera_test still + camera_test still -d /dev/{{ name }} _description: PURPOSE: - This test will check that the built-in camera works + This test will check that the {{ product_slug }} works STEPS: 1. Click on Test to display a still image from the camera for ten seconds. VERIFICATION: Did you see the image? +unit: template +template-resource: device +template-filter: device.category == 'CAPTURE' and device.name != '' +template-unit: job plugin: shell template-engine: jinja2 category_id: com.canonical.plainbox::camera -id: camera/multiple-resolution-images +id: camera/multiple-resolution-images_{{ name }} +_summary: Webcam multiple resolution capture test for {{ product_slug }} 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-1.0' - device.category == 'CAPTURE' {% endif -%} command: - camera_test resolutions + camera_test resolutions -d /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. diff --git a/units/camera/test-plan.pxu b/units/camera/test-plan.pxu index e4302be..578a7ce 100644 --- a/units/camera/test-plan.pxu +++ b/units/camera/test-plan.pxu @@ -14,40 +14,49 @@ _name: Camera tests (Manual) _description: Camera tests (Manual) include: - camera/still certification-status=blocker - camera/display certification-status=blocker - + camera/still_.* certification-status=blocker + camera/display_.* certification-status=blocker +bootstrap_include: + device id: after-suspend-camera-cert-full unit: test plan _name: Camera tests (after suspend) _description: Camera tests (after suspend) include: - camera/display_after_suspend certification-status=blocker - camera/still_after_suspend certification-status=blocker + after-suspend-manual-camera/still_.* certification-status=blocker + after-suspend-manual-camera/display_.* certification-status=blocker +bootstrap_include: + device id: camera-cert-automated unit: test plan _name: Camera tests (automated) _description: Camera tests (automated) include: - camera/detect certification-status=blocker - camera/multiple-resolution-images certification-status=blocker + camera/detect certification-status=blocker + camera/multiple-resolution-images_.* certification-status=blocker +bootstrap_include: + device id: camera-cert-blockers unit: test plan _name: Camera tests (certification blockers only) _description: Camera tests (certification blockers only) include: - camera/detect certification-status=blocker - camera/still certification-status=blocker - camera/display certification-status=blocker - camera/multiple-resolution-images certification-status=blocker + camera/detect certification-status=blocker + camera/still_.* certification-status=blocker + camera/display_.* certification-status=blocker + camera/multiple-resolution-images_.* certification-status=blocker +bootstrap_include: + device id: after-suspend-camera-cert-blockers unit: test plan _name: Camera tests (after suspend, certification blockers only) _description: Camera tests (after suspend, certification blockers only) include: - camera/display_after_suspend certification-status=blocker - camera/still_after_suspend certification-status=blocker + after-suspend-manual-camera/still_.* certification-status=blocker + after-suspend-manual-camera/display_.* certification-status=blocker +bootstrap_include: + device diff --git a/units/led/jobs.pxu b/units/led/jobs.pxu index 15d3065..2c2ea16 100644 --- a/units/led/jobs.pxu +++ b/units/led/jobs.pxu @@ -171,21 +171,6 @@ plugin: manual category_id: led estimated_duration: 180 -plugin: user-interact-verify -category_id: led -id: led/camera -estimated_duration: 20.0 -depends: camera/detect -command: camera_test led -_description: - PURPOSE: - Camera LED verification - STEPS: - 1. Select Test to activate camera - 2. Camera LED should light for a few seconds - VERIFICATION: - Did the camera LED light? - plugin: manual category_id: led id: led/touchpad diff --git a/units/led/test-plan.pxu b/units/led/test-plan.pxu index 88d38a6..0329717 100644 --- a/units/led/test-plan.pxu +++ b/units/led/test-plan.pxu @@ -25,10 +25,12 @@ include: led/battery-charged led/battery-charging led/battery-low - led/camera + camera/led_.* led/caps-lock led/power led/touchpad +bootstrap_include: + device id: led-cert-automated unit: test plan @@ -50,10 +52,12 @@ include: suspend/led_after_suspend/battery-charged suspend/led_after_suspend/battery-charging suspend/led_after_suspend/battery-low - suspend/led_after_suspend/camera + after-suspend-manual-camera/led_.* suspend/led_after_suspend/caps-lock suspend/led_after_suspend/power suspend/led_after_suspend/touchpad +bootstrap_include: + device id: led-full unit: test plan diff --git a/units/suspend/suspend.pxu b/units/suspend/suspend.pxu index 1ab5829..0c3a942 100644 --- a/units/suspend/suspend.pxu +++ b/units/suspend/suspend.pxu @@ -1449,23 +1449,6 @@ _description: VERIFICATION: Did the bluetooth LED turn off and on twice after resuming from suspend? -plugin: user-interact-verify -category_id: com.canonical.plainbox::suspend -id: suspend/led_after_suspend/camera -estimated_duration: 120.0 -depends: - camera/detect - suspend/suspend_advanced -command: camera_test led -_description: - PURPOSE: - Validate that the camera LED still works as expected after resuming from suspend - STEPS: - 1. Select Test to activate camera - 2. Camera LED should light for a few seconds - VERIFICATION: - Did the camera LED still turn on and off after resuming from suspend? - plugin: manual category_id: com.canonical.plainbox::suspend id: suspend/led_after_suspend/touchpad @@ -2090,54 +2073,6 @@ _description: VERIFICATION: Does tap recognition work? -plugin: user-interact-verify -category_id: com.canonical.plainbox::suspend -id: camera/display_after_suspend -estimated_duration: 120.0 -depends: suspend/suspend_advanced -requires: - device.category == 'CAPTURE' -command: camera_test display -_description: - PURPOSE: - This test will check that the built-in camera works after suspend - STEPS: - 1. Click on Test to display a video capture from the camera for ten seconds. - VERIFICATION: - Did you see the video capture? - -plugin: user-interact-verify -category_id: com.canonical.plainbox::suspend -id: camera/still_after_suspend -estimated_duration: 120.0 -depends: camera/display_after_suspend -requires: - 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: camera_test still -_description: - PURPOSE: - This test will check that the built-in camera works after suspend - STEPS: - 1. Click on Test to display a still image from the camera for ten seconds. - VERIFICATION: - Did you see the image? - -plugin: shell -category_id: com.canonical.plainbox::suspend -id: camera/multiple_resolution_after_suspend -estimated_duration: 1.2 -depends: camera/still_after_suspend -requires: - 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: 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 after suspend - unit: template template-resource: device template-filter: device.category == 'MOUSE' or device.category == 'TOUCHPAD' or device.category == 'TOUCHSCREEN' -- cgit v1.2.3 From edad60469515d344472f79f7a3e46a23705814b0 Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Tue, 25 Sep 2018 09:04:47 +0200 Subject: units:misc: CAPTURE devices added to miscellanea/device_check --- units/miscellanea/jobs.pxu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'units') diff --git a/units/miscellanea/jobs.pxu b/units/miscellanea/jobs.pxu index 7ddcc1b..6733a16 100644 --- a/units/miscellanea/jobs.pxu +++ b/units/miscellanea/jobs.pxu @@ -354,7 +354,7 @@ plugin: user-interact-verify category_id: com.canonical.plainbox::miscellanea estimated_duration: 5.0 id: miscellanea/device_check -command: udev_resource -l VIDEO NETWORK WIRELESS DISK ACCELEROMETER | tee >([[ $DISPLAY ]] && zenity --text-info --title="Device report") +command: udev_resource -l VIDEO NETWORK WIRELESS DISK CAPTURE ACCELEROMETER | tee >([[ $DISPLAY ]] && zenity --text-info --title="Device report") _summary: Device Check _purpose: Device check -- cgit v1.2.3 From 40ffa6cf000ab0ace465167d25ab3b9c18c3b312 Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Fri, 5 Oct 2018 05:21:03 +0200 Subject: units:camera: Remove the unnecessary dep on libcheese --- units/camera/packaging.pxu | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 units/camera/packaging.pxu (limited to 'units') diff --git a/units/camera/packaging.pxu b/units/camera/packaging.pxu deleted file mode 100644 index bb12d64..0000000 --- a/units/camera/packaging.pxu +++ /dev/null @@ -1,3 +0,0 @@ -unit: packaging meta-data -os-id: debian -Depends: gir1.2-cheese-3.0 -- cgit v1.2.3