From 042bf39bb2058e36f88df5d89155c3c4dbb6fe9e Mon Sep 17 00:00:00 2001 From: Maciej Kisielewski Date: Tue, 1 Mar 2022 13:38:25 +0000 Subject: Fix: make edid_cycle test compliant with current zapper --- bin/edid_cycle.py | 9 +++------ units/pig/jobs.pxu | 8 -------- units/pig/resource.pxu | 5 ----- units/pig/test-plan.pxu | 16 ---------------- units/zapper/jobs.pxu | 7 +++++++ units/zapper/resource.pxu | 5 +++++ units/zapper/test-plan.pxu | 16 ++++++++++++++++ 7 files changed, 31 insertions(+), 35 deletions(-) delete mode 100644 units/pig/jobs.pxu delete mode 100644 units/pig/resource.pxu delete mode 100644 units/pig/test-plan.pxu create mode 100644 units/zapper/jobs.pxu create mode 100644 units/zapper/resource.pxu create mode 100644 units/zapper/test-plan.pxu diff --git a/bin/edid_cycle.py b/bin/edid_cycle.py index e327cb0..64069cf 100755 --- a/bin/edid_cycle.py +++ b/bin/edid_cycle.py @@ -3,12 +3,10 @@ This program tests whether the system changes the resolution automatically when supplied with a new EDID information. -To run the test RaspberryPi equipped with a HDMI->CSI-2 bridge is needed. See -here for details: -https://docs.google.com/document/d/1kjgaazt2IMskn_HPjN7adXYx1O5zXc39DRayZ0PYh9Y +To run the test you need Zapper board connected and set up. The command-line argument for the program is the address of the RaspberryPi -Host (optionally with a username), e.g.: pi@192.168.1.100 +Host (optionally with a username), e.g.: ubuntu@192.168.1.100 """ import os import re @@ -28,8 +26,7 @@ def check_resolution(): def change_edid(host, edid_file): with open(edid_file, 'rb') as f: - cmd = ['ssh', host, '/snap/bin/pigbox', 'run', - '\'v4l2-ctl --set-edid=file=-,' + cmd = ['ssh', host, '\'v4l2-ctl --set-edid=file=-,' 'format=raw --fix-edid-checksums\''] subprocess.check_output(cmd, input=f.read()) diff --git a/units/pig/jobs.pxu b/units/pig/jobs.pxu deleted file mode 100644 index b3702ab..0000000 --- a/units/pig/jobs.pxu +++ /dev/null @@ -1,8 +0,0 @@ -id: monitor/pig-edid -category_id: com.canonical.plainbox::monitor -plugin: shell -estimated_duration: 60 -_summary: Check if the system automatically changes the resolution based on EDID -requires: pig.hdmi_bridge == 'installed' -environ: PIG_HOST -command: edid_cycle.py "$PIG_HOST" diff --git a/units/pig/resource.pxu b/units/pig/resource.pxu deleted file mode 100644 index 81b9d19..0000000 --- a/units/pig/resource.pxu +++ /dev/null @@ -1,5 +0,0 @@ -id: pig -plugin: resource -_summary: Get Pig's capabilities -environ: PIG_HOST -command: ssh -q -o 'StrictHostKeyChecking=no' "$PIG_HOST" /snap/bin/pigbox capabilities diff --git a/units/pig/test-plan.pxu b/units/pig/test-plan.pxu deleted file mode 100644 index 071a927..0000000 --- a/units/pig/test-plan.pxu +++ /dev/null @@ -1,16 +0,0 @@ -id: pig-enabled-full -unit: test plan -_name: Tests using Pi Testing Rig -_description: Tests using Pi Testing Rig -include: -nested_part: - pig-enabled-automated - -id: pig-enabled-automated -unit: test plan -_name: Tests using Pi Testing Rig (Automated) -_description: Tests using Pi Testing Rig (Automated) -include: - monitor/pig-edid -bootstrap_include: - pig diff --git a/units/zapper/jobs.pxu b/units/zapper/jobs.pxu new file mode 100644 index 0000000..acf65f1 --- /dev/null +++ b/units/zapper/jobs.pxu @@ -0,0 +1,7 @@ +id: monitor/zapper-edid +category_id: com.canonical.plainbox::monitor +plugin: shell +estimated_duration: 60 +_summary: Check if the system automatically changes the resolution based on EDID +environ: ZAPPER_HOST +command: edid_cycle.py "$ZAPPER_HOST" diff --git a/units/zapper/resource.pxu b/units/zapper/resource.pxu new file mode 100644 index 0000000..81b9d19 --- /dev/null +++ b/units/zapper/resource.pxu @@ -0,0 +1,5 @@ +id: pig +plugin: resource +_summary: Get Pig's capabilities +environ: PIG_HOST +command: ssh -q -o 'StrictHostKeyChecking=no' "$PIG_HOST" /snap/bin/pigbox capabilities diff --git a/units/zapper/test-plan.pxu b/units/zapper/test-plan.pxu new file mode 100644 index 0000000..ce287ff --- /dev/null +++ b/units/zapper/test-plan.pxu @@ -0,0 +1,16 @@ +id: zapper-enabled-full +unit: test plan +_name: Tests using Zapper +_description: Tests using Zapper +include: +nested_part: + zapper-enabled-automated + +id: zapper-enabled-automated +unit: test plan +_name: Tests using Zapper +_description: Tests using Zapper +include: + monitor/pig-edid +bootstrap_include: + pig -- cgit v1.2.3