From cf4ba4f362a938d1c01ac0d4baa2144e4455f6f0 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Mon, 25 Mar 2024 19:52:17 +0800 Subject: [PATCH 01/26] Update checkbox.json to include template_id (New) (#1107) Update checkbox.json to include template_id --- .../plainbox/impl/providers/exporters/data/checkbox.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json b/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json index f6a13ddef..de8527db6 100644 --- a/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json +++ b/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json @@ -65,7 +65,8 @@ "type": "test", "project": "certification", "duration": {{ job_state.result.execution_duration if job_state.result.execution_duration else 0 }}, - "plugin": "{{ job_state.job.plugin }}" + "plugin": "{{ job_state.job.plugin }}", + "template_id": {{ job_state.job.template_id | jsonify | safe }} }{%- if not loop.last -%},{%- endif %} {%- endfor %} ], @@ -101,7 +102,8 @@ "outcome": "{{ job_state.result.outcome }}", "comments": {{ job_state.result.comments | jsonify | safe }}, "io_log": {{ job_state.result.io_log_as_text_attachment | jsonify | safe }}, - "duration": {{ job_state.result.execution_duration if job_state.result.execution_duration else 0}} + "duration": {{ job_state.result.execution_duration if job_state.result.execution_duration else 0}}, + "template_id": {{ job_state.job.template_id | jsonify | safe }} }{%- if not loop.last -%},{%- endif %} {%- endfor %} ], From f11485a2ce3e0fb735846e12bb1c53175953db77 Mon Sep 17 00:00:00 2001 From: Fernando Bravo <39527354+fernando79513@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:36:58 +0100 Subject: [PATCH 02/26] Moved genio from contrib to providers (New) (#1102) * Moved genio from contrib to providers * Added genio provider in the documentation * Updated genio manage.py * Renamed genio workflow --- ...ox-contrib-genio.yaml => tox-provider-genio.yaml} | 12 ++++++------ README.md | 1 + {contrib => providers}/genio/.coveragerc | 0 {contrib => providers}/genio/README.md | 0 {contrib => providers}/genio/bin/boot_partition.py | 0 {contrib => providers}/genio/bin/brightness_test.py | 0 {contrib => providers}/genio/bin/cpu_idle.py | 0 .../genio/bin/dvfs_gpu_check_governors.py | 0 .../genio/bin/gpio_loopback_test.py | 0 .../genio/bin/hdmirx_output_checker.sh | 0 .../genio/bin/hdmirx_tool_runner.sh | 0 {contrib => providers}/genio/bin/linux_ccf.py | 0 {contrib => providers}/genio/bin/pmic_regulator.py | 0 {contrib => providers}/genio/bin/serialcheck.py | 0 .../genio/bin/set_as_performance_mode.sh | 0 {contrib => providers}/genio/bin/spidev_test.py | 0 .../genio/bin/verify-mt8188-ccf.sh | 0 .../genio/bin/verify-mt8195-ccf.sh | 0 .../genio/data/linux-ccf/mt8188-clk.h | 0 .../genio/data/linux-ccf/mt8195-clk.h | 0 {contrib => providers}/genio/data/spi/test.bin | 0 .../genio/launcher/genio-odm-certification-G1200 | 0 .../genio/launcher/genio-odm-certification-G350 | 0 .../genio/launcher/genio-odm-certification-G700 | 0 {contrib => providers}/genio/manage.py | 4 ++-- .../genio/tests/test_boot_partition.py | 0 .../genio/tests/test_brightness.py | 0 {contrib => providers}/genio/tests/test_cpu_idle.py | 0 .../genio/tests/test_dvfs_gpu_check_governors.py | 0 .../genio/tests/test_gpio_loopback.py | 0 {contrib => providers}/genio/tests/test_linux_ccf.py | 0 .../genio/tests/test_pmic_regulator.py | 0 .../genio/tests/test_serialcheck.py | 0 {contrib => providers}/genio/tests/test_spidev.py | 0 {contrib => providers}/genio/tox.ini | 0 .../genio/units/audio/category.pxu | 0 {contrib => providers}/genio/units/audio/jobs.pxu | 0 .../genio/units/audio/manifest.pxu | 0 .../genio/units/audio/test-plan.pxu | 0 {contrib => providers}/genio/units/boot/category.pxu | 0 {contrib => providers}/genio/units/boot/jobs.pxu | 0 .../genio/units/boot/test-plan.pxu | 0 {contrib => providers}/genio/units/device/jobs.pxu | 0 .../genio/units/display/category.pxu | 0 {contrib => providers}/genio/units/display/jobs.pxu | 0 .../genio/units/display/manifest.pxu | 0 .../genio/units/display/test-plan.pxu | 0 {contrib => providers}/genio/units/ebbr/category.pxu | 0 {contrib => providers}/genio/units/ebbr/jobs.pxu | 0 .../genio/units/ebbr/test-plan.pxu | 0 .../genio/units/graphic/category.pxu | 0 {contrib => providers}/genio/units/graphic/jobs.pxu | 0 .../genio/units/graphic/test-plan.pxu | 0 .../genio/units/hdmi-rx/category.pxu | 0 {contrib => providers}/genio/units/hdmi-rx/jobs.pxu | 0 .../genio/units/hdmi-rx/manifest.pxu | 0 .../genio/units/hdmi-rx/test-plan.pxu | 0 {contrib => providers}/genio/units/info/category.pxu | 0 {contrib => providers}/genio/units/info/jobs.pxu | 0 .../genio/units/info/test-plan.pxu | 0 .../genio/units/peripheral/category.pxu | 0 .../genio/units/peripheral/jobs.pxu | 0 .../genio/units/peripheral/manifest.pxu | 0 .../genio/units/peripheral/test-plan.pxu | 0 .../genio/units/power-management/category.pxu | 0 .../genio/units/power-management/jobs.pxu | 0 .../genio/units/power-management/test-plan.pxu | 0 .../genio/units/thermal/category.pxu | 0 {contrib => providers}/genio/units/thermal/jobs.pxu | 0 .../genio/units/thermal/test-plan.pxu | 0 70 files changed, 9 insertions(+), 8 deletions(-) rename .github/workflows/{tox-contrib-genio.yaml => tox-provider-genio.yaml} (81%) rename {contrib => providers}/genio/.coveragerc (100%) rename {contrib => providers}/genio/README.md (100%) rename {contrib => providers}/genio/bin/boot_partition.py (100%) rename {contrib => providers}/genio/bin/brightness_test.py (100%) rename {contrib => providers}/genio/bin/cpu_idle.py (100%) rename {contrib => providers}/genio/bin/dvfs_gpu_check_governors.py (100%) rename {contrib => providers}/genio/bin/gpio_loopback_test.py (100%) rename {contrib => providers}/genio/bin/hdmirx_output_checker.sh (100%) rename {contrib => providers}/genio/bin/hdmirx_tool_runner.sh (100%) rename {contrib => providers}/genio/bin/linux_ccf.py (100%) rename {contrib => providers}/genio/bin/pmic_regulator.py (100%) rename {contrib => providers}/genio/bin/serialcheck.py (100%) rename {contrib => providers}/genio/bin/set_as_performance_mode.sh (100%) rename {contrib => providers}/genio/bin/spidev_test.py (100%) rename {contrib => providers}/genio/bin/verify-mt8188-ccf.sh (100%) rename {contrib => providers}/genio/bin/verify-mt8195-ccf.sh (100%) rename {contrib => providers}/genio/data/linux-ccf/mt8188-clk.h (100%) rename {contrib => providers}/genio/data/linux-ccf/mt8195-clk.h (100%) rename {contrib => providers}/genio/data/spi/test.bin (100%) rename {contrib => providers}/genio/launcher/genio-odm-certification-G1200 (100%) rename {contrib => providers}/genio/launcher/genio-odm-certification-G350 (100%) rename {contrib => providers}/genio/launcher/genio-odm-certification-G700 (100%) rename {contrib => providers}/genio/manage.py (87%) rename {contrib => providers}/genio/tests/test_boot_partition.py (100%) rename {contrib => providers}/genio/tests/test_brightness.py (100%) rename {contrib => providers}/genio/tests/test_cpu_idle.py (100%) rename {contrib => providers}/genio/tests/test_dvfs_gpu_check_governors.py (100%) rename {contrib => providers}/genio/tests/test_gpio_loopback.py (100%) rename {contrib => providers}/genio/tests/test_linux_ccf.py (100%) rename {contrib => providers}/genio/tests/test_pmic_regulator.py (100%) rename {contrib => providers}/genio/tests/test_serialcheck.py (100%) rename {contrib => providers}/genio/tests/test_spidev.py (100%) rename {contrib => providers}/genio/tox.ini (100%) rename {contrib => providers}/genio/units/audio/category.pxu (100%) rename {contrib => providers}/genio/units/audio/jobs.pxu (100%) rename {contrib => providers}/genio/units/audio/manifest.pxu (100%) rename {contrib => providers}/genio/units/audio/test-plan.pxu (100%) rename {contrib => providers}/genio/units/boot/category.pxu (100%) rename {contrib => providers}/genio/units/boot/jobs.pxu (100%) rename {contrib => providers}/genio/units/boot/test-plan.pxu (100%) rename {contrib => providers}/genio/units/device/jobs.pxu (100%) rename {contrib => providers}/genio/units/display/category.pxu (100%) rename {contrib => providers}/genio/units/display/jobs.pxu (100%) rename {contrib => providers}/genio/units/display/manifest.pxu (100%) rename {contrib => providers}/genio/units/display/test-plan.pxu (100%) rename {contrib => providers}/genio/units/ebbr/category.pxu (100%) rename {contrib => providers}/genio/units/ebbr/jobs.pxu (100%) rename {contrib => providers}/genio/units/ebbr/test-plan.pxu (100%) rename {contrib => providers}/genio/units/graphic/category.pxu (100%) rename {contrib => providers}/genio/units/graphic/jobs.pxu (100%) rename {contrib => providers}/genio/units/graphic/test-plan.pxu (100%) rename {contrib => providers}/genio/units/hdmi-rx/category.pxu (100%) rename {contrib => providers}/genio/units/hdmi-rx/jobs.pxu (100%) rename {contrib => providers}/genio/units/hdmi-rx/manifest.pxu (100%) rename {contrib => providers}/genio/units/hdmi-rx/test-plan.pxu (100%) rename {contrib => providers}/genio/units/info/category.pxu (100%) rename {contrib => providers}/genio/units/info/jobs.pxu (100%) rename {contrib => providers}/genio/units/info/test-plan.pxu (100%) rename {contrib => providers}/genio/units/peripheral/category.pxu (100%) rename {contrib => providers}/genio/units/peripheral/jobs.pxu (100%) rename {contrib => providers}/genio/units/peripheral/manifest.pxu (100%) rename {contrib => providers}/genio/units/peripheral/test-plan.pxu (100%) rename {contrib => providers}/genio/units/power-management/category.pxu (100%) rename {contrib => providers}/genio/units/power-management/jobs.pxu (100%) rename {contrib => providers}/genio/units/power-management/test-plan.pxu (100%) rename {contrib => providers}/genio/units/thermal/category.pxu (100%) rename {contrib => providers}/genio/units/thermal/jobs.pxu (100%) rename {contrib => providers}/genio/units/thermal/test-plan.pxu (100%) diff --git a/.github/workflows/tox-contrib-genio.yaml b/.github/workflows/tox-provider-genio.yaml similarity index 81% rename from .github/workflows/tox-contrib-genio.yaml rename to .github/workflows/tox-provider-genio.yaml index dda671767..2348d4110 100644 --- a/.github/workflows/tox-contrib-genio.yaml +++ b/.github/workflows/tox-provider-genio.yaml @@ -1,23 +1,23 @@ -name: Test provider-genio (from contrib area) with tox +name: Test provider-genio with tox on: push: branches: [ main ] paths: - - contrib/genio/** + - providers/genio/** pull_request: branches: [ main ] paths: - - contrib/genio/** + - providers/genio/** workflow_dispatch: jobs: tox_test_genio_provider: continue-on-error: true - name: Test Genio provider (from contrib area) with tox + name: Test Genio provider with tox defaults: run: - working-directory: contrib/genio + working-directory: providers/genio runs-on: ubuntu-20.04 strategy: matrix: @@ -45,4 +45,4 @@ jobs: uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - flags: provider-base \ No newline at end of file + flags: provider-genio \ No newline at end of file diff --git a/README.md b/README.md index 5fe4a2b3a..79904349d 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Check the [contributing guide] to learn how to: ├── certification-client ├── certification-server ├── docker + ├── genio ├── gpgpu ├── iiotg ├── resource diff --git a/contrib/genio/.coveragerc b/providers/genio/.coveragerc similarity index 100% rename from contrib/genio/.coveragerc rename to providers/genio/.coveragerc diff --git a/contrib/genio/README.md b/providers/genio/README.md similarity index 100% rename from contrib/genio/README.md rename to providers/genio/README.md diff --git a/contrib/genio/bin/boot_partition.py b/providers/genio/bin/boot_partition.py similarity index 100% rename from contrib/genio/bin/boot_partition.py rename to providers/genio/bin/boot_partition.py diff --git a/contrib/genio/bin/brightness_test.py b/providers/genio/bin/brightness_test.py similarity index 100% rename from contrib/genio/bin/brightness_test.py rename to providers/genio/bin/brightness_test.py diff --git a/contrib/genio/bin/cpu_idle.py b/providers/genio/bin/cpu_idle.py similarity index 100% rename from contrib/genio/bin/cpu_idle.py rename to providers/genio/bin/cpu_idle.py diff --git a/contrib/genio/bin/dvfs_gpu_check_governors.py b/providers/genio/bin/dvfs_gpu_check_governors.py similarity index 100% rename from contrib/genio/bin/dvfs_gpu_check_governors.py rename to providers/genio/bin/dvfs_gpu_check_governors.py diff --git a/contrib/genio/bin/gpio_loopback_test.py b/providers/genio/bin/gpio_loopback_test.py similarity index 100% rename from contrib/genio/bin/gpio_loopback_test.py rename to providers/genio/bin/gpio_loopback_test.py diff --git a/contrib/genio/bin/hdmirx_output_checker.sh b/providers/genio/bin/hdmirx_output_checker.sh similarity index 100% rename from contrib/genio/bin/hdmirx_output_checker.sh rename to providers/genio/bin/hdmirx_output_checker.sh diff --git a/contrib/genio/bin/hdmirx_tool_runner.sh b/providers/genio/bin/hdmirx_tool_runner.sh similarity index 100% rename from contrib/genio/bin/hdmirx_tool_runner.sh rename to providers/genio/bin/hdmirx_tool_runner.sh diff --git a/contrib/genio/bin/linux_ccf.py b/providers/genio/bin/linux_ccf.py similarity index 100% rename from contrib/genio/bin/linux_ccf.py rename to providers/genio/bin/linux_ccf.py diff --git a/contrib/genio/bin/pmic_regulator.py b/providers/genio/bin/pmic_regulator.py similarity index 100% rename from contrib/genio/bin/pmic_regulator.py rename to providers/genio/bin/pmic_regulator.py diff --git a/contrib/genio/bin/serialcheck.py b/providers/genio/bin/serialcheck.py similarity index 100% rename from contrib/genio/bin/serialcheck.py rename to providers/genio/bin/serialcheck.py diff --git a/contrib/genio/bin/set_as_performance_mode.sh b/providers/genio/bin/set_as_performance_mode.sh similarity index 100% rename from contrib/genio/bin/set_as_performance_mode.sh rename to providers/genio/bin/set_as_performance_mode.sh diff --git a/contrib/genio/bin/spidev_test.py b/providers/genio/bin/spidev_test.py similarity index 100% rename from contrib/genio/bin/spidev_test.py rename to providers/genio/bin/spidev_test.py diff --git a/contrib/genio/bin/verify-mt8188-ccf.sh b/providers/genio/bin/verify-mt8188-ccf.sh similarity index 100% rename from contrib/genio/bin/verify-mt8188-ccf.sh rename to providers/genio/bin/verify-mt8188-ccf.sh diff --git a/contrib/genio/bin/verify-mt8195-ccf.sh b/providers/genio/bin/verify-mt8195-ccf.sh similarity index 100% rename from contrib/genio/bin/verify-mt8195-ccf.sh rename to providers/genio/bin/verify-mt8195-ccf.sh diff --git a/contrib/genio/data/linux-ccf/mt8188-clk.h b/providers/genio/data/linux-ccf/mt8188-clk.h similarity index 100% rename from contrib/genio/data/linux-ccf/mt8188-clk.h rename to providers/genio/data/linux-ccf/mt8188-clk.h diff --git a/contrib/genio/data/linux-ccf/mt8195-clk.h b/providers/genio/data/linux-ccf/mt8195-clk.h similarity index 100% rename from contrib/genio/data/linux-ccf/mt8195-clk.h rename to providers/genio/data/linux-ccf/mt8195-clk.h diff --git a/contrib/genio/data/spi/test.bin b/providers/genio/data/spi/test.bin similarity index 100% rename from contrib/genio/data/spi/test.bin rename to providers/genio/data/spi/test.bin diff --git a/contrib/genio/launcher/genio-odm-certification-G1200 b/providers/genio/launcher/genio-odm-certification-G1200 similarity index 100% rename from contrib/genio/launcher/genio-odm-certification-G1200 rename to providers/genio/launcher/genio-odm-certification-G1200 diff --git a/contrib/genio/launcher/genio-odm-certification-G350 b/providers/genio/launcher/genio-odm-certification-G350 similarity index 100% rename from contrib/genio/launcher/genio-odm-certification-G350 rename to providers/genio/launcher/genio-odm-certification-G350 diff --git a/contrib/genio/launcher/genio-odm-certification-G700 b/providers/genio/launcher/genio-odm-certification-G700 similarity index 100% rename from contrib/genio/launcher/genio-odm-certification-G700 rename to providers/genio/launcher/genio-odm-certification-G700 diff --git a/contrib/genio/manage.py b/providers/genio/manage.py similarity index 87% rename from contrib/genio/manage.py rename to providers/genio/manage.py index e6c3d40a0..5f9f88961 100755 --- a/contrib/genio/manage.py +++ b/providers/genio/manage.py @@ -15,8 +15,8 @@ setup( name="checkbox-provider-genio", - namespace="com.canonical.contrib", + namespace="com.canonical.certification", version="1.0", - description=N_("The Genio provider"), + description=N_("Checkbox Provider for Genio devices"), gettext_domain="checkbox-provider-genio", ) diff --git a/contrib/genio/tests/test_boot_partition.py b/providers/genio/tests/test_boot_partition.py similarity index 100% rename from contrib/genio/tests/test_boot_partition.py rename to providers/genio/tests/test_boot_partition.py diff --git a/contrib/genio/tests/test_brightness.py b/providers/genio/tests/test_brightness.py similarity index 100% rename from contrib/genio/tests/test_brightness.py rename to providers/genio/tests/test_brightness.py diff --git a/contrib/genio/tests/test_cpu_idle.py b/providers/genio/tests/test_cpu_idle.py similarity index 100% rename from contrib/genio/tests/test_cpu_idle.py rename to providers/genio/tests/test_cpu_idle.py diff --git a/contrib/genio/tests/test_dvfs_gpu_check_governors.py b/providers/genio/tests/test_dvfs_gpu_check_governors.py similarity index 100% rename from contrib/genio/tests/test_dvfs_gpu_check_governors.py rename to providers/genio/tests/test_dvfs_gpu_check_governors.py diff --git a/contrib/genio/tests/test_gpio_loopback.py b/providers/genio/tests/test_gpio_loopback.py similarity index 100% rename from contrib/genio/tests/test_gpio_loopback.py rename to providers/genio/tests/test_gpio_loopback.py diff --git a/contrib/genio/tests/test_linux_ccf.py b/providers/genio/tests/test_linux_ccf.py similarity index 100% rename from contrib/genio/tests/test_linux_ccf.py rename to providers/genio/tests/test_linux_ccf.py diff --git a/contrib/genio/tests/test_pmic_regulator.py b/providers/genio/tests/test_pmic_regulator.py similarity index 100% rename from contrib/genio/tests/test_pmic_regulator.py rename to providers/genio/tests/test_pmic_regulator.py diff --git a/contrib/genio/tests/test_serialcheck.py b/providers/genio/tests/test_serialcheck.py similarity index 100% rename from contrib/genio/tests/test_serialcheck.py rename to providers/genio/tests/test_serialcheck.py diff --git a/contrib/genio/tests/test_spidev.py b/providers/genio/tests/test_spidev.py similarity index 100% rename from contrib/genio/tests/test_spidev.py rename to providers/genio/tests/test_spidev.py diff --git a/contrib/genio/tox.ini b/providers/genio/tox.ini similarity index 100% rename from contrib/genio/tox.ini rename to providers/genio/tox.ini diff --git a/contrib/genio/units/audio/category.pxu b/providers/genio/units/audio/category.pxu similarity index 100% rename from contrib/genio/units/audio/category.pxu rename to providers/genio/units/audio/category.pxu diff --git a/contrib/genio/units/audio/jobs.pxu b/providers/genio/units/audio/jobs.pxu similarity index 100% rename from contrib/genio/units/audio/jobs.pxu rename to providers/genio/units/audio/jobs.pxu diff --git a/contrib/genio/units/audio/manifest.pxu b/providers/genio/units/audio/manifest.pxu similarity index 100% rename from contrib/genio/units/audio/manifest.pxu rename to providers/genio/units/audio/manifest.pxu diff --git a/contrib/genio/units/audio/test-plan.pxu b/providers/genio/units/audio/test-plan.pxu similarity index 100% rename from contrib/genio/units/audio/test-plan.pxu rename to providers/genio/units/audio/test-plan.pxu diff --git a/contrib/genio/units/boot/category.pxu b/providers/genio/units/boot/category.pxu similarity index 100% rename from contrib/genio/units/boot/category.pxu rename to providers/genio/units/boot/category.pxu diff --git a/contrib/genio/units/boot/jobs.pxu b/providers/genio/units/boot/jobs.pxu similarity index 100% rename from contrib/genio/units/boot/jobs.pxu rename to providers/genio/units/boot/jobs.pxu diff --git a/contrib/genio/units/boot/test-plan.pxu b/providers/genio/units/boot/test-plan.pxu similarity index 100% rename from contrib/genio/units/boot/test-plan.pxu rename to providers/genio/units/boot/test-plan.pxu diff --git a/contrib/genio/units/device/jobs.pxu b/providers/genio/units/device/jobs.pxu similarity index 100% rename from contrib/genio/units/device/jobs.pxu rename to providers/genio/units/device/jobs.pxu diff --git a/contrib/genio/units/display/category.pxu b/providers/genio/units/display/category.pxu similarity index 100% rename from contrib/genio/units/display/category.pxu rename to providers/genio/units/display/category.pxu diff --git a/contrib/genio/units/display/jobs.pxu b/providers/genio/units/display/jobs.pxu similarity index 100% rename from contrib/genio/units/display/jobs.pxu rename to providers/genio/units/display/jobs.pxu diff --git a/contrib/genio/units/display/manifest.pxu b/providers/genio/units/display/manifest.pxu similarity index 100% rename from contrib/genio/units/display/manifest.pxu rename to providers/genio/units/display/manifest.pxu diff --git a/contrib/genio/units/display/test-plan.pxu b/providers/genio/units/display/test-plan.pxu similarity index 100% rename from contrib/genio/units/display/test-plan.pxu rename to providers/genio/units/display/test-plan.pxu diff --git a/contrib/genio/units/ebbr/category.pxu b/providers/genio/units/ebbr/category.pxu similarity index 100% rename from contrib/genio/units/ebbr/category.pxu rename to providers/genio/units/ebbr/category.pxu diff --git a/contrib/genio/units/ebbr/jobs.pxu b/providers/genio/units/ebbr/jobs.pxu similarity index 100% rename from contrib/genio/units/ebbr/jobs.pxu rename to providers/genio/units/ebbr/jobs.pxu diff --git a/contrib/genio/units/ebbr/test-plan.pxu b/providers/genio/units/ebbr/test-plan.pxu similarity index 100% rename from contrib/genio/units/ebbr/test-plan.pxu rename to providers/genio/units/ebbr/test-plan.pxu diff --git a/contrib/genio/units/graphic/category.pxu b/providers/genio/units/graphic/category.pxu similarity index 100% rename from contrib/genio/units/graphic/category.pxu rename to providers/genio/units/graphic/category.pxu diff --git a/contrib/genio/units/graphic/jobs.pxu b/providers/genio/units/graphic/jobs.pxu similarity index 100% rename from contrib/genio/units/graphic/jobs.pxu rename to providers/genio/units/graphic/jobs.pxu diff --git a/contrib/genio/units/graphic/test-plan.pxu b/providers/genio/units/graphic/test-plan.pxu similarity index 100% rename from contrib/genio/units/graphic/test-plan.pxu rename to providers/genio/units/graphic/test-plan.pxu diff --git a/contrib/genio/units/hdmi-rx/category.pxu b/providers/genio/units/hdmi-rx/category.pxu similarity index 100% rename from contrib/genio/units/hdmi-rx/category.pxu rename to providers/genio/units/hdmi-rx/category.pxu diff --git a/contrib/genio/units/hdmi-rx/jobs.pxu b/providers/genio/units/hdmi-rx/jobs.pxu similarity index 100% rename from contrib/genio/units/hdmi-rx/jobs.pxu rename to providers/genio/units/hdmi-rx/jobs.pxu diff --git a/contrib/genio/units/hdmi-rx/manifest.pxu b/providers/genio/units/hdmi-rx/manifest.pxu similarity index 100% rename from contrib/genio/units/hdmi-rx/manifest.pxu rename to providers/genio/units/hdmi-rx/manifest.pxu diff --git a/contrib/genio/units/hdmi-rx/test-plan.pxu b/providers/genio/units/hdmi-rx/test-plan.pxu similarity index 100% rename from contrib/genio/units/hdmi-rx/test-plan.pxu rename to providers/genio/units/hdmi-rx/test-plan.pxu diff --git a/contrib/genio/units/info/category.pxu b/providers/genio/units/info/category.pxu similarity index 100% rename from contrib/genio/units/info/category.pxu rename to providers/genio/units/info/category.pxu diff --git a/contrib/genio/units/info/jobs.pxu b/providers/genio/units/info/jobs.pxu similarity index 100% rename from contrib/genio/units/info/jobs.pxu rename to providers/genio/units/info/jobs.pxu diff --git a/contrib/genio/units/info/test-plan.pxu b/providers/genio/units/info/test-plan.pxu similarity index 100% rename from contrib/genio/units/info/test-plan.pxu rename to providers/genio/units/info/test-plan.pxu diff --git a/contrib/genio/units/peripheral/category.pxu b/providers/genio/units/peripheral/category.pxu similarity index 100% rename from contrib/genio/units/peripheral/category.pxu rename to providers/genio/units/peripheral/category.pxu diff --git a/contrib/genio/units/peripheral/jobs.pxu b/providers/genio/units/peripheral/jobs.pxu similarity index 100% rename from contrib/genio/units/peripheral/jobs.pxu rename to providers/genio/units/peripheral/jobs.pxu diff --git a/contrib/genio/units/peripheral/manifest.pxu b/providers/genio/units/peripheral/manifest.pxu similarity index 100% rename from contrib/genio/units/peripheral/manifest.pxu rename to providers/genio/units/peripheral/manifest.pxu diff --git a/contrib/genio/units/peripheral/test-plan.pxu b/providers/genio/units/peripheral/test-plan.pxu similarity index 100% rename from contrib/genio/units/peripheral/test-plan.pxu rename to providers/genio/units/peripheral/test-plan.pxu diff --git a/contrib/genio/units/power-management/category.pxu b/providers/genio/units/power-management/category.pxu similarity index 100% rename from contrib/genio/units/power-management/category.pxu rename to providers/genio/units/power-management/category.pxu diff --git a/contrib/genio/units/power-management/jobs.pxu b/providers/genio/units/power-management/jobs.pxu similarity index 100% rename from contrib/genio/units/power-management/jobs.pxu rename to providers/genio/units/power-management/jobs.pxu diff --git a/contrib/genio/units/power-management/test-plan.pxu b/providers/genio/units/power-management/test-plan.pxu similarity index 100% rename from contrib/genio/units/power-management/test-plan.pxu rename to providers/genio/units/power-management/test-plan.pxu diff --git a/contrib/genio/units/thermal/category.pxu b/providers/genio/units/thermal/category.pxu similarity index 100% rename from contrib/genio/units/thermal/category.pxu rename to providers/genio/units/thermal/category.pxu diff --git a/contrib/genio/units/thermal/jobs.pxu b/providers/genio/units/thermal/jobs.pxu similarity index 100% rename from contrib/genio/units/thermal/jobs.pxu rename to providers/genio/units/thermal/jobs.pxu diff --git a/contrib/genio/units/thermal/test-plan.pxu b/providers/genio/units/thermal/test-plan.pxu similarity index 100% rename from contrib/genio/units/thermal/test-plan.pxu rename to providers/genio/units/thermal/test-plan.pxu From 213bab67631c3fdcc32b07b602b6848334df464c Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Mon, 25 Mar 2024 13:43:03 +0100 Subject: [PATCH 03/26] Move all small workflows to large (infra) (#1109) Move all small workflows to large --- .github/workflows/checkbox-core-snap-daily-builds.yml | 2 +- .github/workflows/checkbox-snap-daily-builds.yml | 2 +- .github/workflows/daily-builds.yml | 2 +- .github/workflows/deb-daily-builds.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checkbox-core-snap-daily-builds.yml b/.github/workflows/checkbox-core-snap-daily-builds.yml index 92c235ece..8d075da2a 100644 --- a/.github/workflows/checkbox-core-snap-daily-builds.yml +++ b/.github/workflows/checkbox-core-snap-daily-builds.yml @@ -10,7 +10,7 @@ jobs: matrix: releases: [16, 18, 20, 22] arch: [amd64, arm64, armhf] - runs-on: [self-hosted, linux, small] + runs-on: [self-hosted, linux, large] timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts env: SERIES: series${{ matrix.releases }} diff --git a/.github/workflows/checkbox-snap-daily-builds.yml b/.github/workflows/checkbox-snap-daily-builds.yml index fbe0220e3..f3b0b1f75 100644 --- a/.github/workflows/checkbox-snap-daily-builds.yml +++ b/.github/workflows/checkbox-snap-daily-builds.yml @@ -11,7 +11,7 @@ jobs: matrix: type: [classic, uc] releases: [16, 18, 20, 22] - runs-on: [self-hosted, linux, small] + runs-on: [self-hosted, linux, large] timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts env: SERIES: series_${{ matrix.type }}${{ matrix.releases }} diff --git a/.github/workflows/daily-builds.yml b/.github/workflows/daily-builds.yml index 03cfac93c..f754f2ed0 100644 --- a/.github/workflows/daily-builds.yml +++ b/.github/workflows/daily-builds.yml @@ -7,7 +7,7 @@ on: jobs: check_for_commits: - runs-on: [self-hosted, linux, small] + runs-on: [self-hosted, linux, large] name: Check for commits outputs: new_commit_count: ${{ steps.commit_check.outputs.new_commit_count }} diff --git a/.github/workflows/deb-daily-builds.yml b/.github/workflows/deb-daily-builds.yml index 854eef0a4..ef897a47c 100644 --- a/.github/workflows/deb-daily-builds.yml +++ b/.github/workflows/deb-daily-builds.yml @@ -7,7 +7,7 @@ on: jobs: ppa_update: name: Sync PPA history with monorepo - runs-on: [self-hosted, linux, small] + runs-on: [self-hosted, linux, large] timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts steps: - name: Install dependencies From 41178aec65cfb9d7c0644fef5f1c8e328383324e Mon Sep 17 00:00:00 2001 From: Fernando Bravo <39527354+fernando79513@users.noreply.github.com> Date: Mon, 25 Mar 2024 16:09:25 +0100 Subject: [PATCH 04/26] Added copyright and license notice for scripts in genio provider (Infra) (#1110) Added copyright and license notice for scripts in genio provider --- providers/genio/bin/boot_partition.py | 19 +++++++++++++++ providers/genio/bin/brightness_test.py | 24 +++++++------------ providers/genio/bin/cpu_idle.py | 19 +++++++++++++++ .../genio/bin/dvfs_gpu_check_governors.py | 18 ++++++++++++++ providers/genio/bin/gpio_loopback_test.py | 21 +++++++++++++++- providers/genio/bin/hdmirx_output_checker.sh | 18 ++++++++++++++ providers/genio/bin/hdmirx_tool_runner.sh | 18 ++++++++++++++ providers/genio/bin/linux_ccf.py | 18 ++++++++++++++ providers/genio/bin/pmic_regulator.py | 18 ++++++++++++++ providers/genio/bin/serialcheck.py | 18 ++++++++++++++ .../genio/bin/set_as_performance_mode.sh | 19 +++++++++++++++ providers/genio/bin/spidev_test.py | 18 ++++++++++++++ providers/genio/bin/verify-mt8188-ccf.sh | 21 ++++++++++++++-- providers/genio/bin/verify-mt8195-ccf.sh | 20 +++++++++++++++- 14 files changed, 250 insertions(+), 19 deletions(-) diff --git a/providers/genio/bin/boot_partition.py b/providers/genio/bin/boot_partition.py index 5f0e20296..2cb2482c2 100755 --- a/providers/genio/bin/boot_partition.py +++ b/providers/genio/bin/boot_partition.py @@ -1,4 +1,23 @@ #!/usr/bin/env python3 +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . + # This script should be run as a super user import subprocess diff --git a/providers/genio/bin/brightness_test.py b/providers/genio/bin/brightness_test.py index 98b9b5a0c..0c79e75dc 100755 --- a/providers/genio/bin/brightness_test.py +++ b/providers/genio/bin/brightness_test.py @@ -1,20 +1,16 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# brightness_test.py -# # This file is part of Checkbox. # -# Copyright 2012-2018 Canonical Ltd. -# +# Copyright 2012-2024 Canonical Ltd. # Authors: # Alberto Milone # Sylvain Pineau +# Patrick Chang +# Fernando Bravo # # Checkbox is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, # as published by the Free Software Foundation. - # # Checkbox is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -23,14 +19,12 @@ # # You should have received a copy of the GNU General Public License # along with Checkbox. If not, see . -# -# -# Patrick Chang modified this script for specific platform and display purpose. -# - I keep the origianl logic of Brightness Class and just modified the main -# function in order to get test the specific display. In addition, I divide -# the brightness into five parts to have better test coverage. -# -# + + +# This script is a modification of the brightness test in the base provider +# that has been modified to work with the Genio platforms. The original script +# has also been refactored for better readability and maintainability. + import sys import os diff --git a/providers/genio/bin/cpu_idle.py b/providers/genio/bin/cpu_idle.py index ffc5606e8..f9b503abd 100755 --- a/providers/genio/bin/cpu_idle.py +++ b/providers/genio/bin/cpu_idle.py @@ -1,4 +1,23 @@ #!/usr/bin/env python3 +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . + import os import argparse diff --git a/providers/genio/bin/dvfs_gpu_check_governors.py b/providers/genio/bin/dvfs_gpu_check_governors.py index a4e3a4fe2..fbcf1a8de 100755 --- a/providers/genio/bin/dvfs_gpu_check_governors.py +++ b/providers/genio/bin/dvfs_gpu_check_governors.py @@ -1,4 +1,22 @@ #!/usr/bin/env python3 +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . import argparse diff --git a/providers/genio/bin/gpio_loopback_test.py b/providers/genio/bin/gpio_loopback_test.py index 607360d3d..9bbca3d18 100755 --- a/providers/genio/bin/gpio_loopback_test.py +++ b/providers/genio/bin/gpio_loopback_test.py @@ -1,4 +1,23 @@ -#!/bin/python3 +#!/usr/bin/env python3 +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . + import time import os from argparse import ArgumentParser, RawTextHelpFormatter diff --git a/providers/genio/bin/hdmirx_output_checker.sh b/providers/genio/bin/hdmirx_output_checker.sh index bbbe6c657..2fc094d64 100755 --- a/providers/genio/bin/hdmirx_output_checker.sh +++ b/providers/genio/bin/hdmirx_output_checker.sh @@ -1,4 +1,22 @@ #!/bin/bash +# This file is part of Checkbox. +# +# Copyright 2014 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . # This script is used to verify the output of the mtk_hdmirx_tool. diff --git a/providers/genio/bin/hdmirx_tool_runner.sh b/providers/genio/bin/hdmirx_tool_runner.sh index b7b257c16..916c5aec7 100755 --- a/providers/genio/bin/hdmirx_tool_runner.sh +++ b/providers/genio/bin/hdmirx_tool_runner.sh @@ -1,4 +1,22 @@ #!/bin/bash +# This file is part of Checkbox. +# +# Copyright 2014 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . # This script is used to interact with the mtk_hdmirx_tool. You can find the source # code of mtk_hdmi_rx from the following link: diff --git a/providers/genio/bin/linux_ccf.py b/providers/genio/bin/linux_ccf.py index 7ef8ef72a..d33880f29 100755 --- a/providers/genio/bin/linux_ccf.py +++ b/providers/genio/bin/linux_ccf.py @@ -1,4 +1,22 @@ #!/usr/bin/env python3 +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . import os import argparse diff --git a/providers/genio/bin/pmic_regulator.py b/providers/genio/bin/pmic_regulator.py index cc0878717..3e456c75e 100755 --- a/providers/genio/bin/pmic_regulator.py +++ b/providers/genio/bin/pmic_regulator.py @@ -1,4 +1,22 @@ #!/usr/bin/env python3 +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . import os import argparse diff --git a/providers/genio/bin/serialcheck.py b/providers/genio/bin/serialcheck.py index 90d1cafc2..825c194c9 100755 --- a/providers/genio/bin/serialcheck.py +++ b/providers/genio/bin/serialcheck.py @@ -1,4 +1,22 @@ #!/usr/bin/env python3 +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . import argparse import subprocess diff --git a/providers/genio/bin/set_as_performance_mode.sh b/providers/genio/bin/set_as_performance_mode.sh index ba97b5cbb..4169c9713 100755 --- a/providers/genio/bin/set_as_performance_mode.sh +++ b/providers/genio/bin/set_as_performance_mode.sh @@ -1,4 +1,23 @@ #!/bin/bash +# This file is part of Checkbox. +# +# Copyright 2014 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . + set -e STORE_HOUSE=/var/tmp/performance-setting diff --git a/providers/genio/bin/spidev_test.py b/providers/genio/bin/spidev_test.py index bcb5d642c..bd8e56d54 100755 --- a/providers/genio/bin/spidev_test.py +++ b/providers/genio/bin/spidev_test.py @@ -1,4 +1,22 @@ #!/usr/bin/env python3 +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . import os import argparse diff --git a/providers/genio/bin/verify-mt8188-ccf.sh b/providers/genio/bin/verify-mt8188-ccf.sh index 34c6c8220..03337cd42 100755 --- a/providers/genio/bin/verify-mt8188-ccf.sh +++ b/providers/genio/bin/verify-mt8188-ccf.sh @@ -1,6 +1,23 @@ #!/bin/bash - -# Author: Amjad Ouled-Ameur +# This file is part of Checkbox. +# +# Copyright 2014 Canonical Ltd. +# Authors: +# Amjad Ouled-Ameur +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . CLK_TABLE= CLK_SUMMARY= diff --git a/providers/genio/bin/verify-mt8195-ccf.sh b/providers/genio/bin/verify-mt8195-ccf.sh index 4f8bc42ce..9271c9b77 100755 --- a/providers/genio/bin/verify-mt8195-ccf.sh +++ b/providers/genio/bin/verify-mt8195-ccf.sh @@ -1,6 +1,24 @@ #!/bin/bash +# This file is part of Checkbox. +# +# Copyright 2014 Canonical Ltd. +# Authors: +# Amjad Ouled-Ameur +# Patrick Chang +# Fernando Bravo +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . -# Author: Amjad Ouled-Ameur CLK_TABLE= CLK_SUMMARY= From 11a42fadbae0518c192f375ae526ec2dc13202e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Mon, 25 Mar 2024 17:56:26 +0100 Subject: [PATCH 05/26] checkbox-support: add missing `pyyaml` dependency (BugFix) (#1108) checkbox-support: add missing `pyyaml` dependency --- checkbox-support/pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/checkbox-support/pyproject.toml b/checkbox-support/pyproject.toml index 5cb0a3432..79634caac 100644 --- a/checkbox-support/pyproject.toml +++ b/checkbox-support/pyproject.toml @@ -15,7 +15,8 @@ 'distro>=1.0', 'configparser; python_version=="2.7"', 'requests_unixsocket>=0.1.2; python_version>="3.5"', - 'importlib_metadata; python_version<"3.8"' + 'importlib_metadata; python_version<"3.8"', + 'pyyaml', ] [metadata] long_description={'file' = 'README.md'} From 43b7dbb6d790b054e02902b30b7aab6fb6f10249 Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Wed, 27 Mar 2024 19:38:08 +0100 Subject: [PATCH 06/26] Fix config loading after resume (bugfix) (#1119) * Initial bugfix * Rename and document * Test new load_configs_from_app_blob * Test start_session * Fix wrong mocking * Add test no launcher * Metabox test * Also metabox scenario class * Better docstring * Increase sleep time to make race condition harder --- .../checkbox_ng/launcher/subcommands.py | 26 ++- .../checkbox_ng/launcher/test_subcommands.py | 175 ++++++++++++++---- .../metabox-provider/units/basic-jobs.pxu | 10 +- .../metabox-provider/units/basic-tps.pxu | 10 + metabox/metabox/scenarios/config/resume.py | 62 +++++++ 5 files changed, 250 insertions(+), 33 deletions(-) create mode 100644 metabox/metabox/scenarios/config/resume.py diff --git a/checkbox-ng/checkbox_ng/launcher/subcommands.py b/checkbox-ng/checkbox_ng/launcher/subcommands.py index 5fd74bcbd..7373255b1 100644 --- a/checkbox-ng/checkbox_ng/launcher/subcommands.py +++ b/checkbox-ng/checkbox_ng/launcher/subcommands.py @@ -54,6 +54,7 @@ from plainbox.impl.transport import get_all_transports from plainbox.impl.transport import SECURE_ID_PATTERN from plainbox.impl.unit.testplan import TestPlanUnitSupport +from plainbox.impl.config import Configuration from checkbox_ng.config import load_configs from checkbox_ng.launcher.stages import MainLoopStage, ReportsStage @@ -521,6 +522,21 @@ def _get_autoresume_outcome_last_job(self, metadata): return IJobResult.OUTCOME_PASS return IJobResult.OUTCOME_CRASH + def load_configs_from_app_blob(self, app_blob): + """ + Load the configs taking into consideration the app_blob. This recovers + the original launcher that was provided to the session and loads the + configs from disk + """ + if "launcher" in app_blob: + resumed_launcher = Configuration.from_text( + app_blob["launcher"], "Resume launcher" + ) + else: + resumed_launcher = Configuration() + config = load_configs(cfg=resumed_launcher) + self.ctx.sa.use_alternate_configuration(config) + def _resume_session( self, session_id: str, outcome: "IJobResult|None", comments=[] ): @@ -533,6 +549,7 @@ def _resume_session( if "testplanless" not in metadata.flags: app_blob = json.loads(metadata.app_blob.decode("UTF-8")) test_plan_id = app_blob["testplan_id"] + self.load_configs_from_app_blob(app_blob) self.ctx.sa.select_test_plan(test_plan_id) self.ctx.sa.bootstrap() if outcome is None: @@ -629,9 +646,16 @@ def _start_new_session(self): description = self.ctx.args.message or self.configuration.get_value( "launcher", "session_desc" ) + app_blob = {"testplan_id": tp_id, "description": description} + if self.ctx.args.launcher: + try: + with open(self.ctx.args.launcher, "r") as f: + app_blob["launcher"] = f.read() + except FileNotFoundError: + pass self.ctx.sa.update_app_blob( json.dumps( - {"testplan_id": tp_id, "description": description} + app_blob ).encode("UTF-8") ) bs_jobs = self.ctx.sa.get_bootstrap_todo_list() diff --git a/checkbox-ng/checkbox_ng/launcher/test_subcommands.py b/checkbox-ng/checkbox_ng/launcher/test_subcommands.py index 4796680cb..9459dbf9b 100644 --- a/checkbox-ng/checkbox_ng/launcher/test_subcommands.py +++ b/checkbox-ng/checkbox_ng/launcher/test_subcommands.py @@ -16,12 +16,13 @@ # You should have received a copy of the GNU General Public License # along with Checkbox. If not, see . +import textwrap import datetime from functools import partial from unittest import TestCase -from unittest.mock import patch, Mock, MagicMock +from unittest.mock import patch, Mock, MagicMock, mock_open from io import StringIO @@ -41,6 +42,69 @@ class TestLauncher(TestCase): + @patch( + "checkbox_ng.launcher.subcommands.open", + new_callable=mock_open, + read_data=textwrap.dedent( + """ + [launcher] + app_id = "appid" + app_version = 0 + session_title = "session_title" + session_desc = "description" + """ + ), + ) + def test_start_new_session_ok(self, _): + self_mock = MagicMock() + self_mock.is_interactive = True + self_mock._interactively_pick_test_plan.return_value = "test plan id" + self_mock.ctx.args.launcher = "launcher_path.conf" + self_mock.ctx.args.message = None + + def configuration_get_value(tl_key, sl_key): + configuration = { + "launcher": { + "app_id": "appid", + "app_version": 0, + "session_title": "session_title", + "session_desc": "description", + }, + "agent": {"normal_user": "ubuntu"}, + "test plan": {"forced": False, "unit": "some unit"}, + } + return configuration[tl_key][sl_key] + + self_mock.configuration.get_value = configuration_get_value + + Launcher._start_new_session(self_mock) + + @patch("checkbox_ng.launcher.subcommands.open") + def test_start_new_session_ok_no_launcher(self, mock_open): + self_mock = MagicMock() + self_mock.is_interactive = True + self_mock._interactively_pick_test_plan.return_value = "test plan id" + self_mock.ctx.args.launcher = "launcher_path.conf" + self_mock.ctx.args.message = None + mock_open.side_effect = FileNotFoundError + + def configuration_get_value(tl_key, sl_key): + configuration = { + "launcher": { + "app_id": "appid", + "app_version": 0, + "session_title": "session_title", + "session_desc": "description", + }, + "agent": {"normal_user": "ubuntu"}, + "test plan": {"forced": False, "unit": "some unit"}, + } + return configuration[tl_key][sl_key] + + self_mock.configuration.get_value = configuration_get_value + + Launcher._start_new_session(self_mock) + @patch("checkbox_ng.launcher.subcommands.detect_restart_strategy") @patch("os.getenv") @patch("sys.argv") @@ -116,6 +180,41 @@ def test__manually_resume_session_empty_id(self, resume_menu_mock): self.assertFalse(Launcher._manually_resume_session(self_mock, [])) + @patch("checkbox_ng.launcher.subcommands.Configuration") + @patch("checkbox_ng.launcher.subcommands.load_configs") + def test_load_configs_from_app_blob( + self, load_config_mock, configuration_mock + ): + self_mock = MagicMock() + app_blob = { + "launcher": textwrap.dedent( + """ + [launcher] + launcher_version = 1 + """ + ) + } + + Launcher.load_configs_from_app_blob(self_mock, app_blob) + + self.assertTrue(configuration_mock.from_text.called) + self.assertTrue(load_config_mock.called) + self.assertTrue(self_mock.ctx.sa.use_alternate_configuration.called) + + @patch("checkbox_ng.launcher.subcommands.Configuration") + @patch("checkbox_ng.launcher.subcommands.load_configs") + def test_load_configs_from_app_blob_no_launcher( + self, load_config_mock, configuration_mock + ): + self_mock = MagicMock() + app_blob = {} + + Launcher.load_configs_from_app_blob(self_mock, app_blob) + + self.assertFalse(configuration_mock.from_text.called) + self.assertTrue(load_config_mock.called) + self.assertTrue(self_mock.ctx.sa.use_alternate_configuration.called) + @patch("checkbox_ng.launcher.subcommands.MemoryJobResult") @patch("checkbox_ng.launcher.subcommands.newline_join", new=MagicMock()) def test__resume_session_pass(self, memory_job_result_mock): @@ -720,9 +819,7 @@ def setUp(self): select_test_plan=Mock(), # get_resumable_sessions=Mock(return_value=[]), _context=Mock( - state=Mock( - unit_list=[] - ), + state=Mock(unit_list=[]), _test_plan_list=[Mock()], ), ) @@ -742,14 +839,18 @@ def test_invoke__test_plan_not_found(self): @patch("checkbox_ng.launcher.subcommands.TestPlanUnitSupport") @patch("checkbox_ng.launcher.subcommands.select_units") def test_invoke__text(self, mock_select_units, mock_tpus, stdout): - template1 = TemplateUnit({ - "template-id": "test-template", - "id": "test-{res}", - "template-summary": "Test Template Summary", - }) - job1 = JobDefinition({ - "id": "job1", - }) + template1 = TemplateUnit( + { + "template-id": "test-template", + "id": "test-{res}", + "template-summary": "Test Template Summary", + } + ) + job1 = JobDefinition( + { + "id": "job1", + } + ) mock_select_units.return_value = [job1, template1] self.ctx.args.TEST_PLAN = "test-plan1" self.launcher.invoked(self.ctx) @@ -759,14 +860,18 @@ def test_invoke__text(self, mock_select_units, mock_tpus, stdout): @patch("checkbox_ng.launcher.subcommands.TestPlanUnitSupport") @patch("checkbox_ng.launcher.subcommands.select_units") def test_invoke__json(self, mock_select_units, mock_tpus, stdout): - template1 = TemplateUnit({ - "template-id": "test-template", - "id": "test-{res}", - "template-summary": "Test Template Summary", - }) - job1 = JobDefinition({ - "id": "job1", - }) + template1 = TemplateUnit( + { + "template-id": "test-template", + "id": "test-{res}", + "template-summary": "Test Template Summary", + } + ) + job1 = JobDefinition( + { + "id": "job1", + } + ) mock_select_units.return_value = [job1, template1] self.ctx.args.TEST_PLAN = "test-plan1" self.ctx.args.format = "json" @@ -774,23 +879,31 @@ def test_invoke__json(self, mock_select_units, mock_tpus, stdout): self.assertIn('"template-id": "test-template"', stdout.getvalue()) def test_get_effective_certificate_status(self): - job1 = JobDefinition({ - "id": "job1", - }) - template1 = TemplateUnit({ - "template-id": "template1", - "id": "job-{res}", - }) + job1 = JobDefinition( + { + "id": "job1", + } + ) + template1 = TemplateUnit( + { + "template-id": "template1", + "id": "job-{res}", + } + ) self.launcher.override_list = [ - ("^job1$", [("certification_status", "blocker"),]), + ( + "^job1$", + [ + ("certification_status", "blocker"), + ], + ), ] self.assertEqual( - self.launcher.get_effective_certification_status(job1), - "blocker" + self.launcher.get_effective_certification_status(job1), "blocker" ) self.assertEqual( self.launcher.get_effective_certification_status(template1), - "unspecified" + "unspecified", ) diff --git a/metabox/metabox/metabox-provider/units/basic-jobs.pxu b/metabox/metabox/metabox-provider/units/basic-jobs.pxu index 92d7431f1..b18e0a1a4 100644 --- a/metabox/metabox/metabox-provider/units/basic-jobs.pxu +++ b/metabox/metabox/metabox-provider/units/basic-jobs.pxu @@ -30,6 +30,14 @@ flags: simple command: echo variables: $Case $CASE $case environ: Case CASE case +id: sleep_1000s +flags: simple +_summary: + This job is ment to be killed, so it prints some text and sleeps for a while +command: + echo starting to sleep + sleep 1000 + id: stub/manual _summary: A simple manual job _description: @@ -246,4 +254,4 @@ plugin: shell id: dependency_installation command: dependency_installation.py _summary: Verify that all required modules are installed -_description: Verify that all required modules are installed \ No newline at end of file +_description: Verify that all required modules are installed diff --git a/metabox/metabox/metabox-provider/units/basic-tps.pxu b/metabox/metabox/metabox-provider/units/basic-tps.pxu index 16640333a..dd47b701f 100644 --- a/metabox/metabox/metabox-provider/units/basic-tps.pxu +++ b/metabox/metabox/metabox-provider/units/basic-tps.pxu @@ -46,6 +46,16 @@ include: config-environ-vars config-environ-case +unit: test plan +id: config-slow-automated +_name: Checkbox Slow Configuration Test +include: + config-environ-source + sleep_1000s + config-environ-vars + config-environ-case + + unit: test plan id: pass-and-fail _name: Pass and Fail diff --git a/metabox/metabox/scenarios/config/resume.py b/metabox/metabox/scenarios/config/resume.py new file mode 100644 index 000000000..33679024d --- /dev/null +++ b/metabox/metabox/scenarios/config/resume.py @@ -0,0 +1,62 @@ +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Written by: +# Pierre Equoy +# Massimiliano Girardi +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . +import textwrap + +from metabox.core import keys +from metabox.core.scenario import Scenario +from metabox.core.actions import Expect, Start, Signal + + +class ConfigLoadedAlsoAfterResume(Scenario): + """ + Check that configs are loaded also after resume + """ + + modes = ["local"] + launcher = textwrap.dedent( + """ + [launcher] + launcher_version = 1 + stock_reports = text + [test plan] + unit = 2021.com.canonical.certification::config-slow-automated + forced = yes + [test selection] + forced = yes + [ui] + type = silent + [environment] + var1=a + var2=b + var3=c + case=case + Case=Case + CASE=CASE + source=source + """ + ) + steps = [ + Start(), + Expect("source: source"), + Expect("starting to sleep"), + Signal(keys.SIGKILL), + Start(), + # autoresume + Expect("Case CASE case"), + ] From fb5aaf352c30ef5bef0146b8b45b4f35304b8e0d Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Wed, 27 Mar 2024 19:41:15 +0100 Subject: [PATCH 07/26] Set default argv (bugfix) (#1118) * Set default argv * pylint fix --- .../checkbox_support/scripts/eddystone_scanner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/checkbox-support/checkbox_support/scripts/eddystone_scanner.py b/checkbox-support/checkbox_support/scripts/eddystone_scanner.py index 079848cc0..71ce80e01 100644 --- a/checkbox-support/checkbox_support/scripts/eddystone_scanner.py +++ b/checkbox-support/checkbox_support/scripts/eddystone_scanner.py @@ -71,7 +71,9 @@ def callback(bt_addr, rssi, packet, additional_info): @timeout(60 * 10) # 10 minutes timeout -def main(argv): +def main(argv=None): + if argv is None: + argv = sys.argv[1:] init_bluetooth() parser = argparse.ArgumentParser( From 6495dd040c3e8296264b014df91654d29a13648d Mon Sep 17 00:00:00 2001 From: hanhsuan <32028620+hanhsuan@users.noreply.github.com> Date: Thu, 28 Mar 2024 16:22:19 +0800 Subject: [PATCH 08/26] change the naming of `check_audio_deamon.sh` to `check_audio_daemon.sh` (BugFix) (#1121) Fix the naming in issue #1117 change `deamon` to `daemon` --- providers/base/units/suspend/suspend.pxu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/providers/base/units/suspend/suspend.pxu b/providers/base/units/suspend/suspend.pxu index 677694a14..3ac3ff125 100644 --- a/providers/base/units/suspend/suspend.pxu +++ b/providers/base/units/suspend/suspend.pxu @@ -35,7 +35,7 @@ requires: package.name in ['pulseaudio-utils', 'pipewire'] _summary: Record mixer settings before suspending. command: - if check_audio_deamon.sh ; then + if check_audio_daemon.sh ; then wpctl status | sed 's/pid:.*/]/g' > "$PLAINBOX_SESSION_SHARE"/audio_settings_before_suspend else audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/audio_settings_before_suspend @@ -443,7 +443,7 @@ requires: depends: suspend/suspend_advanced_auto suspend/audio_before_suspend _description: Verify that mixer settings after suspend are the same as before suspend. command: - if check_audio_deamon.sh ; then + if check_audio_daemon.sh ; then wpctl status | sed 's/pid:.*/]/g' > "$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend else audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend @@ -461,7 +461,7 @@ requires: depends: suspend/suspend_advanced_auto suspend/audio_before_suspend _description: Verify that mixer settings after suspend are the same as before suspend. command: - if check_audio_deamon.sh ; then + if check_audio_daemon.sh ; then wpctl status | sed 's/pid:.*/]/g' > "$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend else audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend From 8b6195600ebb12c2932f292ea0dbcad12b5adc1d Mon Sep 17 00:00:00 2001 From: hanhsuan <32028620+hanhsuan@users.noreply.github.com> Date: Fri, 29 Mar 2024 15:46:56 +0800 Subject: [PATCH 09/26] migrate `keys/microphone-mute` from pulseaudio to pipewire (BugFix) (#1106) migrate from pulseaudio to pipewire This test case is missed to migrate in the #826 --- providers/base/units/keys/jobs.pxu | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/providers/base/units/keys/jobs.pxu b/providers/base/units/keys/jobs.pxu index 130f36e90..d749babb4 100644 --- a/providers/base/units/keys/jobs.pxu +++ b/providers/base/units/keys/jobs.pxu @@ -225,16 +225,22 @@ requires: manifest.has_special_keys == 'True' device.category == 'AUDIO' package.name == 'alsa-base' - package.name == 'pulseaudio-utils' + package.name in ['pulseaudio-utils', 'pipewire'] package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good' flags: also-after-suspend command: - audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings - audio_settings.py set --device=pci --volume=50 - alsa_record_playback.sh - EXIT_CODE=$? - audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings - exit $EXIT_CODE + if check_audio_daemon.sh ; then + pipewire_utils.py show -t audio + alsa_record_playback.sh + EXIT_CODE=$? + else + audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings + audio_settings.py set --device=pci --volume=50 + alsa_record_playback.sh + EXIT_CODE=$? + audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings + fi + exit $EXIT_CODE _description: PURPOSE: This test will test the mute key for your microphone From 23b62e6ee03c2a4649c49074f190fe0b271a62cd Mon Sep 17 00:00:00 2001 From: Zongmin Liu Date: Mon, 1 Apr 2024 15:19:45 +0800 Subject: [PATCH 10/26] Move checkbox-ce-oem snapcraft.yaml into contrib area (New) (#1120) * Move snapcraft.yaml into GH * Update contrib/checkbox-provider-ce-oem/series_classic20/launchers/configure Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/configure Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_classic22/launchers/configure Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/configure Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_uc22/launchers/configure Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_classic20/snap/snapcraft.yaml Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_classic22/snap/snapcraft.yaml Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_uc20/snap/snapcraft.yaml Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_uc22/snap/snapcraft.yaml Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_classic22/launchers/wrapper_local Co-authored-by: Pei Yao-Chang * Update contrib/checkbox-provider-ce-oem/series_classic22/launchers/wrapper_local Co-authored-by: Pei Yao-Chang --------- Co-authored-by: LiaoU3 <58060146+LiaoU3@users.noreply.github.com> Co-authored-by: Pei Yao-Chang --- .../series_classic20/config/config_vars | 41 ++++++ .../launchers/checkbox-cli-wrapper | 3 + .../series_classic20/launchers/configure | 66 +++++++++ .../series_classic20/launchers/shell-wrapper | 4 + .../series_classic20/launchers/test-runner | 9 ++ .../series_classic20/launchers/wrapper_local | 44 ++++++ .../series_classic20/snap/hooks/configure | 61 ++++++++ .../series_classic20/snap/hooks/install | 4 + .../series_classic20/snap/snapcraft.yaml | 100 +++++++++++++ .../series_classic22/config/config_vars | 41 ++++++ .../launchers/checkbox-cli-wrapper | 3 + .../series_classic22/launchers/configure | 66 +++++++++ .../series_classic22/launchers/shell-wrapper | 4 + .../series_classic22/launchers/test-runner | 9 ++ .../series_classic22/launchers/wrapper_local | 44 ++++++ .../series_classic22/snap/hooks/configure | 61 ++++++++ .../series_classic22/snap/hooks/install | 4 + .../series_classic22/snap/snapcraft.yaml | 100 +++++++++++++ .../series_uc20/snap/snapcraft.yaml | 57 ++++++++ .../series_uc22/config/config_vars | 41 ++++++ .../launchers/checkbox-cli-wrapper | 3 + .../series_uc22/launchers/configure | 66 +++++++++ .../series_uc22/launchers/shell-wrapper | 4 + .../series_uc22/launchers/test-runner | 12 ++ .../series_uc22/launchers/wrapper_local | 52 +++++++ .../series_uc22/snap/hooks/configure | 61 ++++++++ .../series_uc22/snap/hooks/install | 4 + .../series_uc22/snap/snapcraft.yaml | 136 ++++++++++++++++++ 28 files changed, 1100 insertions(+) create mode 100644 contrib/checkbox-provider-ce-oem/series_classic20/config/config_vars create mode 100755 contrib/checkbox-provider-ce-oem/series_classic20/launchers/checkbox-cli-wrapper create mode 100755 contrib/checkbox-provider-ce-oem/series_classic20/launchers/configure create mode 100755 contrib/checkbox-provider-ce-oem/series_classic20/launchers/shell-wrapper create mode 100755 contrib/checkbox-provider-ce-oem/series_classic20/launchers/test-runner create mode 100755 contrib/checkbox-provider-ce-oem/series_classic20/launchers/wrapper_local create mode 100755 contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/configure create mode 100755 contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/install create mode 100644 contrib/checkbox-provider-ce-oem/series_classic20/snap/snapcraft.yaml create mode 100644 contrib/checkbox-provider-ce-oem/series_classic22/config/config_vars create mode 100755 contrib/checkbox-provider-ce-oem/series_classic22/launchers/checkbox-cli-wrapper create mode 100755 contrib/checkbox-provider-ce-oem/series_classic22/launchers/configure create mode 100755 contrib/checkbox-provider-ce-oem/series_classic22/launchers/shell-wrapper create mode 100755 contrib/checkbox-provider-ce-oem/series_classic22/launchers/test-runner create mode 100755 contrib/checkbox-provider-ce-oem/series_classic22/launchers/wrapper_local create mode 100755 contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/configure create mode 100755 contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/install create mode 100644 contrib/checkbox-provider-ce-oem/series_classic22/snap/snapcraft.yaml create mode 100644 contrib/checkbox-provider-ce-oem/series_uc20/snap/snapcraft.yaml create mode 100644 contrib/checkbox-provider-ce-oem/series_uc22/config/config_vars create mode 100755 contrib/checkbox-provider-ce-oem/series_uc22/launchers/checkbox-cli-wrapper create mode 100755 contrib/checkbox-provider-ce-oem/series_uc22/launchers/configure create mode 100755 contrib/checkbox-provider-ce-oem/series_uc22/launchers/shell-wrapper create mode 100755 contrib/checkbox-provider-ce-oem/series_uc22/launchers/test-runner create mode 100755 contrib/checkbox-provider-ce-oem/series_uc22/launchers/wrapper_local create mode 100755 contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/configure create mode 100755 contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/install create mode 100644 contrib/checkbox-provider-ce-oem/series_uc22/snap/snapcraft.yaml diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/config/config_vars b/contrib/checkbox-provider-ce-oem/series_classic20/config/config_vars new file mode 100644 index 000000000..0774b445b --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic20/config/config_vars @@ -0,0 +1,41 @@ +# follow KEY=value syntax +WIFI_INTERFACE=wlan0 +# WATCHDOG_KERNEL_MOD=iTCO_wdt +# ALSADEVICE=hw:CARD=bytrt5660,DEV=0 +OPEN_N_SSID=ubuntu-cert-n-open-tpelab +OPEN_BG_SSID=ubuntu-cert-bg-open-tpelab +OPEN_AC_SSID=ubuntu-cert-ac-open-tpelab +OPEN_AX_SSID=ubuntu-cert-ax-open-tpelab +WPA_N_SSID=ubuntu-cert-n-wpa-tpelab +WPA_BG_SSID=ubuntu-cert-bg-wpa-tpelab +WPA_AC_SSID=ubuntu-cert-ac-wpa-tpelab +WPA_AX_SSID=ubuntu-cert-ax-wpa-tpelab +WPA_N_PSK=insecure +WPA_BG_PSK=insecure +WPA_AC_PSK=insecure +WPA_AX_PSK=insecure +BTDEVADDR=C0:B5:D7:C1:74:38 +# obex server in office: C0:B5:D7:C1:74:38 +# obex server in lab: 28:3A:4D:46:79:C0, 7C:B2:7D:4B:14:95 +WWAN_APN=internet +WWAN_NET_IF=ppp0 +WWAN_CONTROL_IF=ttyACM3 +STRESS_BOOT_ITERATIONS=100 +STRESS_BOOT_WAKEUP_DELAY=100 +STRESS_BOOT_WAIT_DELAY=100 +STRESS_S3_ITERATIONS=100 +STRESS_S3_SLEEP_DELAY=60 +STRESS_S3_WAIT_DELAY=100 +STRESS_S4_ITERATIONS=100 +STRESS_S4_SLEEP_DELAY=60 +STRESS_S4_WAIT_DELAY=120 +TEST_TARGET_IPERF=10.102.88.220,10.102.182.100,10.102.182.137,10.102.182.101 +# iperf server in office: 10.102.88.25 +# iperf server in lab: 10.102.182.100, 10.102.182.137 +WIFI_AP_SETUPTIME=30 +WWAN_SETUPTIME=30 +TPM2TOOLS_TCTI_NAME=device +TPM2TOOLS_DEVICE_FILE=/dev/tpm0 +MODEL_GRADE=signed +WATCHDOG_TYPE=wdat_wdt +WATCHDOG_IDENTITY=wdat_wdt diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/checkbox-cli-wrapper b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/checkbox-cli-wrapper new file mode 100755 index 000000000..aff044783 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/checkbox-cli-wrapper @@ -0,0 +1,3 @@ +#!/bin/sh + +exec checkbox-cli "$@" diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/configure b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/configure new file mode 100755 index 000000000..5c5866751 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/configure @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +# Copyright 2018-2022 Canonical Ltd. +# All rights reserved. +# +# Written by: +# Maciej Kisielewski +# Sylvain Pineau +import os +import re +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import update_configuration + from checkbox_support.snap_utils.config import print_checkbox_conf +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox20 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox20:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox20:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox20:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox20:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox20:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(1) + + +def main(): + # we need run as root to be able to write to /var/snap/... + if os.geteuid() != 0: + print('You have to run this command with sudo') + return + + if len(sys.argv) > 1 and sys.argv[1] == '-l': + print_checkbox_conf() + return + + key_re = re.compile(r"^(?:[A-Z0-9]+_?)*[A-Z](?:_?[A-Z0-9])*$") + vars_to_set = dict() + for pair in sys.argv[1:]: + k, _, v = pair.partition('=') + if not key_re.match(k) or not v: + raise SystemExit("'%s' is not a valid configuration entry. " + "Should be KEY=val" % pair) + k = k.replace('_', '-').lower() + vars_to_set[k] = v + update_configuration(vars_to_set) + + +if __name__ == '__main__': + main() diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/shell-wrapper b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/shell-wrapper new file mode 100755 index 000000000..a9a36091b --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/shell-wrapper @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "$SNAP_NAME runtime shell, type 'exit' to quit the session" +exec bash diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/test-runner b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/test-runner new file mode 100755 index 000000000..97b266c7c --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/test-runner @@ -0,0 +1,9 @@ +#!/usr/bin/env checkbox-cli-wrapper +[launcher] +app_id = com.canonical.qa.ceoem:checkbox +launcher_version = 1 +stock_reports = text, submission_files, certification + +[test plan] +unit = com.canonical.qa.ceoem::ce-oem-iot-server-20-04 +filter = com.canonical.qa.ceoem::ce-oem-iot-server-20-04* diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/wrapper_local b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/wrapper_local new file mode 100755 index 000000000..55ac79fc6 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic20/launchers/wrapper_local @@ -0,0 +1,44 @@ +#!/bin/bash + +case "$SNAP_ARCH" in + "amd64") ARCH='x86_64-linux-gnu' + ;; + "i386") ARCH='i386-linux-gnu' + ;; + "arm64") ARCH='aarch64-linux-gnu' + ;; + "armhf") ARCH='arm-linux-gnueabihf' + ;; + *) + echo "Unsupported architecture: $SNAP_ARCH" + ;; +esac + +################################################ +# Launcher common exports for any checkbox app # +################################################ + +RUNTIME=/snap/checkbox20/current +if [ ! -d "$RUNTIME" ]; then + echo "You need to install the checkbox20 snap." + echo "" + echo "You can do this with this command:" + echo "snap install checkbox20" + exit 1 +fi + +export LC_ALL=C.UTF-8 +PERL_VERSION=$(perl -e '$^V=~/^v(\d+\.\d+)/;print $1') +export PERL5LIB="$PERL5LIB:$SNAP/usr/lib/$ARCH/perl/$PERL_VERSION:$SNAP/usr/lib/$ARCH/perl5/$PERL_VERSION:$SNAP/usr/share/perl/$PERL_VERSION:$SNAP/usr/share/perl5" +export GI_TYPELIB_PATH=$SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$ARCH/girepository-1.0 +export PATH="$PATH:$SNAP/usr/bin:$SNAP/usr/sbin:$SNAP/sbin:/snap/bin" +export PYTHONPATH="$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH" + +if [ -e $RUNTIME/wrapper_common_classic ]; then + . $RUNTIME/wrapper_common_classic +else + echo "ERROR: no $RUNTIME/wrapper_common_classic found" + exit 0 +fi + +exec "$@" diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/configure b/contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/configure new file mode 100755 index 000000000..9be27e577 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/configure @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# Copyright 2017-2022 Canonical Ltd. +# All rights reserved. + +""" +This hook reads `config_vars` file from the root of a snap and reenters this +configuration using snapd's config facilities and rewrites the file to a +checkbox config format in `$SNAP_DATA/checkbox.conf`. + +config_vars should list all the configuration variables in a `key=value` +syntax. The line can list variable name only, if the variable should not have a +default value. All keys should comprise of CAPS, numbers and undescores (_). +E.g.: + +OPEN_N_SSID +OPEN_BG_SSID +STRESS_S3_WAIT_DELAY=60 + +To change those values use the configure launcher. +E.g. + $ checkbox-iiotg.configure OPEN_N_SSID=my-wifi + +If you __really__ need to change those values using `snap set` command, +you need to change CAPS to lowercase and underscores to dashes (-). + +E.g. + $ snap set checkbox-iiotg open-n-ssid=my-wifi +""" + +import os +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import refresh_configuration +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox22 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox22:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox22:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox22:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox22:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox22:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(0) +refresh_configuration() diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/install b/contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/install new file mode 100755 index 000000000..068b51828 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/install @@ -0,0 +1,4 @@ +#!/bin/sh + +set -e +snapctl set slave=disabled diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/snap/snapcraft.yaml b/contrib/checkbox-provider-ce-oem/series_classic20/snap/snapcraft.yaml new file mode 100644 index 000000000..f7ef21165 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic20/snap/snapcraft.yaml @@ -0,0 +1,100 @@ +name: checkbox-ce-oem +summary: Checkbox CE OEM test runner and public providers for 20.04 classic +description: "Checkbox CE OEM test runner and public providers for 20.04 classic" +confinement: classic +grade: stable + +version: '1.0-focal' + +base: core20 + +apps: + checkbox-cli: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper + configure: + command-chain: [bin/wrapper_local] + command: bin/configure + remote-slave: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper slave + daemon: simple + restart-condition: on-failure + shell: + command-chain: [bin/wrapper_local] + command: bin/shell-wrapper + test-runner: + command-chain: [bin/wrapper_local] + command: bin/test-runner + +passthrough: + hooks: + configure: + command-chain: [bin/wrapper_local] + +parts: + checkbox-provider-ce-oem: + plugin: dump + source: https://github.com/canonical/checkbox-provider-ce-oem.git + source-type: git + stage-packages: + - alsa-utils + - mtd-utils + - u-boot-tools + - v4l-utils + - device-tree-compiler + - linuxptp + - snmp + override-prime: | + snapcraftctl prime + rm lib/systemd/system/alsa-utils.service + override-build: | + export PYTHONPATH=/snap/checkbox20/current/lib/python3.8/site-packages/ + for path in $(find "/snap/checkbox20/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done + cd checkbox-provider-ce-oem + python3 manage.py validate + python3 manage.py build + python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$SNAPCRAFT_PART_INSTALL" + build-snaps: + - checkbox20 + build-packages: + - python3-dev + - python3-jinja2 + - python3-packaging + - python3-urwid + - python3-xlsxwriter + - python3-requests-oauthlib + input-pcspkr: + plugin: nil + build-packages: + - gcc + - libc6-dev + override-build: | + mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/bin + gcc ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep + cp -v ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ + + parts-meta-info: + plugin: nil + override-build: | + snapcraftctl build + for p in `ls -d ../../*`; do + if [ -d $p/src ]; then + (cd $p/src + if [ -d $p/src/.git ]; then + (echo `basename $p`\: && git show --pretty=format:"%h%d %aN %ci%n%s%n" -q ; echo ) >> $SNAPCRAFT_PART_INSTALL/parts_meta_info + fi # for additional `source-type` support, elif them here + ) + fi + done + after: [checkbox-provider-ce-oem] + launchers: + plugin: dump + source: launchers/ + build-attributes: [no-patchelf] + organize: + '*': bin/ + config-variables: + plugin: dump + source: config/ + build-attributes: [no-patchelf] diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/config/config_vars b/contrib/checkbox-provider-ce-oem/series_classic22/config/config_vars new file mode 100644 index 000000000..22488acbf --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic22/config/config_vars @@ -0,0 +1,41 @@ +# follow KEY=value syntax +WIFI_INTERFACE=wlan0 +# WATCHDOG_KERNEL_MOD=iTCO_wdt +# ALSADEVICE=hw:CARD=bytrt5660,DEV=0 +OPEN_N_SSID=ubuntu-cert-n-open-tpelab +OPEN_BG_SSID=ubuntu-cert-bg-open-tpelab +OPEN_AC_SSID=ubuntu-cert-ac-open-tpelab +OPEN_AX_SSID=ubuntu-cert-ax-open +WPA_N_SSID=ubuntu-cert-n-wpa-tpelab +WPA_BG_SSID=ubuntu-cert-bg-wpa-tpelab +WPA_AC_SSID=ubuntu-cert-ac-wpa-tpelab +WPA_AX_SSID=ubuntu-cert-ax-wpa +WPA_N_PSK=insecure +WPA_BG_PSK=insecure +WPA_AC_PSK=insecure +WPA_AX_PSK=insecure +BTDEVADDR=C0:B5:D7:C1:74:38 +# obex server in office: C0:B5:D7:C1:74:38 +# obex server in lab: 28:3A:4D:46:79:C0, 7C:B2:7D:4B:14:95 +WWAN_APN=internet +WWAN_NET_IF=ppp0 +WWAN_CONTROL_IF=ttyACM3 +STRESS_BOOT_ITERATIONS=100 +STRESS_S3_ITERATIONS=100 +STRESS_S4_ITERATIONS=100 +TEST_TARGET_IPERF=10.102.88.25,10.102.182.100,10.102.182.137,10.102.182.101 +# iperf server in office: 10.102.88.25 +# iperf server in lab: 10.102.182.100, 10.102.182.137 +STRESS_S4_WAIT_DELAY=120 +STRESS_S4_SLEEP_DELAY=60 +STRESS_S3_SLEEP_DELAY=60 +STRESS_BOOT_WAKEUP_DELAY=120 +STRESS_S3_WAIT_DELAY=150 +STRESS_BOOT_WAIT_DELAY=150 +WIFI_AP_SETUPTIME=30 +WWAN_SETUPTIME=30 +TPM2TOOLS_TCTI_NAME=device +TPM2TOOLS_DEVICE_FILE=/dev/tpm0 +MODEL_GRADE=signed +WATCHDOG_TYPE=wdat_wdt +WATCHDOG_IDENTITY=wdat_wdt diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/checkbox-cli-wrapper b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/checkbox-cli-wrapper new file mode 100755 index 000000000..aff044783 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/checkbox-cli-wrapper @@ -0,0 +1,3 @@ +#!/bin/sh + +exec checkbox-cli "$@" diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/configure b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/configure new file mode 100755 index 000000000..cff8c05bd --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/configure @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +# Copyright 2018-2022 Canonical Ltd. +# All rights reserved. +# +# Written by: +# Maciej Kisielewski +# Sylvain Pineau +import os +import re +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import update_configuration + from checkbox_support.snap_utils.config import print_checkbox_conf +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox22 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox22:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox22:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox22:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox22:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox22:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(1) + + +def main(): + # we need run as root to be able to write to /var/snap/... + if os.geteuid() != 0: + print('You have to run this command with sudo') + return + + if len(sys.argv) > 1 and sys.argv[1] == '-l': + print_checkbox_conf() + return + + key_re = re.compile(r"^(?:[A-Z0-9]+_?)*[A-Z](?:_?[A-Z0-9])*$") + vars_to_set = dict() + for pair in sys.argv[1:]: + k, _, v = pair.partition('=') + if not key_re.match(k) or not v: + raise SystemExit("'%s' is not a valid configuration entry. " + "Should be KEY=val" % pair) + k = k.replace('_', '-').lower() + vars_to_set[k] = v + update_configuration(vars_to_set) + + +if __name__ == '__main__': + main() diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/shell-wrapper b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/shell-wrapper new file mode 100755 index 000000000..a9a36091b --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/shell-wrapper @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "$SNAP_NAME runtime shell, type 'exit' to quit the session" +exec bash diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/test-runner b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/test-runner new file mode 100755 index 000000000..1abc7ca4e --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/test-runner @@ -0,0 +1,9 @@ +#!/usr/bin/env checkbox-cli-wrapper +[launcher] +app_id = com.canonical.qa.ceoem:checkbox +launcher_version = 1 +stock_reports = text, submission_files, certification + +[test plan] +unit = com.canonical.qa.ceoem::ce-oem-iot-server-22-04 +filter = com.canonical.qa.ceoem::ce-oem-iot-server-22-04* diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/wrapper_local b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/wrapper_local new file mode 100755 index 000000000..fa652071b --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic22/launchers/wrapper_local @@ -0,0 +1,44 @@ +#!/bin/bash + +case "$SNAP_ARCH" in + "amd64") ARCH='x86_64-linux-gnu' + ;; + "i386") ARCH='i386-linux-gnu' + ;; + "arm64") ARCH='aarch64-linux-gnu' + ;; + "armhf") ARCH='arm-linux-gnueabihf' + ;; + *) + echo "Unsupported architecture: $SNAP_ARCH" + ;; +esac + +################################################ +# Launcher common exports for any checkbox app # +################################################ + +RUNTIME=/snap/checkbox22/current +if [ ! -d "$RUNTIME" ]; then + echo "You need to install the checkbox22 snap." + echo "" + echo "You can do this with this command:" + echo "snap install checkbox22" + exit 1 +fi + +export LC_ALL=C.UTF-8 +PERL_VERSION=$(perl -e '$^V=~/^v(\d+\.\d+)/;print $1') +export PERL5LIB="$PERL5LIB:$SNAP/usr/lib/$ARCH/perl/$PERL_VERSION:$SNAP/usr/lib/$ARCH/perl5/$PERL_VERSION:$SNAP/usr/share/perl/$PERL_VERSION:$SNAP/usr/share/perl5" +export GI_TYPELIB_PATH=$SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$ARCH/girepository-1.0 +export PATH="$PATH:$SNAP/usr/bin:$SNAP/usr/sbin:$SNAP/sbin:/snap/bin" +export PYTHONPATH="$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH" + +if [ -e $RUNTIME/wrapper_common_classic ]; then + . $RUNTIME/wrapper_common_classic +else + echo "ERROR: no $RUNTIME/wrapper_common_classic found" + exit 0 +fi + +exec "$@" diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/configure b/contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/configure new file mode 100755 index 000000000..9be27e577 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/configure @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# Copyright 2017-2022 Canonical Ltd. +# All rights reserved. + +""" +This hook reads `config_vars` file from the root of a snap and reenters this +configuration using snapd's config facilities and rewrites the file to a +checkbox config format in `$SNAP_DATA/checkbox.conf`. + +config_vars should list all the configuration variables in a `key=value` +syntax. The line can list variable name only, if the variable should not have a +default value. All keys should comprise of CAPS, numbers and undescores (_). +E.g.: + +OPEN_N_SSID +OPEN_BG_SSID +STRESS_S3_WAIT_DELAY=60 + +To change those values use the configure launcher. +E.g. + $ checkbox-iiotg.configure OPEN_N_SSID=my-wifi + +If you __really__ need to change those values using `snap set` command, +you need to change CAPS to lowercase and underscores to dashes (-). + +E.g. + $ snap set checkbox-iiotg open-n-ssid=my-wifi +""" + +import os +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import refresh_configuration +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox22 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox22:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox22:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox22:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox22:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox22:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(0) +refresh_configuration() diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/install b/contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/install new file mode 100755 index 000000000..068b51828 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/install @@ -0,0 +1,4 @@ +#!/bin/sh + +set -e +snapctl set slave=disabled diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/snap/snapcraft.yaml b/contrib/checkbox-provider-ce-oem/series_classic22/snap/snapcraft.yaml new file mode 100644 index 000000000..ba5b47fe7 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_classic22/snap/snapcraft.yaml @@ -0,0 +1,100 @@ +name: checkbox-ce-oem +summary: Checkbox CE OEM test runner and public providers for 22.04 classic +description: "Checkbox CE OEM test runner and public providers for 22.04 classic" +confinement: classic +grade: stable + +version: '1.0-jammy' + +base: core22 + +apps: + checkbox-cli: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper + configure: + command-chain: [bin/wrapper_local] + command: bin/configure + remote-slave: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper slave + daemon: simple + restart-condition: on-failure + shell: + command-chain: [bin/wrapper_local] + command: bin/shell-wrapper + test-runner: + command-chain: [bin/wrapper_local] + command: bin/test-runner + +passthrough: + hooks: + configure: + command-chain: [bin/wrapper_local] + +parts: + checkbox-provider-ce-oem: + plugin: dump + source: https://github.com/canonical/checkbox-provider-ce-oem.git + source-type: git + stage-packages: + - alsa-utils + - mtd-utils + - u-boot-tools + - v4l-utils + - device-tree-compiler + - linuxptp + - snmp + override-prime: | + snapcraftctl prime + rm lib/systemd/system/alsa-utils.service + override-build: | + export PYTHONPATH=/snap/checkbox22/current/lib/python3.10/site-packages/ + for path in $(find "/snap/checkbox22/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done + cd checkbox-provider-ce-oem + python3 manage.py validate + python3 manage.py build + python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$SNAPCRAFT_PART_INSTALL" + build-snaps: + - checkbox22 + build-packages: + - python3-dev + - python3-jinja2 + - python3-packaging + - python3-urwid + - python3-xlsxwriter + - python3-requests-oauthlib + input-pcspkr: + plugin: nil + build-packages: + - gcc + - libc6-dev + override-build: | + mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/bin + gcc ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep + cp -v ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ + + parts-meta-info: + plugin: nil + override-build: | + snapcraftctl build + for p in `ls -d ../../*`; do + if [ -d $p/src ]; then + (cd $p/src + if [ -d $p/src/.git ]; then + (echo `basename $p`\: && git show --pretty=format:"%h%d %aN %ci%n%s%n" -q ; echo ) >> $SNAPCRAFT_PART_INSTALL/parts_meta_info + fi # for additional `source-type` support, elif them here + ) + fi + done + after: [checkbox-provider-ce-oem] + launchers: + plugin: dump + source: launchers/ + build-attributes: [no-patchelf] + organize: + '*': bin/ + config-variables: + plugin: dump + source: config/ + build-attributes: [no-patchelf] diff --git a/contrib/checkbox-provider-ce-oem/series_uc20/snap/snapcraft.yaml b/contrib/checkbox-provider-ce-oem/series_uc20/snap/snapcraft.yaml new file mode 100644 index 000000000..cfa757d7c --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc20/snap/snapcraft.yaml @@ -0,0 +1,57 @@ +name: checkbox-ce-oem +summary: Checkbox CE OEM and public providers +description: "Checkbox CE OEM and public providers" +confinement: strict +grade: stable + +version: '1.0-focal' + +base: core20 + +slots: + provider-ce-oem: + interface: content + read: + - $SNAP/providers/checkbox-provider-ce-oem + +parts: + checkbox-provider-ce-oem: + plugin: dump + source: https://github.com/canonical/checkbox-provider-ce-oem.git + source-type: git + stage-packages: + - alsa-utils + - mtd-utils + - u-boot-tools + - v4l-utils + - device-tree-compiler + - linuxptp + - snmp + override-prime: | + snapcraftctl prime + rm lib/systemd/system/alsa-utils.service + override-build: | + export PYTHONPATH=/snap/checkbox20/current/lib/python3.8/site-packages/ + for path in $(find "/snap/checkbox20/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done + cd checkbox-provider-ce-oem + python3 manage.py validate + python3 manage.py build + python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$SNAPCRAFT_PART_INSTALL" + build-snaps: + - checkbox20 + build-packages: + - python3-dev + - python3-jinja2 + - python3-packaging + - python3-urwid + - python3-xlsxwriter + - python3-requests-oauthlib + input-pcspkr: + plugin: nil + build-packages: + - gcc + - libc6-dev + override-build: | + mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/bin + gcc ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep + cp -v ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/config/config_vars b/contrib/checkbox-provider-ce-oem/series_uc22/config/config_vars new file mode 100644 index 000000000..22488acbf --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc22/config/config_vars @@ -0,0 +1,41 @@ +# follow KEY=value syntax +WIFI_INTERFACE=wlan0 +# WATCHDOG_KERNEL_MOD=iTCO_wdt +# ALSADEVICE=hw:CARD=bytrt5660,DEV=0 +OPEN_N_SSID=ubuntu-cert-n-open-tpelab +OPEN_BG_SSID=ubuntu-cert-bg-open-tpelab +OPEN_AC_SSID=ubuntu-cert-ac-open-tpelab +OPEN_AX_SSID=ubuntu-cert-ax-open +WPA_N_SSID=ubuntu-cert-n-wpa-tpelab +WPA_BG_SSID=ubuntu-cert-bg-wpa-tpelab +WPA_AC_SSID=ubuntu-cert-ac-wpa-tpelab +WPA_AX_SSID=ubuntu-cert-ax-wpa +WPA_N_PSK=insecure +WPA_BG_PSK=insecure +WPA_AC_PSK=insecure +WPA_AX_PSK=insecure +BTDEVADDR=C0:B5:D7:C1:74:38 +# obex server in office: C0:B5:D7:C1:74:38 +# obex server in lab: 28:3A:4D:46:79:C0, 7C:B2:7D:4B:14:95 +WWAN_APN=internet +WWAN_NET_IF=ppp0 +WWAN_CONTROL_IF=ttyACM3 +STRESS_BOOT_ITERATIONS=100 +STRESS_S3_ITERATIONS=100 +STRESS_S4_ITERATIONS=100 +TEST_TARGET_IPERF=10.102.88.25,10.102.182.100,10.102.182.137,10.102.182.101 +# iperf server in office: 10.102.88.25 +# iperf server in lab: 10.102.182.100, 10.102.182.137 +STRESS_S4_WAIT_DELAY=120 +STRESS_S4_SLEEP_DELAY=60 +STRESS_S3_SLEEP_DELAY=60 +STRESS_BOOT_WAKEUP_DELAY=120 +STRESS_S3_WAIT_DELAY=150 +STRESS_BOOT_WAIT_DELAY=150 +WIFI_AP_SETUPTIME=30 +WWAN_SETUPTIME=30 +TPM2TOOLS_TCTI_NAME=device +TPM2TOOLS_DEVICE_FILE=/dev/tpm0 +MODEL_GRADE=signed +WATCHDOG_TYPE=wdat_wdt +WATCHDOG_IDENTITY=wdat_wdt diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/checkbox-cli-wrapper b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/checkbox-cli-wrapper new file mode 100755 index 000000000..aff044783 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/checkbox-cli-wrapper @@ -0,0 +1,3 @@ +#!/bin/sh + +exec checkbox-cli "$@" diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/configure b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/configure new file mode 100755 index 000000000..cff8c05bd --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/configure @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +# Copyright 2018-2022 Canonical Ltd. +# All rights reserved. +# +# Written by: +# Maciej Kisielewski +# Sylvain Pineau +import os +import re +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import update_configuration + from checkbox_support.snap_utils.config import print_checkbox_conf +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox22 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox22:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox22:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox22:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox22:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox22:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(1) + + +def main(): + # we need run as root to be able to write to /var/snap/... + if os.geteuid() != 0: + print('You have to run this command with sudo') + return + + if len(sys.argv) > 1 and sys.argv[1] == '-l': + print_checkbox_conf() + return + + key_re = re.compile(r"^(?:[A-Z0-9]+_?)*[A-Z](?:_?[A-Z0-9])*$") + vars_to_set = dict() + for pair in sys.argv[1:]: + k, _, v = pair.partition('=') + if not key_re.match(k) or not v: + raise SystemExit("'%s' is not a valid configuration entry. " + "Should be KEY=val" % pair) + k = k.replace('_', '-').lower() + vars_to_set[k] = v + update_configuration(vars_to_set) + + +if __name__ == '__main__': + main() diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/shell-wrapper b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/shell-wrapper new file mode 100755 index 000000000..a9a36091b --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/shell-wrapper @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "$SNAP_NAME runtime shell, type 'exit' to quit the session" +exec bash diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/test-runner b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/test-runner new file mode 100755 index 000000000..e32842ba7 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/test-runner @@ -0,0 +1,12 @@ +#!/usr/bin/env checkbox-cli-wrapper +[launcher] +app_id = com.canonical.qa.ceoem:checkbox +launcher_version = 1 +stock_reports = text, submission_files, certification + +[test plan] +unit = com.canonical.qa.ceoem::ce-oem-iot-ubuntucore-22-automated +filter = com.canonical.qa.ceoem::ce-oem-iot-ubuntucore-22 + com.canonical.qa.ceoem::ce-oem-iot-ubuntucore-22-manual + com.canonical.qa.ceoem::ce-oem-iot-ubuntucore-22-automated + com.canonical.qa.ceoem::ce-oem-iot-ubuntucore-22-stress diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/wrapper_local b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/wrapper_local new file mode 100755 index 000000000..76aa1597e --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc22/launchers/wrapper_local @@ -0,0 +1,52 @@ +#!/bin/bash + +case "$SNAP_ARCH" in + "amd64") ARCH='x86_64-linux-gnu' + ;; + "i386") ARCH='i386-linux-gnu' + ;; + "arm64") ARCH='aarch64-linux-gnu' + ;; + "armhf") ARCH='arm-linux-gnueabihf' + ;; + *) + echo "Unsupported architecture: $SNAP_ARCH" + ;; +esac + +################################################ +# Launcher common exports for any checkbox app # +################################################ + +if [ -d $SNAP/checkbox-runtime ]; then + RUNTIME=$SNAP/checkbox-runtime + if [ ! -d $RUNTIME/usr ]; then + echo "You need to connect this snap to the checkbox22 snap." + echo "" + echo "You can do this with those commands:" + echo "snap install checkbox22" + echo "snap connect $SNAP_NAME:checkbox-runtime checkbox22:checkbox-runtime" + exit 1 + fi +fi + +export LC_ALL=C.UTF-8 +PERL_VERSION=$(perl -e '$^V=~/^v(\d+\.\d+)/;print $1') +export PERL5LIB="$PERL5LIB:$SNAP/usr/lib/$ARCH/perl/$PERL_VERSION:$SNAP/usr/lib/$ARCH/perl5/$PERL_VERSION:$SNAP/usr/share/perl/$PERL_VERSION:$SNAP/usr/share/perl5" +export GI_TYPELIB_PATH=$SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$ARCH/girepository-1.0 +export PATH="$PATH:$SNAP/usr/bin:$SNAP/usr/sbin:$SNAP/sbin:/snap/bin" +export PYTHONPATH="$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH" + +if [ -e $RUNTIME/wrapper_common ]; then + . $RUNTIME/wrapper_common +else + CGROUP_NAME=$(cat /proc/self/cgroup | grep -e "^1:name") + if [[ "$CGROUP_NAME" == *"hook.configure"* ]]; then + echo "Running in configure hook, wrapper_common not required" + else + echo "ERROR: no $RUNTIME/wrapper_common found" + exit 0 + fi +fi + +exec "$@" diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/configure b/contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/configure new file mode 100755 index 000000000..93e3cf914 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/configure @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# Copyright 2017-2022 Canonical Ltd. +# All rights reserved. + +""" +This hook reads `config_vars` file from the root of a snap and reenters this +configuration using snapd's config facilities and rewrites the file to a +checkbox config format in `$SNAP_DATA/checkbox.conf`. + +config_vars should list all the configuration variables in a `key=value` +syntax. The line can list variable name only, if the variable should not have a +default value. All keys should comprise of CAPS, numbers and undescores (_). +E.g.: + +OPEN_N_SSID +OPEN_BG_SSID +STRESS_S3_WAIT_DELAY=60 + +To change those values use the configure launcher. +E.g. + $ checkbox-ce-oem.configure OPEN_N_SSID=my-wifi + +If you __really__ need to change those values using `snap set` command, +you need to change CAPS to lowercase and underscores to dashes (-). + +E.g. + $ snap set checkbox-ce-oem open-n-ssid=my-wifi +""" + +import os +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import refresh_configuration +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox22 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox22:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox22:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox22:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox22:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox22:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(0) +refresh_configuration() diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/install b/contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/install new file mode 100755 index 000000000..068b51828 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/install @@ -0,0 +1,4 @@ +#!/bin/sh + +set -e +snapctl set slave=disabled diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/snap/snapcraft.yaml b/contrib/checkbox-provider-ce-oem/series_uc22/snap/snapcraft.yaml new file mode 100644 index 000000000..1ada71599 --- /dev/null +++ b/contrib/checkbox-provider-ce-oem/series_uc22/snap/snapcraft.yaml @@ -0,0 +1,136 @@ +name: checkbox-ce-oem +summary: Checkbox CE OEM test runner and public providers +description: "Checkbox CE OEM test runner and public providers" +confinement: strict +grade: stable + +version: '1.0-jammy' + +base: core22 + +plugs: + checkbox-runtime: + interface: content + target: $SNAP/checkbox-runtime + default-provider: checkbox22 + provider-resource: + interface: content + target: $SNAP/providers/plainbox-provider-resource + default-provider: checkbox22 + provider-checkbox: + interface: content + target: $SNAP/providers/plainbox-provider-checkbox + default-provider: checkbox22 + provider-tpm2: + interface: content + target: $SNAP/providers/plainbox-provider-tpm2 + default-provider: checkbox22 + provider-certification-client: + interface: content + target: $SNAP/providers/plainbox-provider-certification-client + default-provider: checkbox22 +apps: + checkbox-cli: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper + plugs: &standard [home, network-bind, hardware-observe, bluez, bluetooth-control, + gpio, modem-manager, mount-observe, network-manager, pulseaudio, serial-port, + system-observe, tpm, timezone-control, timeserver-control] + configure: + command-chain: [bin/wrapper_local] + command: bin/configure + remote-slave: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper slave + daemon: simple + restart-condition: on-failure + plugs: *standard + shell: + command-chain: [bin/wrapper_local] + command: bin/shell-wrapper + plugs: *standard + test-runner: + command-chain: [bin/wrapper_local] + command: bin/test-runner + plugs: *standard + +passthrough: + hooks: + configure: + command-chain: [bin/wrapper_local] + +slots: + provider-ce-oem: + interface: content + read: + - $SNAP/providers/checkbox-provider-ce-oem + +parts: + checkbox-provider-ce-oem: + plugin: dump + source: https://github.com/canonical/checkbox-provider-ce-oem.git + source-type: git + stage-packages: + - alsa-utils + - mtd-utils + - u-boot-tools + - v4l-utils + - device-tree-compiler + - linuxptp + - snmp + override-prime: | + snapcraftctl prime + rm lib/systemd/system/alsa-utils.service + override-build: | + export PYTHONPATH=/snap/checkbox22/current/lib/python3.10/site-packages/ + for path in $(find "/snap/checkbox22/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done + cd checkbox-provider-ce-oem + python3 manage.py validate + python3 manage.py build + python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$SNAPCRAFT_PART_INSTALL" + build-snaps: + - checkbox22 + build-packages: + - python3-dev + - python3-jinja2 + - python3-packaging + - python3-urwid + - python3-xlsxwriter + - python3-requests-oauthlib + input-pcspkr: + plugin: nil + build-packages: + - gcc + - libc6-dev + override-build: | + mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/bin + gcc ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep + cp -v ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ + + parts-meta-info: + plugin: nil + override-build: | + snapcraftctl build + for p in `ls -d ../../*`; do + if [ -d $p/src ]; then + (cd $p/src + if [ -d $p/src/.git ]; then + (echo `basename $p`\: && git show --pretty=format:"%h%d %aN %ci%n%s%n" -q ; echo ) >> $SNAPCRAFT_PART_INSTALL/parts_meta_info + fi # for additional `source-type` support, elif them here + ) + fi + done + after: [checkbox-provider-ce-oem] + launchers: + plugin: dump + source: launchers/ + organize: + '*': bin/ + config-variables: + plugin: dump + source: config/ + +layout: + # This is an workaround to access alsa config on UC22 core image + /usr/share/alsa: + bind: $SNAP/usr/share/alsa From b8c3b7f4f866ab8632ed5bcf78f0384320cb9d9a Mon Sep 17 00:00:00 2001 From: stanley31huang Date: Mon, 1 Apr 2024 17:06:42 +0800 Subject: [PATCH 11/26] Add Software RAID mode validation test using mdadm (New) (#1123) * Add: check multiple devices (software RAID) adding new test cases to validate the mode of multiple devices (software RAID) --------- Co-authored-by: Pierre Equoy --- .../series20/snap/snapcraft.yaml | 1 + .../series22/snap/snapcraft.yaml | 1 + providers/base/bin/check_software_raid.py | 143 ++++++++++++++++++ .../base/tests/test_check_software_raid.py | 91 +++++++++++ .../base/tests/test_data/mdstat_intel_rst.txt | 8 + .../tests/test_data/mdstat_multiple_raid.txt | 7 + .../base/tests/test_data/mdstat_none_raid.txt | 2 + providers/base/units/disk/jobs.pxu | 19 ++- providers/base/units/disk/manifest.pxu | 4 + providers/base/units/disk/packaging.pxu | 5 + providers/base/units/disk/test-plan.pxu | 2 + 11 files changed, 282 insertions(+), 1 deletion(-) create mode 100755 providers/base/bin/check_software_raid.py create mode 100644 providers/base/tests/test_check_software_raid.py create mode 100644 providers/base/tests/test_data/mdstat_intel_rst.txt create mode 100644 providers/base/tests/test_data/mdstat_multiple_raid.txt create mode 100644 providers/base/tests/test_data/mdstat_none_raid.txt create mode 100644 providers/base/units/disk/manifest.pxu diff --git a/checkbox-core-snap/series20/snap/snapcraft.yaml b/checkbox-core-snap/series20/snap/snapcraft.yaml index a3f3db83e..ff13eae09 100644 --- a/checkbox-core-snap/series20/snap/snapcraft.yaml +++ b/checkbox-core-snap/series20/snap/snapcraft.yaml @@ -337,6 +337,7 @@ parts: - wget - wmctrl - xz-utils + - mdadm - on armhf: - python3-rpi.gpio # only in focal - on arm64: diff --git a/checkbox-core-snap/series22/snap/snapcraft.yaml b/checkbox-core-snap/series22/snap/snapcraft.yaml index c1b25c0a5..db0f7a8de 100644 --- a/checkbox-core-snap/series22/snap/snapcraft.yaml +++ b/checkbox-core-snap/series22/snap/snapcraft.yaml @@ -341,6 +341,7 @@ parts: - wmctrl - xz-utils - rt-tests # For realtime performance test + - mdadm - on armhf: - python3-rpi.gpio # only in focal - on arm64: diff --git a/providers/base/bin/check_software_raid.py b/providers/base/bin/check_software_raid.py new file mode 100755 index 000000000..586c02f11 --- /dev/null +++ b/providers/base/bin/check_software_raid.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Written by: +# Stanley Huang +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . + +import re +import sys +import logging +import argparse +import shlex +import subprocess +from pathlib import Path +from typing import Dict + + +class RAIDStats(Dict): + device = str + mode = str + + +def get_md_stat(filename: str = "/proc/mdstat") -> list: + """ + Parse the information of RAID devices from /dev/mdstat + + Returns: + raid_stats (list): the RAID information + """ + pattern = r"^(md[0-9]+) : active ([a-z0-9]+) [a-z0-9 \[\]]+$" + raid_raw_data = "" + raid_stats = [] + + with Path(filename) as node: + raid_raw_data = node.read_text().strip("\n") + + for tmp_data in raid_raw_data.split("\n"): + find_result = re.search(pattern, tmp_data) + if find_result: + raid_node = RAIDStats( + device=find_result.groups()[0], + mode=find_result.groups()[1] + ) + raid_stats.append(raid_node) + + return raid_stats + + +def dump_raid_info(nodes: list) -> None: + """ + Display detail information for all of RAID devices + + Args: + nodes (list): the name of MD devices + """ + for node in nodes: + subprocess.run(shlex.split("mdadm -D /dev/{}".format(node))) + + +def check_raid_mode_test(modes: str) -> None: + """ + Validate the RAID modes running on the system is expected + + Args: + modes (str): the expected RAID modes on the system + + Raises: + ValueError: when if RAID modes are not expected + """ + expected_modes = modes.strip().split() + cur_raid_stats = get_md_stat() + + active_mode = [stat["mode"] for stat in cur_raid_stats] + logging.info("Active RAID mode on the system: %s", active_mode) + logging.info("Expected RAID mode: %s", expected_modes) + + dump_raid_info( + [stat["device"] for stat in cur_raid_stats] + ) + + if sorted(expected_modes) == sorted(active_mode): + logging.info("PASS: RAID mode on the system is expected") + else: + raise ValueError("RAID mode on the system is not expected") + + +def register_arguments(): + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description='Check RAID stats and compare mode is expected') + parser.add_argument( + "--mode", + required=True, + type=str, + help="The RAID mode is enabeld on the running system", + ) + + args = parser.parse_args() + return args + + +if __name__ == "__main__": + + root_logger = logging.getLogger() + root_logger.setLevel(logging.INFO) + logger_format = "%(asctime)s %(levelname)-8s %(message)s" + date_format = "%Y-%m-%d %H:%M:%S" + + # Log DEBUG and INFO to stdout, others to stderr + stdout_handler = logging.StreamHandler(sys.stdout) + stdout_handler.setFormatter(logging.Formatter(logger_format, date_format)) + + stderr_handler = logging.StreamHandler(sys.stderr) + stderr_handler.setFormatter(logging.Formatter(logger_format, date_format)) + + stdout_handler.setLevel(logging.DEBUG) + stderr_handler.setLevel(logging.WARNING) + + # Add a filter to the stdout handler to limit log records to + # INFO level and below + stdout_handler.addFilter(lambda record: record.levelno <= logging.INFO) + + root_logger.addHandler(stderr_handler) + root_logger.addHandler(stdout_handler) + + args = register_arguments() + + try: + check_raid_mode_test(args.mode) + except Exception as err: + logging.error(err) diff --git a/providers/base/tests/test_check_software_raid.py b/providers/base/tests/test_check_software_raid.py new file mode 100644 index 000000000..145c0d8e7 --- /dev/null +++ b/providers/base/tests/test_check_software_raid.py @@ -0,0 +1,91 @@ +import sys +import unittest +from unittest.mock import patch +import check_software_raid + + +class TestCheckSoftwareRAID(unittest.TestCase): + + def test_get_md_stat_intel_raid(self): + + expected_data = [ + {"device": "md126", "mode": "raid0"} + ] + raid_data = check_software_raid.get_md_stat( + "tests/test_data/mdstat_intel_rst.txt" + ) + self.assertListEqual(raid_data, expected_data) + + def test_get_md_stat_multiple_raid(self): + + expected_data = [ + {"device": "md2", "mode": "raid1"}, + {"device": "md1", "mode": "raid0"} + ] + raid_data = check_software_raid.get_md_stat( + "tests/test_data/mdstat_multiple_raid.txt" + ) + self.assertListEqual(raid_data, expected_data) + + def test_get_md_stat_empty(self): + + raid_data = check_software_raid.get_md_stat( + "tests/test_data/mdstat_none_raid.txt" + ) + self.assertListEqual(raid_data, []) + + @patch("check_software_raid.dump_raid_info") + @patch("check_software_raid.get_md_stat") + def test_check_raid_mode_is_expected(self, mock_get_md, mock_dump_raid): + + mock_get_md.return_value = [ + {"device": "md2", "mode": "raid1"}, + {"device": "md1", "mode": "raid0"} + ] + + check_software_raid.check_raid_mode_test("raid1 raid0") + mock_get_md.assert_called_with() + mock_dump_raid.assert_called_with(["md2", "md1"]) + + @patch("check_software_raid.dump_raid_info") + @patch("check_software_raid.get_md_stat") + def test_check_raid_mode_param_with_redundant_space( + self, mock_get_md, mock_dump_raid): + + mock_get_md.return_value = [ + {"device": "md2", "mode": "raid1"}, + {"device": "md1", "mode": "raid0"} + ] + + check_software_raid.check_raid_mode_test(" raid1 raid0 ") + mock_get_md.assert_called_with() + mock_dump_raid.assert_called_with(["md2", "md1"]) + + @patch("check_software_raid.dump_raid_info") + @patch("check_software_raid.get_md_stat") + def test_check_raid_mode_is_not_expected(self, mock_get_md, mock_dump_raid): + + mock_get_md.return_value = [ + {"device": "md2", "mode": "raid1"}, + {"device": "md1", "mode": "raid0"} + ] + + with self.assertRaises(ValueError): + check_software_raid.check_raid_mode_test("raid1") + mock_get_md.assert_called_with() + mock_dump_raid.assert_called_with() + + @patch("subprocess.run") + def test_dump_raid_info(self, mock_run): + + check_software_raid.dump_raid_info(["md126", "md127"]) + self.assertEqual(mock_run.call_count, 2) + + +class TestArgumentParser(unittest.TestCase): + + def test_parser(self): + sys.argv = ["check_software_raid.py", "--mode", "raid0 raid1"] + args = check_software_raid.register_arguments() + + self.assertEqual(args.mode, "raid0 raid1") diff --git a/providers/base/tests/test_data/mdstat_intel_rst.txt b/providers/base/tests/test_data/mdstat_intel_rst.txt new file mode 100644 index 000000000..7684f9cbe --- /dev/null +++ b/providers/base/tests/test_data/mdstat_intel_rst.txt @@ -0,0 +1,8 @@ +Personalities : [raid0] [linear] [multipath] [raid1] [raid6] [raid5] [raid4] [raid10] +md126 : active raid0 sda[1] sdb[0] + 500113408 blocks super external:/md127/0 64k chunks + +md127 : inactive sdb[1](S) sda[0](S) + 7593 blocks super external:imsm + +unused devices: \ No newline at end of file diff --git a/providers/base/tests/test_data/mdstat_multiple_raid.txt b/providers/base/tests/test_data/mdstat_multiple_raid.txt new file mode 100644 index 000000000..6854239de --- /dev/null +++ b/providers/base/tests/test_data/mdstat_multiple_raid.txt @@ -0,0 +1,7 @@ +Personalities : [linear] [raid0] [raid1] [raid5] +read_ahead 1024 sectors +md2 : active raid1 sde1[1] sdd1[0] + 17920384 blocks [2/2] [UU] + +md1 : active raid0 sdc1[1] sdb1[0] + 35840768 blocks 64k chunks \ No newline at end of file diff --git a/providers/base/tests/test_data/mdstat_none_raid.txt b/providers/base/tests/test_data/mdstat_none_raid.txt new file mode 100644 index 000000000..853ebf79a --- /dev/null +++ b/providers/base/tests/test_data/mdstat_none_raid.txt @@ -0,0 +1,2 @@ +Personalities : +unused devices: \ No newline at end of file diff --git a/providers/base/units/disk/jobs.pxu b/providers/base/units/disk/jobs.pxu index 9ae1ca561..00c76da33 100644 --- a/providers/base/units/disk/jobs.pxu +++ b/providers/base/units/disk/jobs.pxu @@ -164,4 +164,21 @@ flags: also-after-suspend estimated_duration: 1.0 user: root command: nvme get-feature -f 0x0c -H /dev/{name} | grep '(APSTE).*Enabled' && test -e /sys/class/nvme/{name}/power/pm_qos_latency_tolerance_us -_summary: Check support for Autonomous Power State Transition on {name} \ No newline at end of file +_summary: Check support for Autonomous Power State Transition on {name} + +plugin: shell +category_id: com.canonical.plainbox::disk +id: disk/check-software-raid +_summary: Validate the configuration of software RAID devices are expected +_description: + Examine the system to detect Software RAID devices are created and the RAID mode are expected + the SOFTWARE_RAID_LEVEL variable is needed for this tests. + e.g. SOFTWARE_RAID_LEVEL="raid0 raid1 raid5" +imports: from com.canonical.plainbox import manifest +requires: + executable.name == 'mdadm' + manifest.has_md_raid == 'True' +environ: SOFTWARE_RAID_LEVEL +user: root +command: check_software_raid.py --mode "$SOFTWARE_RAID_LEVEL" +estimated_duration: 10 diff --git a/providers/base/units/disk/manifest.pxu b/providers/base/units/disk/manifest.pxu new file mode 100644 index 000000000..03f1629cb --- /dev/null +++ b/providers/base/units/disk/manifest.pxu @@ -0,0 +1,4 @@ +unit: manifest entry +id: has_md_raid +_name: Software RAID +value-type: bool diff --git a/providers/base/units/disk/packaging.pxu b/providers/base/units/disk/packaging.pxu index aef02525e..584d0adec 100644 --- a/providers/base/units/disk/packaging.pxu +++ b/providers/base/units/disk/packaging.pxu @@ -12,3 +12,8 @@ Depends: uuid-runtime unit: packaging meta-data os-id: debian Depends: python3-psutil + +# This is for disk/check-software-raid +unit: packaging meta-data +os-id: debian +Depends: mdadm diff --git a/providers/base/units/disk/test-plan.pxu b/providers/base/units/disk/test-plan.pxu index 7f6451624..a0db09365 100644 --- a/providers/base/units/disk/test-plan.pxu +++ b/providers/base/units/disk/test-plan.pxu @@ -18,6 +18,7 @@ include: benchmarks/disk/hdparm-read_.* benchmarks/disk/hdparm-cache-read_.* disk/apste_support_on_.* + disk/check-software-raid id: after-suspend-disk-cert-automated unit: test plan @@ -65,6 +66,7 @@ include: disk/stats_.* disk/read_performance_.* disk/storage_device_.* + disk/check-software-raid bootstrap_include: device From 1c6026d54663a6e587d71d3409e69e03a27791a5 Mon Sep 17 00:00:00 2001 From: Fernando Bravo <39527354+fernando79513@users.noreply.github.com> Date: Tue, 2 Apr 2024 03:34:07 +0200 Subject: [PATCH 12/26] Attach image captured during camera quality test to submission (New) (#1111) * Modified camera quality test to save the image * Add the image attachment to the camera automated test plan * Attach image after camera-quality test is run, regardless of outcome * Added output as a parameter to the quality function * Removed jinja2 from camera jobs --------- Co-authored-by: Pierre Equoy --- providers/base/bin/camera_quality_test.py | 49 +++++++++------- providers/base/tests/test_camera_quality.py | 63 ++++++++++++++++----- providers/base/units/camera/jobs.pxu | 40 ++++++++----- providers/base/units/camera/test-plan.pxu | 4 +- 4 files changed, 108 insertions(+), 48 deletions(-) diff --git a/providers/base/bin/camera_quality_test.py b/providers/base/bin/camera_quality_test.py index 80e5da54f..a8b881e77 100755 --- a/providers/base/bin/camera_quality_test.py +++ b/providers/base/bin/camera_quality_test.py @@ -22,6 +22,7 @@ import argparse from collections import deque import logging +import os import time import sys @@ -29,7 +30,8 @@ import numpy as np from checkbox_support.vendor.brisque.brisque import BRISQUE -from tempfile import NamedTemporaryFile +from checkbox_support.helpers.timeout import timeout + THRESHOLD = 60 TIMEOUT = 10 @@ -38,7 +40,26 @@ logger = logging.getLogger("camera_quality_test") -def get_score_from_device(device: str, save: bool = False) -> float: +def save_image(image: np.ndarray, device: str, output: str): + """Saves the image from a video device to a the output directory. + + Args: + image (np.ndarray): image to save + device (str): name of the video device + output (str): output directory + """ + filepath = os.path.join(output, "quality_image_{}.jpg".format(device)) + # Check if the output directory exists + if not os.path.exists(output): + msg = "Output directory does not exist: {}".format(output) + raise RuntimeError(msg) + if not cv2.imwrite(filepath, image): + msg = "Error while saving the image" + raise RuntimeError(msg) + print("Saved image to {}".format(filepath)) + + +def get_score_from_device(device: str, output: str = "") -> float: """ "This function calculates the BRISQUE score for images captured by a specified device within a given time window. If the score stabilizes @@ -48,8 +69,6 @@ def get_score_from_device(device: str, save: bool = False) -> float: :param device: The device to use for the webcam - :param save: - If True, the image will be saved to a temporary file :return: The BRISQUE score for the image :raises RuntimeError: @@ -99,15 +118,8 @@ def get_score_from_device(device: str, save: bool = False) -> float: scores.append(score) iter_count += 1 - # Save the image if requested - if save: - with NamedTemporaryFile( - prefix="camera_test_brisque_{}".format(device), - suffix=".jpg", - delete=False, - ) as f: - cv2.imwrite(f.name, image) - print("Saved image to {}".format(f.name)) + if output: + save_image(image, device, output) # Release the video device cam.release() @@ -139,6 +151,7 @@ def evaluate_score(score: float) -> int: return 0 +@timeout(120) def main(argv: list) -> int: parser = argparse.ArgumentParser(description="Run the image quality test") parser.add_argument( @@ -147,12 +160,8 @@ def main(argv: list) -> int: parser.add_argument( "-f", "--file", default="", help="Parse a file instead of a device" ) - parser.add_argument( - "-s", - "--save", - action="store_true", - help="Keep the image file after the test", - ) + parser.add_argument("-o", "--output", default="", help="Output directory") + args = parser.parse_args(argv) if args.file: @@ -160,7 +169,7 @@ def main(argv: list) -> int: brisque = BRISQUE() score = brisque.score(img) else: - score = get_score_from_device(args.device, args.save) + score = get_score_from_device(args.device, args.output) return evaluate_score(score) diff --git a/providers/base/tests/test_camera_quality.py b/providers/base/tests/test_camera_quality.py index bd10b6b67..29cbddfd3 100644 --- a/providers/base/tests/test_camera_quality.py +++ b/providers/base/tests/test_camera_quality.py @@ -25,6 +25,7 @@ from unittest.mock import patch, MagicMock import cv2 +import numpy as np import camera_quality_test as cqt @@ -72,11 +73,7 @@ def test_get_score_from_device(self, mock_score): result = cqt.main(["-d", "video0"]) self.assertEqual(result, 0) - mock_score.assert_called_with("video0", False) - - result = cqt.main(["-d", "video0", "-s"]) - self.assertEqual(result, 0) - mock_score.assert_called_with("video0", True) + mock_score.assert_called_with("video0", "") @patch("logging.Logger.error", new=MagicMock()) def test_quality_evaluation(self): @@ -102,7 +99,8 @@ def test_device_not_opened(self): """ self.mock_capture.return_value.isOpened.return_value = False - self.assertRaises(RuntimeError, cqt.get_score_from_device, "video0") + with self.assertRaises(RuntimeError): + cqt.get_score_from_device("video0") def test_image_not_read(self): """ @@ -112,9 +110,11 @@ def test_image_not_read(self): self.mock_capture.return_value.isOpened.return_value = True self.mock_capture.return_value.read.return_value = (False, None) - self.assertRaises(RuntimeError, cqt.get_score_from_device, "video0") + with self.assertRaises(RuntimeError): + cqt.get_score_from_device("video0") @patch(score_path) + @patch("camera_quality_test.save_image", new=MagicMock()) def test_stable_image_from_cam(self, mock_score): """ The test should pass with a good still image. @@ -127,6 +127,7 @@ def test_stable_image_from_cam(self, mock_score): self.assertEqual(cqt.get_score_from_device("video0"), 10) @patch(score_path) + @patch("camera_quality_test.save_image", new=MagicMock()) def test_unstable_image_from_cam(self, mock_score): """ The test should pass with a good still image. @@ -139,6 +140,7 @@ def test_unstable_image_from_cam(self, mock_score): self.assertEqual(cqt.get_score_from_device("video0"), 10) @patch(score_path) + @patch("camera_quality_test.save_image", new=MagicMock()) def test_slow_brisque_calculation(self, mock_score): """ The test should iterate at least two times even if the computation time @@ -156,16 +158,51 @@ def test_slow_brisque_calculation(self, mock_score): self.assertEqual(cqt.get_score_from_device("video0"), 10) self.assertEqual(mock_score.call_count, 2) - @patch("cv2.imwrite") @patch(score_path) - def test_save_image_from_cam(self, mock_score, mock_imwrite): + @patch("camera_quality_test.save_image") + def test_save_image_is_called(self, mock_score, mock_save_image): """ - The test should pass with a good still image. + The test should call the save_image function. """ - self.mock_capture.return_value.isOpened.return_value = True self.mock_capture.return_value.read.return_value = (True, self.img) mock_score.return_value = 10 - cqt.get_score_from_device("video0", True) - self.assertTrue(mock_imwrite.called) + cqt.get_score_from_device("video0", "/tmp") + cqt.save_image.assert_called_with(self.img, "video0", "/tmp") + + @patch("cv2.imwrite") + @patch("os.path.exists") + def test_save_image(self, mock_exists, mock_imwrite): + """ + The test can save the image. + """ + mock_exists.return_value = True + + cqt.save_image(self.img, "video0", "/tmp") + mock_imwrite.assert_called_with( + "/tmp/quality_image_video0.jpg", self.img + ) + + @patch("cv2.imwrite") + @patch("os.path.exists") + def test_save_image_no_output(self, mock_exists, mock_imwrite): + """ + The test should fail if the output directory does not exist. + """ + mock_exists.return_value = False + + with self.assertRaises(RuntimeError): + cqt.save_image(self.img, "video0", "/tmp") + + @patch("cv2.imwrite") + @patch("os.path.exists") + def test_save_image_error(self, mock_exists, mock_imwrite): + """ + The test should fail if the image cannot be saved. + """ + mock_exists.return_value = True + + mock_imwrite.return_value = False + with self.assertRaises(RuntimeError): + cqt.save_image(self.img, "video0", "/tmp") diff --git a/providers/base/units/camera/jobs.pxu b/providers/base/units/camera/jobs.pxu index 2734ad114..a247450ed 100644 --- a/providers/base/units/camera/jobs.pxu +++ b/providers/base/units/camera/jobs.pxu @@ -70,18 +70,17 @@ 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_{{ name }} +id: camera/still_{name} flags: also-after-suspend -_summary: Webcam still image capture test for {{ product_slug }} +_summary: Webcam still image capture test for {product_slug} estimated_duration: 120.0 depends: camera/detect command: - camera_test.py still -d /dev/{{ name }} + camera_test.py still -d /dev/{name} _description: PURPOSE: - This test will check that the {{ product_slug }} 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: @@ -92,15 +91,14 @@ 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_{{ name }} +id: camera/multiple-resolution-images_{name} flags: also-after-suspend -_summary: Webcam multiple resolution capture test for {{ product_slug }} +_summary: Webcam multiple resolution capture test for {product_slug} estimated_duration: 1.2 depends: camera/detect command: - camera_test.py resolutions -d /dev/{{ name }} + camera_test.py 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. @@ -110,22 +108,36 @@ 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/camera-quality_{{ name }} +id: camera/camera-quality_{name} flags: also-after-suspend -_summary: Webcam brisque score for {{ product_slug }} +_summary: Webcam brisque score for {product_slug} estimated_duration: 20s depends: camera/detect requires: lsb.release >= '22.04' command: - timeout 120 camera_quality_test.py -d {{ name }} || - (>&2 echo "Timeout computing score"; false) + camera_quality_test.py -d {name} -o "$PLAINBOX_SESSION_SHARE" _description: Takes a picture and computes the quality based on a No-Reference image quality assessment algorithm called BRISQUE. This test will timeout and fail if the quality has not been compute within 120 seconds. +unit: template +template-resource: device +template-filter: device.category == 'CAPTURE' and device.name != '' +template-unit: job +plugin: attachment +category_id: com.canonical.plainbox::camera +id: camera/camera-quality-image_{name} +flags: also-after-suspend +_summary: Attach the image used for the BRISQUE score for {product_slug} +estimated_duration: 1s +after: camera/camera-quality_{name} +requires: lsb.release >= '22.04' +command: + [ -f "$PLAINBOX_SESSION_SHARE"/quality_image_{name}.jpg ] && + cat "$PLAINBOX_SESSION_SHARE"/quality_image_{name}.jpg + unit: template template-resource: device template-filter: device.category == 'MMAL' and device.name != '' diff --git a/providers/base/units/camera/test-plan.pxu b/providers/base/units/camera/test-plan.pxu index 57c6a53ce..f56b453da 100644 --- a/providers/base/units/camera/test-plan.pxu +++ b/providers/base/units/camera/test-plan.pxu @@ -37,6 +37,7 @@ include: camera/detect certification-status=blocker camera/multiple-resolution-images_.* certification-status=blocker camera/camera-quality_.* certification-status=non-blocker + camera/camera-quality-image_.* certification-status=non-blocker bootstrap_include: device @@ -69,7 +70,8 @@ _description: Camera tests After Suspend (automated) include: after-suspend-camera/detect certification-status=blocker after-suspend-camera/multiple-resolution-images_.* certification-status=blocker - after-suspend-camera/camera-quality_* certification-status=non-blocker + after-suspend-camera/camera-quality_.* certification-status=non-blocker + after-suspend-camera/camera-quality-image_.* certification-status=non-blocker bootstrap_include: device From bc47c063120e0b11a9d9ae4469e85d310412e401 Mon Sep 17 00:00:00 2001 From: LiaoU3 <58060146+LiaoU3@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:24:08 +0800 Subject: [PATCH 13/26] [checkbox-ce-oem] Restructure checkbox ce oem (New) (#1132) * Restructure checkbox-ce-oem * Add one more layer due to move tox.ini into a deeper folder --- .../README.md | 0 .../series_classic20/config/config_vars | 0 .../series_classic20/launchers/checkbox-cli-wrapper | 0 .../series_classic20/launchers/configure | 0 .../series_classic20/launchers/shell-wrapper | 0 .../series_classic20/launchers/test-runner | 0 .../series_classic20/launchers/wrapper_local | 0 .../series_classic20/snap/hooks/configure | 0 .../series_classic20/snap/hooks/install | 0 .../series_classic20/snap/snapcraft.yaml | 0 .../series_classic22/config/config_vars | 0 .../series_classic22/launchers/checkbox-cli-wrapper | 0 .../series_classic22/launchers/configure | 0 .../series_classic22/launchers/shell-wrapper | 0 .../series_classic22/launchers/test-runner | 0 .../series_classic22/launchers/wrapper_local | 0 .../series_classic22/snap/hooks/configure | 0 .../series_classic22/snap/hooks/install | 0 .../series_classic22/snap/snapcraft.yaml | 0 .../series_uc20/snap/snapcraft.yaml | 0 .../series_uc22/config/config_vars | 0 .../series_uc22/launchers/checkbox-cli-wrapper | 0 .../series_uc22/launchers/configure | 0 .../series_uc22/launchers/shell-wrapper | 0 .../series_uc22/launchers/test-runner | 0 .../series_uc22/launchers/wrapper_local | 0 .../series_uc22/snap/hooks/configure | 0 .../series_uc22/snap/hooks/install | 0 .../series_uc22/snap/snapcraft.yaml | 0 .../checkbox-provider-ce-oem/.coveragerc | 0 .../checkbox-provider-ce-oem/bin/af_alg_test.py | 0 .../checkbox-provider-ce-oem/bin/button_test.sh | 0 .../checkbox-provider-ce-oem/bin/buzzer_test.sh | 0 .../checkbox-provider-ce-oem/bin/check_vpu_device.py | 0 .../bin/cold_reboot_by_pdu.sh | 0 .../bin/cpufreq_governors.py | 0 .../bin/crypto_priority_check.py | 0 .../bin/digital_io_loopback_serial_test.py | 0 .../bin/digital_io_loopback_test.py | 0 .../checkbox-provider-ce-oem/bin/env_setup.py | 0 .../checkbox-provider-ce-oem/bin/evdev_touch_test.py | 0 .../checkbox-provider-ce-oem/bin/graphics_test.sh | 0 .../checkbox-provider-ce-oem/bin/iio_sensor_test.py | 0 .../bin/installation_time.py | 0 .../checkbox-provider-ce-oem/bin/led_test.sh | 0 .../checkbox-provider-ce-oem/bin/location.sh | 0 .../checkbox-provider-ce-oem/bin/look_up_xtest.py | 0 .../checkbox-provider-ce-oem/bin/mtd.sh | 0 .../checkbox-provider-ce-oem/bin/multiple-otg.sh | 0 .../checkbox-provider-ce-oem/bin/parse_optee_test.py | 0 .../checkbox-provider-ce-oem/bin/plc_uart_test.sh | 0 .../bin/reboot_check_test.sh | 0 .../checkbox-provider-ce-oem/bin/rpmsg_tests.py | 0 .../bin/serial_config_parser.py | 0 .../checkbox-provider-ce-oem/bin/serial_test.py | 0 .../bin/socketcan_busoff_test.py | 0 .../checkbox-provider-ce-oem/bin/socketcan_socket.py | 0 .../checkbox-provider-ce-oem/bin/socketcan_test.py | 0 .../bin/tcp_multi_connections.py | 0 .../checkbox-provider-ce-oem/bin/tcpecho_stress.sh | 0 .../bin/thermal_sensor_test.py | 0 .../checkbox-provider-ce-oem/data/optee-test.json | 0 .../checkbox-provider-ce-oem/manage.py | 0 .../checkbox-provider-ce-oem/src/input-pcspkr.c | 0 .../tests/test_check_vpu_device.py | 0 .../tests/test_cpufreq_governors.py | 0 .../checkbox-provider-ce-oem/tests/test_env_setup.py | 0 .../tests/test_iio_sensor_test.py | 0 .../tests/test_rpmsg_tests.py | 0 .../tests/test_tcp_multi_connections.py | 0 .../tests/test_thermal_sensor_test.py | 0 .../checkbox-provider-ce-oem/tox.ini | 12 ++++++------ .../checkbox-provider-ce-oem/units/audio/jobs.pxu | 0 .../units/audio/test-plan.pxu | 0 .../units/button/category.pxu | 0 .../checkbox-provider-ce-oem/units/button/jobs.pxu | 0 .../units/button/manifest.pxu | 0 .../units/button/test-plan.pxu | 0 .../units/buzzer/category.pxu | 0 .../checkbox-provider-ce-oem/units/buzzer/jobs.pxu | 0 .../units/buzzer/manifest.pxu | 0 .../units/buzzer/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/cpu/jobs.pxu | 0 .../checkbox-provider-ce-oem/units/cpu/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/crypto/README.md | 0 .../units/crypto/accelerator.pxu | 0 .../units/crypto/category.pxu | 0 .../units/crypto/crypto_generic.pxu | 0 .../units/crypto/manifest.pxu | 0 .../units/crypto/test-plan-accelerator.pxu | 0 .../units/crypto/test-plan-crypto.pxu | 0 .../units/device/category.pxu | 0 .../checkbox-provider-ce-oem/units/device/jobs.pxu | 0 .../units/device/test-plan.pxu | 0 .../units/digital-io/category.pxu | 0 .../units/digital-io/jobs.pxu | 0 .../units/digital-io/manifest.pxu | 0 .../units/digital-io/test-plan.pxu | 0 .../units/eeprom/category.pxu | 0 .../units/eeprom/manifest.pxu | 0 .../units/eeprom/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/ethernet/jobs.pxu | 0 .../units/ethernet/manifest.pxu | 0 .../units/ethernet/test-plan.pxu | 0 .../units/iio-sensors/category.pxu | 0 .../units/iio-sensors/jobs.pxu | 0 .../units/iio-sensors/manifest.pxu | 0 .../units/iio-sensors/test-plan.pxu | 0 .../units/installation-time/jobs.pxu | 0 .../units/installation-time/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/led/category.pxu | 0 .../checkbox-provider-ce-oem/units/led/jobs.pxu | 0 .../checkbox-provider-ce-oem/units/led/manifest.pxu | 0 .../checkbox-provider-ce-oem/units/led/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/location/jobs.pxu | 0 .../units/location/manifest.pxu | 0 .../units/location/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/mir/category.pxu | 0 .../checkbox-provider-ce-oem/units/mir/jobs.pxu | 0 .../checkbox-provider-ce-oem/units/mir/manifest.pxu | 0 .../checkbox-provider-ce-oem/units/mir/test-plan.pxu | 0 .../units/miscellanea/jobs.pxu | 0 .../checkbox-provider-ce-oem/units/mtd/category.pxu | 0 .../checkbox-provider-ce-oem/units/mtd/jobs.pxu | 0 .../checkbox-provider-ce-oem/units/mtd/manifest.pxu | 0 .../checkbox-provider-ce-oem/units/mtd/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/optee/README.md | 0 .../units/optee/category.pxu | 0 .../checkbox-provider-ce-oem/units/optee/jobs.pxu | 0 .../units/optee/manifest.pxu | 0 .../units/optee/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/otg/README.md | 0 .../checkbox-provider-ce-oem/units/otg/jobs.pxu | 0 .../checkbox-provider-ce-oem/units/otg/manifest.pxu | 0 .../checkbox-provider-ce-oem/units/otg/test-plan.pxu | 0 .../units/power-management/jobs.pxu | 0 .../units/power-management/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/ptp/category.pxu | 0 .../checkbox-provider-ce-oem/units/ptp/jobs.pxu | 0 .../checkbox-provider-ce-oem/units/ptp/manifest.pxu | 0 .../checkbox-provider-ce-oem/units/ptp/test-plan.pxu | 0 .../units/rpmsg/category.pxu | 0 .../checkbox-provider-ce-oem/units/rpmsg/jobs.pxu | 0 .../units/rpmsg/manifest.pxu | 0 .../units/rpmsg/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/rtc/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/serial/jobs.pxu | 0 .../units/serial/manifest.pxu | 0 .../units/serial/test-plan.pxu | 0 .../units/socketcan/jobs.pxu | 0 .../units/socketcan/manifest.pxu | 0 .../units/socketcan/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/stress/boot.pxu | 0 .../units/stress/test-plan.pxu | 0 .../units/strict-confinement/README.md | 0 .../units/strict-confinement/category.pxu | 0 .../mediacard-strict-confinement.pxu | 0 .../powermanagement-strict-confinement.pxu | 0 .../test-plan-strict-confinement.pxu | 0 .../thermal-strict-confinement.pxu | 0 .../units/test-plan-ce-oem-full-classic.pxu | 0 .../units/test-plan-ce-oem-full-core.pxu | 0 .../units/test-plan-ce-oem.pxu | 0 .../units/test-plan-strict-confinement.pxu | 0 .../units/thermal-sensor/category.pxu | 0 .../units/thermal-sensor/jobs.pxu | 0 .../units/thermal-sensor/test-plan.pxu | 0 .../units/touchscreen/jobs.pxu | 0 .../units/touchscreen/test-plan.pxu | 0 .../checkbox-provider-ce-oem/units/vpu/category.pxu | 0 .../checkbox-provider-ce-oem/units/vpu/jobs.pxu | 0 .../checkbox-provider-ce-oem/units/vpu/manifest.pxu | 0 .../checkbox-provider-ce-oem/units/vpu/test-plan.pxu | 0 173 files changed, 6 insertions(+), 6 deletions(-) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem}/README.md (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic20/config/config_vars (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic20/launchers/checkbox-cli-wrapper (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic20/launchers/configure (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic20/launchers/shell-wrapper (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic20/launchers/test-runner (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic20/launchers/wrapper_local (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic20/snap/hooks/configure (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic20/snap/hooks/install (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic20/snap/snapcraft.yaml (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic22/config/config_vars (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic22/launchers/checkbox-cli-wrapper (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic22/launchers/configure (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic22/launchers/shell-wrapper (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic22/launchers/test-runner (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic22/launchers/wrapper_local (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic22/snap/hooks/configure (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic22/snap/hooks/install (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_classic22/snap/snapcraft.yaml (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc20/snap/snapcraft.yaml (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc22/config/config_vars (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc22/launchers/checkbox-cli-wrapper (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc22/launchers/configure (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc22/launchers/shell-wrapper (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc22/launchers/test-runner (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc22/launchers/wrapper_local (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc22/snap/hooks/configure (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc22/snap/hooks/install (100%) rename contrib/{checkbox-provider-ce-oem => checkbox-ce-oem/checkbox-ce-oem-snap}/series_uc22/snap/snapcraft.yaml (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/.coveragerc (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/af_alg_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/button_test.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/buzzer_test.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/check_vpu_device.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/cold_reboot_by_pdu.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/cpufreq_governors.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/crypto_priority_check.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/digital_io_loopback_serial_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/digital_io_loopback_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/env_setup.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/evdev_touch_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/graphics_test.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/iio_sensor_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/installation_time.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/led_test.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/location.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/look_up_xtest.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/mtd.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/multiple-otg.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/parse_optee_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/plc_uart_test.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/reboot_check_test.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/rpmsg_tests.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/serial_config_parser.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/serial_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/socketcan_busoff_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/socketcan_socket.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/socketcan_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/tcp_multi_connections.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/tcpecho_stress.sh (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/bin/thermal_sensor_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/data/optee-test.json (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/manage.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/src/input-pcspkr.c (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/tests/test_check_vpu_device.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/tests/test_cpufreq_governors.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/tests/test_env_setup.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/tests/test_iio_sensor_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/tests/test_rpmsg_tests.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/tests/test_tcp_multi_connections.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/tests/test_thermal_sensor_test.py (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/tox.ini (85%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/audio/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/audio/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/button/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/button/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/button/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/button/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/buzzer/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/buzzer/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/buzzer/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/buzzer/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/cpu/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/cpu/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/crypto/README.md (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/crypto/accelerator.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/crypto/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/crypto/crypto_generic.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/crypto/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/crypto/test-plan-accelerator.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/crypto/test-plan-crypto.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/device/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/device/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/device/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/digital-io/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/digital-io/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/digital-io/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/digital-io/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/eeprom/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/eeprom/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/eeprom/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/ethernet/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/ethernet/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/ethernet/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/iio-sensors/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/iio-sensors/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/iio-sensors/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/iio-sensors/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/installation-time/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/installation-time/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/led/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/led/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/led/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/led/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/location/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/location/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/location/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/mir/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/mir/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/mir/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/mir/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/miscellanea/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/mtd/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/mtd/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/mtd/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/mtd/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/optee/README.md (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/optee/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/optee/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/optee/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/optee/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/otg/README.md (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/otg/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/otg/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/otg/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/power-management/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/power-management/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/ptp/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/ptp/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/ptp/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/ptp/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/rpmsg/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/rpmsg/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/rpmsg/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/rpmsg/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/rtc/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/serial/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/serial/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/serial/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/socketcan/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/socketcan/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/socketcan/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/stress/boot.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/stress/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/strict-confinement/README.md (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/strict-confinement/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/strict-confinement/mediacard-strict-confinement.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/strict-confinement/powermanagement-strict-confinement.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/strict-confinement/test-plan-strict-confinement.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/strict-confinement/thermal-strict-confinement.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-classic.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-core.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/test-plan-ce-oem.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/test-plan-strict-confinement.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/thermal-sensor/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/thermal-sensor/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/thermal-sensor/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/touchscreen/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/touchscreen/test-plan.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/vpu/category.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/vpu/jobs.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/vpu/manifest.pxu (100%) rename contrib/{ => checkbox-ce-oem}/checkbox-provider-ce-oem/units/vpu/test-plan.pxu (100%) diff --git a/contrib/checkbox-provider-ce-oem/README.md b/contrib/checkbox-ce-oem/README.md similarity index 100% rename from contrib/checkbox-provider-ce-oem/README.md rename to contrib/checkbox-ce-oem/README.md diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/config/config_vars b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/config/config_vars similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic20/config/config_vars rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/config/config_vars diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/checkbox-cli-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/checkbox-cli-wrapper similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic20/launchers/checkbox-cli-wrapper rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/checkbox-cli-wrapper diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/configure similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic20/launchers/configure rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/configure diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/shell-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/shell-wrapper similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic20/launchers/shell-wrapper rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/shell-wrapper diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/test-runner b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/test-runner similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic20/launchers/test-runner rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/test-runner diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/launchers/wrapper_local b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/wrapper_local similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic20/launchers/wrapper_local rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/launchers/wrapper_local diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/hooks/configure similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/configure rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/hooks/configure diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/install b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/hooks/install similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic20/snap/hooks/install rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/hooks/install diff --git a/contrib/checkbox-provider-ce-oem/series_classic20/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/snapcraft.yaml similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic20/snap/snapcraft.yaml rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/snapcraft.yaml diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/config/config_vars b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/config/config_vars similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic22/config/config_vars rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/config/config_vars diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/checkbox-cli-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/checkbox-cli-wrapper similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic22/launchers/checkbox-cli-wrapper rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/checkbox-cli-wrapper diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/configure similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic22/launchers/configure rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/configure diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/shell-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/shell-wrapper similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic22/launchers/shell-wrapper rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/shell-wrapper diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/test-runner b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/test-runner similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic22/launchers/test-runner rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/test-runner diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/launchers/wrapper_local b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/wrapper_local similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic22/launchers/wrapper_local rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/launchers/wrapper_local diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/hooks/configure similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/configure rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/hooks/configure diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/install b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/hooks/install similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic22/snap/hooks/install rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/hooks/install diff --git a/contrib/checkbox-provider-ce-oem/series_classic22/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/snapcraft.yaml similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_classic22/snap/snapcraft.yaml rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/snapcraft.yaml diff --git a/contrib/checkbox-provider-ce-oem/series_uc20/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc20/snap/snapcraft.yaml similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc20/snap/snapcraft.yaml rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc20/snap/snapcraft.yaml diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/config/config_vars b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/config/config_vars similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc22/config/config_vars rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/config/config_vars diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/checkbox-cli-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/checkbox-cli-wrapper similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc22/launchers/checkbox-cli-wrapper rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/checkbox-cli-wrapper diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/configure similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc22/launchers/configure rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/configure diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/shell-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/shell-wrapper similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc22/launchers/shell-wrapper rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/shell-wrapper diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/test-runner b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/test-runner similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc22/launchers/test-runner rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/test-runner diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/launchers/wrapper_local b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/wrapper_local similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc22/launchers/wrapper_local rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/launchers/wrapper_local diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/hooks/configure similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/configure rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/hooks/configure diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/install b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/hooks/install similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc22/snap/hooks/install rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/hooks/install diff --git a/contrib/checkbox-provider-ce-oem/series_uc22/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/snapcraft.yaml similarity index 100% rename from contrib/checkbox-provider-ce-oem/series_uc22/snap/snapcraft.yaml rename to contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/snapcraft.yaml diff --git a/contrib/checkbox-provider-ce-oem/.coveragerc b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/.coveragerc similarity index 100% rename from contrib/checkbox-provider-ce-oem/.coveragerc rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/.coveragerc diff --git a/contrib/checkbox-provider-ce-oem/bin/af_alg_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/af_alg_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/af_alg_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/af_alg_test.py diff --git a/contrib/checkbox-provider-ce-oem/bin/button_test.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/button_test.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/button_test.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/button_test.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/buzzer_test.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/buzzer_test.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/buzzer_test.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/buzzer_test.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/check_vpu_device.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/check_vpu_device.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/check_vpu_device.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/check_vpu_device.py diff --git a/contrib/checkbox-provider-ce-oem/bin/cold_reboot_by_pdu.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/cold_reboot_by_pdu.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/cold_reboot_by_pdu.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/cold_reboot_by_pdu.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/cpufreq_governors.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/cpufreq_governors.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/cpufreq_governors.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/cpufreq_governors.py diff --git a/contrib/checkbox-provider-ce-oem/bin/crypto_priority_check.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/crypto_priority_check.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/crypto_priority_check.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/crypto_priority_check.py diff --git a/contrib/checkbox-provider-ce-oem/bin/digital_io_loopback_serial_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/digital_io_loopback_serial_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/digital_io_loopback_serial_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/digital_io_loopback_serial_test.py diff --git a/contrib/checkbox-provider-ce-oem/bin/digital_io_loopback_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/digital_io_loopback_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/digital_io_loopback_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/digital_io_loopback_test.py diff --git a/contrib/checkbox-provider-ce-oem/bin/env_setup.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/env_setup.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/env_setup.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/env_setup.py diff --git a/contrib/checkbox-provider-ce-oem/bin/evdev_touch_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/evdev_touch_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/evdev_touch_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/evdev_touch_test.py diff --git a/contrib/checkbox-provider-ce-oem/bin/graphics_test.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/graphics_test.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/graphics_test.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/graphics_test.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/iio_sensor_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/iio_sensor_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/iio_sensor_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/iio_sensor_test.py diff --git a/contrib/checkbox-provider-ce-oem/bin/installation_time.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/installation_time.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/installation_time.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/installation_time.py diff --git a/contrib/checkbox-provider-ce-oem/bin/led_test.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/led_test.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/led_test.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/led_test.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/location.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/location.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/location.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/location.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/look_up_xtest.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/look_up_xtest.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/look_up_xtest.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/look_up_xtest.py diff --git a/contrib/checkbox-provider-ce-oem/bin/mtd.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/mtd.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/mtd.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/mtd.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/multiple-otg.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/multiple-otg.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/multiple-otg.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/multiple-otg.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/parse_optee_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/parse_optee_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/parse_optee_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/parse_optee_test.py diff --git a/contrib/checkbox-provider-ce-oem/bin/plc_uart_test.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/plc_uart_test.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/plc_uart_test.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/plc_uart_test.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/reboot_check_test.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/reboot_check_test.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/reboot_check_test.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/reboot_check_test.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/rpmsg_tests.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/rpmsg_tests.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/rpmsg_tests.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/rpmsg_tests.py diff --git a/contrib/checkbox-provider-ce-oem/bin/serial_config_parser.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/serial_config_parser.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/serial_config_parser.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/serial_config_parser.py diff --git a/contrib/checkbox-provider-ce-oem/bin/serial_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/serial_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/serial_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/serial_test.py diff --git a/contrib/checkbox-provider-ce-oem/bin/socketcan_busoff_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/socketcan_busoff_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/socketcan_busoff_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/socketcan_busoff_test.py diff --git a/contrib/checkbox-provider-ce-oem/bin/socketcan_socket.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/socketcan_socket.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/socketcan_socket.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/socketcan_socket.py diff --git a/contrib/checkbox-provider-ce-oem/bin/socketcan_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/socketcan_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/socketcan_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/socketcan_test.py diff --git a/contrib/checkbox-provider-ce-oem/bin/tcp_multi_connections.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/tcp_multi_connections.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/tcp_multi_connections.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/tcp_multi_connections.py diff --git a/contrib/checkbox-provider-ce-oem/bin/tcpecho_stress.sh b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/tcpecho_stress.sh similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/tcpecho_stress.sh rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/tcpecho_stress.sh diff --git a/contrib/checkbox-provider-ce-oem/bin/thermal_sensor_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/thermal_sensor_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/bin/thermal_sensor_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/thermal_sensor_test.py diff --git a/contrib/checkbox-provider-ce-oem/data/optee-test.json b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/data/optee-test.json similarity index 100% rename from contrib/checkbox-provider-ce-oem/data/optee-test.json rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/data/optee-test.json diff --git a/contrib/checkbox-provider-ce-oem/manage.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/manage.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/manage.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/manage.py diff --git a/contrib/checkbox-provider-ce-oem/src/input-pcspkr.c b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/src/input-pcspkr.c similarity index 100% rename from contrib/checkbox-provider-ce-oem/src/input-pcspkr.c rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/src/input-pcspkr.c diff --git a/contrib/checkbox-provider-ce-oem/tests/test_check_vpu_device.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_check_vpu_device.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/tests/test_check_vpu_device.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_check_vpu_device.py diff --git a/contrib/checkbox-provider-ce-oem/tests/test_cpufreq_governors.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_cpufreq_governors.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/tests/test_cpufreq_governors.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_cpufreq_governors.py diff --git a/contrib/checkbox-provider-ce-oem/tests/test_env_setup.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_env_setup.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/tests/test_env_setup.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_env_setup.py diff --git a/contrib/checkbox-provider-ce-oem/tests/test_iio_sensor_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_iio_sensor_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/tests/test_iio_sensor_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_iio_sensor_test.py diff --git a/contrib/checkbox-provider-ce-oem/tests/test_rpmsg_tests.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_rpmsg_tests.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/tests/test_rpmsg_tests.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_rpmsg_tests.py diff --git a/contrib/checkbox-provider-ce-oem/tests/test_tcp_multi_connections.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_tcp_multi_connections.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/tests/test_tcp_multi_connections.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_tcp_multi_connections.py diff --git a/contrib/checkbox-provider-ce-oem/tests/test_thermal_sensor_test.py b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_thermal_sensor_test.py similarity index 100% rename from contrib/checkbox-provider-ce-oem/tests/test_thermal_sensor_test.py rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_thermal_sensor_test.py diff --git a/contrib/checkbox-provider-ce-oem/tox.ini b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tox.ini similarity index 85% rename from contrib/checkbox-provider-ce-oem/tox.ini rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tox.ini index 2090b3020..986d99e5b 100644 --- a/contrib/checkbox-provider-ce-oem/tox.ini +++ b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tox.ini @@ -6,19 +6,19 @@ skipsdist=True [testenv] allowlist_externals = rm commands = - {envpython} -m pip -q install ../../checkbox-ng + {envpython} -m pip -q install ../../../checkbox-ng # Required because this provider depends on checkbox-support parsers & scripts - {envpython} -m pip -q install ../../checkbox-support + {envpython} -m pip -q install ../../../checkbox-support rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-resource.provider rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-base.provider rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-certification-client.provider rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-certification-server.provider rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-ce-oem.provider # Install all providers in develop mode to make sure everything works fine - {envpython} ../../providers/resource/manage.py develop - {envpython} ../../providers/base/manage.py develop - {envpython} ../../providers/certification-client/manage.py develop - {envpython} ../../providers/certification-server/manage.py develop + {envpython} ../../../providers/resource/manage.py develop + {envpython} ../../../providers/base/manage.py develop + {envpython} ../../../providers/certification-client/manage.py develop + {envpython} ../../../providers/certification-server/manage.py develop {envpython} manage.py develop {envpython} manage.py validate {envpython} -m coverage run manage.py test diff --git a/contrib/checkbox-provider-ce-oem/units/audio/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/audio/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/audio/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/audio/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/audio/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/audio/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/audio/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/audio/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/button/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/button/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/button/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/button/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/button/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/button/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/button/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/button/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/button/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/button/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/button/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/button/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/button/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/button/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/button/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/button/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/buzzer/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/buzzer/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/buzzer/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/buzzer/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/buzzer/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/buzzer/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/buzzer/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/buzzer/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/buzzer/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/buzzer/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/buzzer/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/buzzer/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/buzzer/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/buzzer/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/buzzer/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/buzzer/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/cpu/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/cpu/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/cpu/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/cpu/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/cpu/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/cpu/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/cpu/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/cpu/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/crypto/README.md b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/README.md similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/crypto/README.md rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/README.md diff --git a/contrib/checkbox-provider-ce-oem/units/crypto/accelerator.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/accelerator.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/crypto/accelerator.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/accelerator.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/crypto/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/crypto/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/crypto/crypto_generic.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/crypto_generic.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/crypto/crypto_generic.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/crypto_generic.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/crypto/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/crypto/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/crypto/test-plan-accelerator.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/test-plan-accelerator.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/crypto/test-plan-accelerator.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/test-plan-accelerator.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/crypto/test-plan-crypto.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/test-plan-crypto.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/crypto/test-plan-crypto.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/crypto/test-plan-crypto.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/device/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/device/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/device/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/device/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/device/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/device/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/device/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/device/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/device/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/device/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/device/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/device/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/digital-io/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/digital-io/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/digital-io/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/digital-io/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/digital-io/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/digital-io/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/digital-io/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/digital-io/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/eeprom/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/eeprom/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/eeprom/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/eeprom/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/eeprom/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/eeprom/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/eeprom/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/eeprom/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/eeprom/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/eeprom/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/eeprom/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/eeprom/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/ethernet/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ethernet/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/ethernet/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ethernet/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/ethernet/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ethernet/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/ethernet/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ethernet/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/ethernet/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ethernet/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/ethernet/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ethernet/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/iio-sensors/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/iio-sensors/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/iio-sensors/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/iio-sensors/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/iio-sensors/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/iio-sensors/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/iio-sensors/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/iio-sensors/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/iio-sensors/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/iio-sensors/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/iio-sensors/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/iio-sensors/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/iio-sensors/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/iio-sensors/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/iio-sensors/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/iio-sensors/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/installation-time/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/installation-time/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/installation-time/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/installation-time/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/installation-time/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/installation-time/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/installation-time/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/installation-time/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/led/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/led/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/led/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/led/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/led/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/led/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/led/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/led/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/led/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/led/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/led/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/led/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/led/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/led/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/led/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/led/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/location/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/location/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/location/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/location/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/location/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/location/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/location/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/location/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/location/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/location/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/location/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/location/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/mir/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mir/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/mir/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mir/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/mir/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mir/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/mir/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mir/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/mir/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mir/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/mir/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mir/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/mir/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mir/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/mir/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mir/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/miscellanea/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/miscellanea/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/miscellanea/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/miscellanea/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/mtd/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mtd/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/mtd/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mtd/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/mtd/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mtd/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/mtd/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mtd/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/mtd/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mtd/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/mtd/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mtd/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/mtd/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mtd/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/mtd/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/mtd/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/optee/README.md b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/README.md similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/optee/README.md rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/README.md diff --git a/contrib/checkbox-provider-ce-oem/units/optee/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/optee/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/optee/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/optee/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/optee/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/optee/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/optee/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/optee/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/optee/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/otg/README.md b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/otg/README.md similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/otg/README.md rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/otg/README.md diff --git a/contrib/checkbox-provider-ce-oem/units/otg/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/otg/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/otg/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/otg/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/otg/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/otg/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/otg/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/otg/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/otg/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/otg/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/otg/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/otg/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/power-management/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/power-management/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/power-management/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/power-management/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/power-management/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/power-management/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/power-management/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/power-management/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/ptp/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ptp/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/ptp/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ptp/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/ptp/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ptp/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/ptp/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ptp/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/ptp/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ptp/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/ptp/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ptp/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/ptp/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ptp/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/ptp/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/ptp/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/rpmsg/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rpmsg/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/rpmsg/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rpmsg/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/rpmsg/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rpmsg/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/rpmsg/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rpmsg/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/rpmsg/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rpmsg/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/rpmsg/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rpmsg/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/rpmsg/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rpmsg/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/rpmsg/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rpmsg/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/rtc/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rtc/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/rtc/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/rtc/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/serial/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/serial/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/serial/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/serial/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/serial/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/serial/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/socketcan/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/socketcan/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/socketcan/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/socketcan/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/socketcan/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/socketcan/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/socketcan/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/socketcan/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/socketcan/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/socketcan/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/socketcan/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/socketcan/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/stress/boot.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/stress/boot.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/stress/boot.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/stress/boot.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/stress/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/stress/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/stress/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/stress/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/strict-confinement/README.md b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/README.md similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/strict-confinement/README.md rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/README.md diff --git a/contrib/checkbox-provider-ce-oem/units/strict-confinement/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/strict-confinement/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/strict-confinement/mediacard-strict-confinement.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/mediacard-strict-confinement.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/strict-confinement/mediacard-strict-confinement.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/mediacard-strict-confinement.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/strict-confinement/powermanagement-strict-confinement.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/powermanagement-strict-confinement.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/strict-confinement/powermanagement-strict-confinement.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/powermanagement-strict-confinement.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/strict-confinement/test-plan-strict-confinement.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/test-plan-strict-confinement.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/strict-confinement/test-plan-strict-confinement.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/test-plan-strict-confinement.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/strict-confinement/thermal-strict-confinement.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/thermal-strict-confinement.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/strict-confinement/thermal-strict-confinement.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/strict-confinement/thermal-strict-confinement.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-classic.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-classic.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-classic.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-classic.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-core.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-core.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-core.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/test-plan-ce-oem-full-core.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/test-plan-ce-oem.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/test-plan-ce-oem.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/test-plan-ce-oem.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/test-plan-ce-oem.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/test-plan-strict-confinement.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/test-plan-strict-confinement.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/test-plan-strict-confinement.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/test-plan-strict-confinement.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/thermal-sensor/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/thermal-sensor/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/thermal-sensor/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/thermal-sensor/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/thermal-sensor/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/thermal-sensor/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/thermal-sensor/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/thermal-sensor/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/thermal-sensor/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/thermal-sensor/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/thermal-sensor/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/thermal-sensor/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/touchscreen/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/touchscreen/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/touchscreen/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/touchscreen/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/touchscreen/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/touchscreen/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/touchscreen/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/touchscreen/test-plan.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/vpu/category.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/vpu/category.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/vpu/category.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/vpu/category.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/vpu/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/vpu/jobs.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/vpu/jobs.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/vpu/jobs.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/vpu/manifest.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/vpu/manifest.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/vpu/manifest.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/vpu/manifest.pxu diff --git a/contrib/checkbox-provider-ce-oem/units/vpu/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/vpu/test-plan.pxu similarity index 100% rename from contrib/checkbox-provider-ce-oem/units/vpu/test-plan.pxu rename to contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/vpu/test-plan.pxu From e980a3947eaffcfa3d22fd797ebfc552ec60bda2 Mon Sep 17 00:00:00 2001 From: LiaoU3 <58060146+LiaoU3@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:41:02 +0800 Subject: [PATCH 14/26] [checkbox-ce-oem] Fix jobs and testplans to pass validate (Bugfix) (#1135) Fix jobs and testplans to pass validate --- .../checkbox-provider-ce-oem/units/digital-io/jobs.pxu | 4 ++-- .../checkbox-provider-ce-oem/units/serial/test-plan.pxu | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/jobs.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/jobs.pxu index 2772bb70f..3b89d9556 100644 --- a/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/jobs.pxu +++ b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/digital-io/jobs.pxu @@ -21,7 +21,7 @@ command: unit: template template-resource: ce-oem-digital-io/loopback_mapping_gpio template-unit: job -template-summary: Loopback tests for the DO{DO}-DI{DI} pin control by GPIO +_template-summary: Loopback tests for the DO{DO}-DI{DI} pin control by GPIO id: ce-oem-digital-io/loopback_gpio_DO{DO}-DI{DI} _summary: To test loopback between DO{DO} and DI{DI} plugin: shell @@ -61,7 +61,7 @@ command: unit: template template-resource: ce-oem-digital-io/loopback_mapping_serial template-unit: job -template-summary: Loopback tests for the DO{DO}-DI{DI} pin control by serial console +_template-summary: Loopback tests for the DO{DO}-DI{DI} pin control by serial console id: ce-oem-digital-io/loopback_serial_DO{DO}-DI{DI} _summary: To test loopback between DO{DO} and DI{DI} _description: diff --git a/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/test-plan.pxu b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/test-plan.pxu index f1b93bf6e..8a13d3a51 100644 --- a/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/test-plan.pxu +++ b/contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/test-plan.pxu @@ -33,7 +33,7 @@ bootstrap_include: ce-oem-serial/serial-console-list include: ce-oem-serial/serial-transmit-data-.* - ce-oem-serial/serial-console-.* + ce-oem-serial/serial-console-(?!list\b).*$ id: after-suspend-ce-oem-serial-automated unit: test plan From fb21d51acf4a0e943d9b0f9ef0f19180287d2254 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Tue, 2 Apr 2024 18:09:57 +0800 Subject: [PATCH 15/26] Add audio manifest entries for audio ports and internal speakers (BugFix) (#1128) * Add manifest entries for audio ports and features Fix CHECKBOX-1319 * Modify audio jobs to use audio manifest entries Fix CHECKBOX-1319 * Remove audio/balance_* jobs These jobs do not belong to any test plan and have not been used since they were last touched in 2014...! --- providers/base/units/audio/jobs.pxu | 91 ++++++------------------- providers/base/units/audio/manifest.pxu | 28 +++++++- 2 files changed, 46 insertions(+), 73 deletions(-) diff --git a/providers/base/units/audio/jobs.pxu b/providers/base/units/audio/jobs.pxu index 1f1c9c7f1..c70e0ea79 100644 --- a/providers/base/units/audio/jobs.pxu +++ b/providers/base/units/audio/jobs.pxu @@ -37,7 +37,9 @@ id: audio/playback_auto flags: also-after-suspend estimated_duration: 5.0 depends: audio/list_devices +imports: from com.canonical.plainbox import manifest requires: + manifest.has_internal_speakers == 'True' device.category == 'AUDIO' package.name == 'alsa-base' package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0' @@ -60,8 +62,6 @@ _purpose: This test will check that internal speakers work correctly _steps: 1. Make sure that no external speakers or headphones are connected - When testing a desktop, you can skip this test if there is no - internal speaker, we will test the external output later 2. Commence the test to play a brief tone on your audio device _verification: Did you hear a tone? @@ -291,7 +291,9 @@ flags: also-after-suspend id: audio/playback_headphones estimated_duration: 20.0 depends: audio/list_devices +imports: from com.canonical.plainbox import manifest requires: + (manifest.has_line_in == 'True' or manifest.has_headset == 'True') device.category == 'AUDIO' package.name == 'alsa-base' package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0' @@ -325,7 +327,9 @@ id: audio/alsa_record_playback_internal flags: also-after-suspend estimated_duration: 20.0 depends: audio/playback_auto +imports: from com.canonical.plainbox import manifest requires: + (manifest.has_line_in == 'True' or manifest.has_headset == 'True') device.category == 'AUDIO' package.name == 'alsa-base' package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good' @@ -360,7 +364,9 @@ id: audio/alsa_record_playback_external flags: also-after-suspend estimated_duration: 20.0 depends: audio/playback_headphones +imports: from com.canonical.plainbox import manifest requires: + (manifest.has_line_in == 'True' or manifest.has_headset == 'True') device.category == 'AUDIO' package.name == 'alsa-base' package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good' @@ -505,6 +511,9 @@ id: audio/channels flags: also-after-suspend estimated_duration: 20.0 command: speaker-test -c 2 -l 1 -t wav +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_internal_speakers == 'True' _purpose: Check that the various audio channels are working properly _steps: @@ -535,7 +544,9 @@ category_id: com.canonical.plainbox::audio id: audio/external-lineout flags: also-after-suspend estimated_duration: 30.0 +imports: from com.canonical.plainbox import manifest requires: + manifest.has_line_out == 'True' dmi.product in ['Desktop','Low Profile Desktop','Tower','Mini Tower','Space-saving','All In One','All-In-One','AIO'] _purpose: Check that external line out connection works correctly @@ -554,7 +565,9 @@ category_id: com.canonical.plainbox::audio id: audio/external-linein flags: also-after-suspend estimated_duration: 120.0 +imports: from com.canonical.plainbox import manifest requires: + manifest.has_line_in == 'True' dmi.product in ['Desktop','Low Profile Desktop','Tower','Mini Tower','Space-saving','All In One','All-In-One','AIO'] device.category == 'AUDIO' package.name == 'alsa-base' @@ -589,7 +602,9 @@ category_id: com.canonical.plainbox::audio id: audio/speaker-headphone-plug-detection flags: also-after-suspend estimated_duration: 60.0 +imports: from com.canonical.plainbox import manifest requires: + (manifest.has_line_out == 'True' or manifest.has_headset == 'True') device.category == 'AUDIO' package.name in ['pulseaudio-utils', 'pipewire'] command: @@ -616,7 +631,9 @@ category_id: com.canonical.plainbox::audio id: audio/microphone-plug-detection flags: also-after-suspend estimated_duration: 60.0 +imports: from com.canonical.plainbox import manifest requires: + (manifest.has_line_in == 'True' or manifest.has_headset == 'True') device.category == 'AUDIO' package.name in ['pulseaudio-utils', 'pipewire'] command: @@ -639,76 +656,6 @@ _verification: The test times out after 30 seconds (and fails in that case). _summary: Ensure that the system can detect when a microphone is plugged in. -plugin: user-interact-verify -category_id: com.canonical.plainbox::audio -id: audio/balance_internal_speaker -estimated_duration: 20.0 -depends: audio/playback_auto -requires: - device.category == 'AUDIO' - package.name == 'alsa-base' - package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0' - package.name in ['pulseaudio-utils', 'pipewire'] -command: - if check_audio_daemon.sh ; then - pipewire_utils.py show -t audio - pipewire_utils.py gst -t 10 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink' - EXIT_CODE=$? - else - audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings - audio_settings.py set --device=pci --volume=50 - gst_pipeline_test.py -t 10 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink' - EXIT_CODE=$? - audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings - fi - exit $EXIT_CODE -_purpose: - Check that balance control works correctly on internal speakers -_steps: - 1. Check that moving the balance slider from left to right works smoothly - 2. Commence the test to play an audio tone for 10 seconds. - 3. Move the balance slider from left to right and back. - 4. Check that actual speaker audio balance follows your setting. -_verification: - Does the slider move smoothly, as well as being followed by the actual audio output? -_summary: Test the balance control on internal speakers by playing an audio tone and adjusting the balance slider. - -plugin: user-interact-verify -category_id: com.canonical.plainbox::audio -id: audio/balance_headphones -flags: also-after-suspend -depends: audio/playback_headphones -estimated_duration: 30.0 -requires: - device.category == 'AUDIO' - package.name == 'alsa-base' - package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0' - package.name in ['pulseaudio-utils', 'pipewire'] -command: - if check_audio_daemon.sh ; then - pipewire_utils.py show -t audio - pipewire_utils.py gst -t 10 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink' - EXIT_CODE=$? - else - audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings - audio_settings.py set --device=pci --volume=50 - gst_pipeline_test.py -t 10 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink' - EXIT_CODE=$? - audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings - fi - exit $EXIT_CODE -_description: -_purpose: - Check that balance control works correctly on external headphones -_steps: - 1. Check that moving the balance slider from left to right works smoothly. - 2. Commence the test to play an audio tone for 10 seconds. - 3. Move the balance slider from left to right and back. - 4. Check that actual headphone audio balance follows your settings. -_verification: - Does the slider move smoothly, as well as being followed by the settings by the actual audio output? -_summary: Test for checking balance control functioning on external headphones. - plugin: shell category_id: com.canonical.plainbox::audio id: audio/list_devices_after_suspend_30_cycles diff --git a/providers/base/units/audio/manifest.pxu b/providers/base/units/audio/manifest.pxu index 73ad21851..1801a939f 100644 --- a/providers/base/units/audio/manifest.pxu +++ b/providers/base/units/audio/manifest.pxu @@ -6,16 +6,42 @@ unit: manifest entry id: has_audio_playback +_prompt: Does this machine have the following audio features? _name: Audio playback value-type: bool unit: manifest entry id: has_audio_capture +_prompt: Does this machine have the following audio features? _name: Audio capture value-type: bool unit: manifest entry id: has_audio_loopback_connector -_prompt: Does this device have the following?: +_prompt: Does this machine have the following audio features? _name: Audio Loopback Connector value-type: bool + +unit: manifest entry +id: has_line_out +_name: Line out (Headphones) port +_prompt: Does this machine have the following audio features? +value-type: bool + +unit: manifest entry +id: has_line_in +_name: Line in (Microphone) port +_prompt: Does this machine have the following audio features? +value-type: bool + +unit: manifest entry +id: has_headset +_name: Headset (Headphones + Microphone) port +_prompt: Does this machine have the following audio features? +value-type: bool + +unit: manifest entry +id: has_internal_speakers +_name: Internal speakers +_prompt: Does this machine have the following audio features? +value-type: bool From b1253f1030df1dcbdcd702a0fb6fae0bdadf6205 Mon Sep 17 00:00:00 2001 From: mthaddon Date: Tue, 2 Apr 2024 14:52:56 +0200 Subject: [PATCH 16/26] Update workflows to specify series (Infra) (#1139) Update workflows to specify series --- .github/workflows/checkbox-beta-release.yml | 10 +++++----- .github/workflows/checkbox-core-snap-beta-release.yml | 4 ++-- .github/workflows/checkbox-core-snap-daily-builds.yml | 2 +- .github/workflows/checkbox-snap-beta-release.yml | 4 ++-- .github/workflows/checkbox-snap-daily-builds.yml | 2 +- .github/workflows/checkbox-stable-release.yml | 8 ++++---- .github/workflows/daily-builds.yml | 2 +- .github/workflows/deb-beta-release.yml | 2 +- .github/workflows/deb-daily-builds.yml | 4 ++-- .../workflows/documentation-build-readthedocs.io.yml | 2 +- .github/workflows/documentation-check.yml | 6 +++--- .github/workflows/pr_validation.yaml | 2 +- .github/workflows/release-notes.yml | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/checkbox-beta-release.yml b/.github/workflows/checkbox-beta-release.yml index 538c79e83..10228c9f3 100644 --- a/.github/workflows/checkbox-beta-release.yml +++ b/.github/workflows/checkbox-beta-release.yml @@ -9,7 +9,7 @@ on: jobs: should-run: - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - name: Setup the gh repository and install gh run: | @@ -33,7 +33,7 @@ jobs: release-notes: needs: should-run - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - name: Checkout checkbox monorepo uses: actions/checkout@v3 @@ -60,7 +60,7 @@ jobs: checkbox_deb_packages: needs: should-run name: Checkbox Debian packages - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - name: Install dependencies run: | @@ -79,7 +79,7 @@ jobs: checkbox_core_snap: needs: should-run name: Checkbox core snap packages - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} steps: @@ -101,7 +101,7 @@ jobs: checkbox_snap: needs: should-run name: Checkbox snap packages - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} steps: diff --git a/.github/workflows/checkbox-core-snap-beta-release.yml b/.github/workflows/checkbox-core-snap-beta-release.yml index 47ee8e8d9..66cec55ff 100644 --- a/.github/workflows/checkbox-core-snap-beta-release.yml +++ b/.github/workflows/checkbox-core-snap-beta-release.yml @@ -14,7 +14,7 @@ jobs: matrix: releases: [16, 18, 20, 22] arch: [amd64, arm64, armhf] - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] env: SERIES: series${{ matrix.releases }} SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} @@ -77,7 +77,7 @@ jobs: done changelog: - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] name: checkbox-snap changelog (${{ github.ref_name }}) if: ${{ github.event_name == 'push' }} steps: diff --git a/.github/workflows/checkbox-core-snap-daily-builds.yml b/.github/workflows/checkbox-core-snap-daily-builds.yml index 8d075da2a..cda840050 100644 --- a/.github/workflows/checkbox-core-snap-daily-builds.yml +++ b/.github/workflows/checkbox-core-snap-daily-builds.yml @@ -10,7 +10,7 @@ jobs: matrix: releases: [16, 18, 20, 22] arch: [amd64, arm64, armhf] - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts env: SERIES: series${{ matrix.releases }} diff --git a/.github/workflows/checkbox-snap-beta-release.yml b/.github/workflows/checkbox-snap-beta-release.yml index 5d8005f11..f41c89199 100644 --- a/.github/workflows/checkbox-snap-beta-release.yml +++ b/.github/workflows/checkbox-snap-beta-release.yml @@ -14,7 +14,7 @@ jobs: matrix: type: [classic, uc] releases: [16, 18, 20, 22] - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] env: SERIES: series_${{ matrix.type }}${{ matrix.releases }} SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} @@ -86,7 +86,7 @@ jobs: done changelog: - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] name: checkbox-snap changelog (${{ github.ref_name }}) if: ${{ github.event_name == 'push' }} steps: diff --git a/.github/workflows/checkbox-snap-daily-builds.yml b/.github/workflows/checkbox-snap-daily-builds.yml index f3b0b1f75..693ea6bb6 100644 --- a/.github/workflows/checkbox-snap-daily-builds.yml +++ b/.github/workflows/checkbox-snap-daily-builds.yml @@ -11,7 +11,7 @@ jobs: matrix: type: [classic, uc] releases: [16, 18, 20, 22] - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts env: SERIES: series_${{ matrix.type }}${{ matrix.releases }} diff --git a/.github/workflows/checkbox-stable-release.yml b/.github/workflows/checkbox-stable-release.yml index cc8c26295..692786085 100644 --- a/.github/workflows/checkbox-stable-release.yml +++ b/.github/workflows/checkbox-stable-release.yml @@ -7,7 +7,7 @@ on: jobs: release: name: Publish the release - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - name: Checkout checkbox monorepo uses: actions/checkout@v3 @@ -31,7 +31,7 @@ jobs: checkbox_deb_packages: name: Checkbox Debian packages - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - name: Install dependencies run: | @@ -49,7 +49,7 @@ jobs: checkbox_core_snap: name: Checkbox core snap packages - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} steps: @@ -69,7 +69,7 @@ jobs: checkbox_snap: name: Checkbox snap packages - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} steps: diff --git a/.github/workflows/daily-builds.yml b/.github/workflows/daily-builds.yml index f754f2ed0..62f663a28 100644 --- a/.github/workflows/daily-builds.yml +++ b/.github/workflows/daily-builds.yml @@ -7,7 +7,7 @@ on: jobs: check_for_commits: - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] name: Check for commits outputs: new_commit_count: ${{ steps.commit_check.outputs.new_commit_count }} diff --git a/.github/workflows/deb-beta-release.yml b/.github/workflows/deb-beta-release.yml index 63e991280..e37549f07 100644 --- a/.github/workflows/deb-beta-release.yml +++ b/.github/workflows/deb-beta-release.yml @@ -9,7 +9,7 @@ on: jobs: Release: - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - name: Install dependencies run: | diff --git a/.github/workflows/deb-daily-builds.yml b/.github/workflows/deb-daily-builds.yml index ef897a47c..dd38bc0b9 100644 --- a/.github/workflows/deb-daily-builds.yml +++ b/.github/workflows/deb-daily-builds.yml @@ -7,7 +7,7 @@ on: jobs: ppa_update: name: Sync PPA history with monorepo - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts steps: - name: Install dependencies @@ -30,7 +30,7 @@ jobs: tools/release/lp_request_import.py "~checkbox-dev/checkbox/+git/checkbox" ppa_build: name: Trigger and monitor PPA builds - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] needs: ppa_update strategy: fail-fast: false diff --git a/.github/workflows/documentation-build-readthedocs.io.yml b/.github/workflows/documentation-build-readthedocs.io.yml index 8d609c92a..dc015ff34 100644 --- a/.github/workflows/documentation-build-readthedocs.io.yml +++ b/.github/workflows/documentation-build-readthedocs.io.yml @@ -11,7 +11,7 @@ on: jobs: if_merged: if: github.event.pull_request.merged == true - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - run: | curl -X POST -d "branches=latest" -d "token=${{ secrets.RTD_TOKEN }}" https://readthedocs.org/api/v2/webhook/checkbox/137367/ diff --git a/.github/workflows/documentation-check.yml b/.github/workflows/documentation-check.yml index 8ab9f38fe..13821487e 100644 --- a/.github/workflows/documentation-check.yml +++ b/.github/workflows/documentation-check.yml @@ -13,7 +13,7 @@ concurrency: jobs: spellcheck: name: Spelling check - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] defaults: run: working-directory: docs @@ -39,7 +39,7 @@ jobs: woke: name: Inclusive language check - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - name: Checkout uses: actions/checkout@v3 @@ -54,7 +54,7 @@ jobs: linkcheck: name: Link check - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] defaults: run: working-directory: docs diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 63a9aed36..2b703e8ff 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -9,7 +9,7 @@ on: - edited jobs: validate_title: - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - name: Checking the presence of the Traceability Marker in the PR title env: diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 8dfdc44fb..99b8dee89 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -9,7 +9,7 @@ on: jobs: Release: - runs-on: [self-hosted, linux, large] + runs-on: [self-hosted, linux, jammy, large] steps: - name: Checkout checkbox monorepo uses: actions/checkout@v3 From 413f5ee6e88d56643e732d3a4451b1340bd2b80f Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Tue, 2 Apr 2024 18:02:00 +0200 Subject: [PATCH 17/26] Fix config loading local when resumable session available (Bugfix) (#1140) * Initial bug fix move * Metabox scenario * Wrong unit in the config --- .../checkbox_ng/launcher/subcommands.py | 2 +- metabox/metabox/scenarios/config/resume.py | 64 ++++++++++++++++++- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/checkbox-ng/checkbox_ng/launcher/subcommands.py b/checkbox-ng/checkbox_ng/launcher/subcommands.py index 7373255b1..855a9f344 100644 --- a/checkbox-ng/checkbox_ng/launcher/subcommands.py +++ b/checkbox-ng/checkbox_ng/launcher/subcommands.py @@ -253,10 +253,10 @@ def invoked(self, ctx): # replace the previously built SA with the defaults self._configure_restart(ctx) self._prepare_transports() - ctx.sa.use_alternate_configuration(self.configuration) self.resume_candidates = list(ctx.sa.get_resumable_sessions()) if not self._auto_resume_session(self.resume_candidates): something_got_chosen = False + ctx.sa.use_alternate_configuration(self.configuration) while not something_got_chosen: try: self._start_new_session() diff --git a/metabox/metabox/scenarios/config/resume.py b/metabox/metabox/scenarios/config/resume.py index 33679024d..20c8a42d0 100644 --- a/metabox/metabox/scenarios/config/resume.py +++ b/metabox/metabox/scenarios/config/resume.py @@ -20,7 +20,14 @@ from metabox.core import keys from metabox.core.scenario import Scenario -from metabox.core.actions import Expect, Start, Signal +from metabox.core.actions import ( + Expect, + Start, + Signal, + SelectTestPlan, + Send, + Put, +) class ConfigLoadedAlsoAfterResume(Scenario): @@ -60,3 +67,58 @@ class ConfigLoadedAlsoAfterResume(Scenario): # autoresume Expect("Case CASE case"), ] + + +class ConfigLoadedAlsoWhenResumableSessionAvailable(Scenario): + """ + Check that configs are loaded also when a resumable session is available + """ + + modes = ["local"] + config_file = textwrap.dedent( + """ + [launcher] + launcher_version = 1 + stock_reports = text + [test plan] + unit = 2021.com.canonical.certification::config-slow-automated + forced = yes + [test selection] + forced = yes + [ui] + type = silent + [environment] + var1=a + var2=b + var3=c + case=case + Case=Case + CASE=CASE + source=source + """ + ) + steps = [ + # generate a resume candidate + Start(), + Expect("Select test plan"), + SelectTestPlan( + "2021.com.canonical.certification::cert-blocker-manual-resume" + ), + Send(keys.KEY_ENTER), + Expect("Press (T) to start"), + Send("T"), + Expect("Pick an action"), + Send("p" + keys.KEY_ENTER), + Expect("Pick an action"), + Send("q" + keys.KEY_ENTER), + Expect("Session paused"), + # now use a config to test if it is still loaded + Put("/etc/xdg/checkbox.conf", config_file), + Start(), + Expect("source: source"), + Expect("starting to sleep"), + Signal(keys.SIGKILL), + Start(), + # autoresume + Expect("Case CASE case"), + ] From 72fce9b0ce755d2a5b5a8bbc475fa41c1b6278b8 Mon Sep 17 00:00:00 2001 From: LiaoU3 <58060146+LiaoU3@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:39:07 +0800 Subject: [PATCH 18/26] [checkbox-ce-oem] Revise snapcraft.yaml to build successfully (Bugfix) (#1138) * Revise snapcraft.yaml to build successfully * Fix suggestions from Stanley --- .../series_classic20/snap/snapcraft.yaml | 11 ++++++----- .../series_classic22/snap/snapcraft.yaml | 11 ++++++----- .../series_uc20/snap/snapcraft.yaml | 11 ++++++----- .../series_uc22/snap/snapcraft.yaml | 11 ++++++----- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/snapcraft.yaml index f7ef21165..a0fd451b4 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/snapcraft.yaml @@ -35,8 +35,8 @@ passthrough: parts: checkbox-provider-ce-oem: plugin: dump - source: https://github.com/canonical/checkbox-provider-ce-oem.git - source-type: git + source: ../../checkbox-provider-ce-oem + source-type: local stage-packages: - alsa-utils - mtd-utils @@ -51,7 +51,6 @@ parts: override-build: | export PYTHONPATH=/snap/checkbox20/current/lib/python3.8/site-packages/ for path in $(find "/snap/checkbox20/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done - cd checkbox-provider-ce-oem python3 manage.py validate python3 manage.py build python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$SNAPCRAFT_PART_INSTALL" @@ -66,13 +65,15 @@ parts: - python3-requests-oauthlib input-pcspkr: plugin: nil + after: [checkbox-provider-ce-oem] build-packages: - gcc - libc6-dev override-build: | mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/bin - gcc ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep - cp -v ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ + PART_SRC=${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src + gcc ${PART_SRC}/src/input-pcspkr.c -o ${PART_SRC}/src/beep + cp -v ${PART_SRC}/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ parts-meta-info: plugin: nil diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/snapcraft.yaml index ba5b47fe7..34942b40a 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/snapcraft.yaml @@ -35,8 +35,8 @@ passthrough: parts: checkbox-provider-ce-oem: plugin: dump - source: https://github.com/canonical/checkbox-provider-ce-oem.git - source-type: git + source: ../../checkbox-provider-ce-oem + source-type: local stage-packages: - alsa-utils - mtd-utils @@ -51,7 +51,6 @@ parts: override-build: | export PYTHONPATH=/snap/checkbox22/current/lib/python3.10/site-packages/ for path in $(find "/snap/checkbox22/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done - cd checkbox-provider-ce-oem python3 manage.py validate python3 manage.py build python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$SNAPCRAFT_PART_INSTALL" @@ -66,13 +65,15 @@ parts: - python3-requests-oauthlib input-pcspkr: plugin: nil + after: [checkbox-provider-ce-oem] build-packages: - gcc - libc6-dev override-build: | mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/bin - gcc ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep - cp -v ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ + PART_SRC=${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src + gcc ${PART_SRC}/src/input-pcspkr.c -o ${PART_SRC}/src/beep + cp -v ${PART_SRC}/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ parts-meta-info: plugin: nil diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc20/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc20/snap/snapcraft.yaml index cfa757d7c..256759343 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc20/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc20/snap/snapcraft.yaml @@ -17,8 +17,8 @@ slots: parts: checkbox-provider-ce-oem: plugin: dump - source: https://github.com/canonical/checkbox-provider-ce-oem.git - source-type: git + source: ../../checkbox-provider-ce-oem + source-type: local stage-packages: - alsa-utils - mtd-utils @@ -33,7 +33,6 @@ parts: override-build: | export PYTHONPATH=/snap/checkbox20/current/lib/python3.8/site-packages/ for path in $(find "/snap/checkbox20/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done - cd checkbox-provider-ce-oem python3 manage.py validate python3 manage.py build python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$SNAPCRAFT_PART_INSTALL" @@ -48,10 +47,12 @@ parts: - python3-requests-oauthlib input-pcspkr: plugin: nil + after: [checkbox-provider-ce-oem] build-packages: - gcc - libc6-dev override-build: | mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/bin - gcc ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep - cp -v ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ + PART_SRC=${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src + gcc ${PART_SRC}/src/input-pcspkr.c -o ${PART_SRC}/src/beep + cp -v ${PART_SRC}/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/snapcraft.yaml index 1ada71599..5d52b7cbb 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/snapcraft.yaml @@ -68,8 +68,8 @@ slots: parts: checkbox-provider-ce-oem: plugin: dump - source: https://github.com/canonical/checkbox-provider-ce-oem.git - source-type: git + source: ../../checkbox-provider-ce-oem + source-type: local stage-packages: - alsa-utils - mtd-utils @@ -84,7 +84,6 @@ parts: override-build: | export PYTHONPATH=/snap/checkbox22/current/lib/python3.10/site-packages/ for path in $(find "/snap/checkbox22/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done - cd checkbox-provider-ce-oem python3 manage.py validate python3 manage.py build python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$SNAPCRAFT_PART_INSTALL" @@ -99,13 +98,15 @@ parts: - python3-requests-oauthlib input-pcspkr: plugin: nil + after: [checkbox-provider-ce-oem] build-packages: - gcc - libc6-dev override-build: | mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/bin - gcc ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep - cp -v ${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src/checkbox-provider-ce-oem/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ + PART_SRC=${SNAPCRAFT_PROJECT_DIR}/parts/checkbox-provider-ce-oem/src + gcc ${PART_SRC}/src/input-pcspkr.c -o ${PART_SRC}/src/beep + cp -v ${PART_SRC}/src/beep ${SNAPCRAFT_PART_INSTALL}/usr/bin/ parts-meta-info: plugin: nil From b3216793182943cfddc46702be157bf9e16bfebe Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Wed, 3 Apr 2024 11:57:13 +0200 Subject: [PATCH 19/26] Move jobs back to paid runners (infra) (#1144) * Move jobs back to paid runners * Move back some WF and update all release Minor: remove outdated jobs --- .github/workflows/checkbox-beta-release.yml | 10 +- .../checkbox-core-snap-beta-release.yml | 105 ----------------- .../workflows/checkbox-snap-beta-release.yml | 106 ------------------ .github/workflows/deb-beta-release.yml | 33 ------ .github/workflows/pr_validation.yaml | 4 +- 5 files changed, 7 insertions(+), 251 deletions(-) delete mode 100644 .github/workflows/checkbox-core-snap-beta-release.yml delete mode 100644 .github/workflows/checkbox-snap-beta-release.yml delete mode 100644 .github/workflows/deb-beta-release.yml diff --git a/.github/workflows/checkbox-beta-release.yml b/.github/workflows/checkbox-beta-release.yml index 10228c9f3..ec739af16 100644 --- a/.github/workflows/checkbox-beta-release.yml +++ b/.github/workflows/checkbox-beta-release.yml @@ -9,7 +9,7 @@ on: jobs: should-run: - runs-on: [self-hosted, linux, jammy, large] + runs-on: ubuntu-latest steps: - name: Setup the gh repository and install gh run: | @@ -33,7 +33,7 @@ jobs: release-notes: needs: should-run - runs-on: [self-hosted, linux, jammy, large] + runs-on: ubuntu-latest steps: - name: Checkout checkbox monorepo uses: actions/checkout@v3 @@ -60,7 +60,7 @@ jobs: checkbox_deb_packages: needs: should-run name: Checkbox Debian packages - runs-on: [self-hosted, linux, jammy, large] + runs-on: ubuntu-latest steps: - name: Install dependencies run: | @@ -79,7 +79,7 @@ jobs: checkbox_core_snap: needs: should-run name: Checkbox core snap packages - runs-on: [self-hosted, linux, jammy, large] + runs-on: ubuntu-latest env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} steps: @@ -101,7 +101,7 @@ jobs: checkbox_snap: needs: should-run name: Checkbox snap packages - runs-on: [self-hosted, linux, jammy, large] + runs-on: ubuntu-latest env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} steps: diff --git a/.github/workflows/checkbox-core-snap-beta-release.yml b/.github/workflows/checkbox-core-snap-beta-release.yml deleted file mode 100644 index 66cec55ff..000000000 --- a/.github/workflows/checkbox-core-snap-beta-release.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Beta version of checkbox-core-snap -run-name: Beta version of checkbox-core-snap ${{ github.ref_name }} - -on: - push: - tags: - - "v*" - workflow_dispatch: - -jobs: - snap: - strategy: - fail-fast: false - matrix: - releases: [16, 18, 20, 22] - arch: [amd64, arm64, armhf] - runs-on: [self-hosted, linux, jammy, large] - env: - SERIES: series${{ matrix.releases }} - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} - # snapcraft remote-build will create a repository with the name decided by the --build-id arg - # URL to this repo echoed below to help debug builds (does not change if the workflow is re-run) - SNAPCRAFT_BUILDER_ID: checkbox${{ matrix.releases }}-${{ matrix.arch }}-${{ github.run_id }} - name: Runtime (Core) ${{ matrix.releases }}-${{ matrix.arch }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Copy over the common files for series ${{ matrix.releases }} - run: | - cd checkbox-core-snap/ - sudo apt update && sudo apt install -qq -y python3-setuptools-scm - ./prepare.sh $SERIES - - name: Add LP credentials - run: | - mkdir -p ~/.local/share/snapcraft/provider/launchpad/ - echo '${{ secrets.LP_CREDS }}' > ~/.local/share/snapcraft/provider/launchpad/credentials - git config --global user.email "robot@lists.canonical.com" - git config --global user.name "Certification bot" - - name: Print Launchpad build repository - run: | - echo "Building at: https://git.launchpad.net/~ce-certification-qa/+snap/$SNAPCRAFT_BUILDER_ID" - - uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0 - name: Build the snap - with: - action: Hook25/action-build@707dce252c4f367b6c1afe61ed577f7413cf7912 - attempt_delay: 600000 # 10min - attempt_limit: 5 - with: | - path: checkbox-core-snap/series${{ matrix.releases }} - snapcraft-channel: 7.x/stable - snapcraft-args: remote-build --build-for ${{ matrix.arch }} --launchpad-accept-public-upload --build-id $SNAPCRAFT_BUILDER_ID - - uses: actions/upload-artifact@v3 - name: Upload logs on failure - if: failure() - with: - name: snapcraft-log-series${{ matrix.releases }} - path: | - /home/runner/.cache/snapcraft/log/ - /home/runner/.local/state/snapcraft/log/ - checkbox-core-snap/series${{ matrix.releases }}/checkbox*.txt - - uses: actions/upload-artifact@v3 - name: Upload the snap as artifact - with: - name: series${{ matrix.releases }} - path: checkbox-core-snap/series${{ matrix.releases }}/*.snap - - uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0 - name: Upload the snap to the store - with: - attempt_delay: 600000 # 10min - attempt_limit: 10 - command: | - for snap in checkbox-core-snap/series${{ matrix.releases }}/*.snap ; \ - do \ - echo "Uploading $snap..." ; \ - snapcraft upload $snap --release beta ; \ - done - - changelog: - runs-on: [self-hosted, linux, jammy, large] - name: checkbox-snap changelog (${{ github.ref_name }}) - if: ${{ github.event_name == 'push' }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Create changelog - run: | - git config --global user.email "robot@canonical.com" - git config --global user.name "Devices Certification Bot" - for project in checkbox-core-snap checkbox-ng checkbox-support providers/* - do - log=$(git log --no-merges --pretty='format:+ %s' $(git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/tags/checkbox-core-snap-v* | tail -n 2 | head -n 1)...${{ github.ref_name }} -- "$project") - if [[ ! -z $log ]] - then - echo $project: - echo "$log" - echo - fi - done > changelog - - name: Archive changelog - uses: actions/upload-artifact@v3 - with: - name: Changelog - path: changelog diff --git a/.github/workflows/checkbox-snap-beta-release.yml b/.github/workflows/checkbox-snap-beta-release.yml deleted file mode 100644 index f41c89199..000000000 --- a/.github/workflows/checkbox-snap-beta-release.yml +++ /dev/null @@ -1,106 +0,0 @@ -name: Beta version of checkbox-snap -run-name: Beta version of checkbox-snap ${{ github.ref_name }} - -on: - push: - tags: - - "v*" - workflow_dispatch: - -jobs: - snap: - strategy: - fail-fast: false - matrix: - type: [classic, uc] - releases: [16, 18, 20, 22] - runs-on: [self-hosted, linux, jammy, large] - env: - SERIES: series_${{ matrix.type }}${{ matrix.releases }} - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} - # snapcraft remote-build will create a repository with the name decided by the --build-id arg - # URL to this repo echoed below to help debug builds (does not change if the workflow is re-run) - # as the run_id will not change - SNAPCRAFT_BUILDER_ID: checkbox-${{ matrix.type }}${{ matrix.releases }}-${{ github.run_id }} - name: Frontend ${{ matrix.type }}${{ matrix.releases }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Copy over the common files for series ${{ matrix.type }}${{ matrix.releases }} - run: | - cd checkbox-snap/ - sudo apt update && sudo apt install -qq -y python3-setuptools-scm - ./prepare_${{ matrix.type }}.sh $SERIES - - name: Add LP credentials - run: | - mkdir -p ~/.local/share/snapcraft/provider/launchpad/ - echo '${{ secrets.LP_CREDS }}' > ~/.local/share/snapcraft/provider/launchpad/credentials - git config --global user.email "robot@lists.canonical.com" - git config --global user.name "Certification bot" - - name: Print Launchpad build repository - run: | - echo "Building at: https://git.launchpad.net/~ce-certification-qa/+snap/$SNAPCRAFT_BUILDER_ID" - - uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0 - name: Building the snaps - with: - action: Hook25/action-build@707dce252c4f367b6c1afe61ed577f7413cf7912 - attempt_delay: 600000 # 10min - attempt_limit: 5 - with: | - path: checkbox-snap/series_${{ matrix.type }}${{ matrix.releases }} - snapcraft-channel: 7.x/stable - snapcraft-args: remote-build --build-for amd64,arm64,armhf --launchpad-accept-public-upload --build-id $SNAPCRAFT_BUILDER_ID - - uses: actions/upload-artifact@v3 - name: Upload logs on failure - if: failure() - with: - name: snapcraft-log-series-${{ matrix.type }}${{ matrix.releases }} - path: | - /home/runner/.cache/snapcraft/log/ - /home/runner/.local/state/snapcraft/log/ - checkbox-snap/series_${{ matrix.type }}${{ matrix.releases }}/checkbox*.txt - - uses: actions/upload-artifact@v3 - name: Upload the snaps as artifacts - with: - name: series_${{ matrix.type }}${{ matrix.releases }} - path: checkbox-snap/series_${{ matrix.type }}${{ matrix.releases }}/*.snap - - uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0 - name: Upload the snaps to the store - with: - attempt_delay: 600000 # 10min - attempt_limit: 10 - command: | - for snap in checkbox-snap/series_${{ matrix.type }}${{ matrix.releases }}/*.snap ; \ - do \ - echo "Uploading $snap..." ; \ - if [ ${{ matrix.type }} = 'classic' ]; then \ - if [ ${{ matrix.releases }} = '22' ]; then \ - snapcraft upload $snap --release ${{ matrix.releases }}.04/beta,latest/beta ; \ - else \ - snapcraft upload $snap --release ${{ matrix.releases }}.04/beta ; \ - fi \ - else \ - snapcraft upload $snap --release ${{ matrix.type }}${{ matrix.releases }}/beta ; \ - fi ; \ - done - - changelog: - runs-on: [self-hosted, linux, jammy, large] - name: checkbox-snap changelog (${{ github.ref_name }}) - if: ${{ github.event_name == 'push' }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Create changelog - run: | - git config --global user.email "robot@canonical.com" - git config --global user.name "Devices Certification Bot" - echo 'checkbox-snap (${{ github.ref_name }}):' > changelog - git log --no-merges --pretty='format:+ %s' $(git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/tags/checkbox-snap-v* | tail -n 2 | head -n 1)...${{ github.ref_name }} -- ':checkbox-snap' >> changelog - - name: Archive changelog - uses: actions/upload-artifact@v3 - with: - name: Changelog - path: changelog diff --git a/.github/workflows/deb-beta-release.yml b/.github/workflows/deb-beta-release.yml deleted file mode 100644 index e37549f07..000000000 --- a/.github/workflows/deb-beta-release.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Beta version of deb packages -run-name: Beta version of deb packages ${{ github.ref_name }} - -on: - push: - tags: - - "v*" - workflow_dispatch: - -jobs: - Release: - runs-on: [self-hosted, linux, jammy, large] - steps: - - name: Install dependencies - run: | - sudo apt update -qq - sudo apt install -qq -y python3-launchpadlib - git clone -b main https://git.launchpad.net/~hook25/ppa-dev-tools /tmp/ppa-dev-tools - - name: Checkout checkbox monorepo - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0 - name: Import to LP, ask for a build and wait result - env: - LP_CREDENTIALS: ${{ secrets.LP_CREDS }} - PYTHONUNBUFFERED: 1 - CHECKBOX_REPO: ${{ github.repository }} - with: - attempt_delay: 600000 # 10min - attempt_limit: 3 - command: | - tools/release/release_deb_monorepo.py diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 2b703e8ff..e4ba394b1 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -9,13 +9,13 @@ on: - edited jobs: validate_title: - runs-on: [self-hosted, linux, jammy, large] + runs-on: ubuntu-latest steps: - name: Checking the presence of the Traceability Marker in the PR title env: PR_TITLE: ${{ github.event.pull_request.title }} run: | - if echo "$PR_TITLE" | grep -iqP "\((infra|bugfix|new|breaking)\)$"; then + if echo "$PR_TITLE" | grep -iqP " \((infra|bugfix|new|breaking)\)$"; then echo "PR title contains the traceability marker" exit 0 else From 1eced4bbaf3210d8d5afb5849a252b3013dd6797 Mon Sep 17 00:00:00 2001 From: Bin Li Date: Wed, 3 Apr 2024 21:21:28 +0800 Subject: [PATCH 20/26] Switching power mode for Lenovo's platforms (New) (#1116) * Switching power mode for Lenovo's platforms (New) (#816) --- providers/base/bin/switch_power_mode.py | 99 ++++++++++ .../base/tests/test_switch_power_mode.py | 177 ++++++++++++++++++ .../base/units/power-management/jobs.pxu | 14 +- .../resource/bin/platform_profile_resource.py | 47 +++++ providers/resource/jobs/resource.pxu | 7 + .../tests/test_platform_profile_resource.py | 75 ++++++++ 6 files changed, 418 insertions(+), 1 deletion(-) create mode 100755 providers/base/bin/switch_power_mode.py create mode 100644 providers/base/tests/test_switch_power_mode.py create mode 100755 providers/resource/bin/platform_profile_resource.py create mode 100644 providers/resource/tests/test_platform_profile_resource.py diff --git a/providers/base/bin/switch_power_mode.py b/providers/base/bin/switch_power_mode.py new file mode 100755 index 000000000..e17073885 --- /dev/null +++ b/providers/base/bin/switch_power_mode.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python3 +# +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: Bin Li +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . + +# pylint: disable=consider-using-f-string + +""" Switching the power mode to check if the power mode can be switched. """ +from pathlib import Path +import subprocess +import contextlib + + +def get_sysfs_content(path): + """ + Reads the content of a sysfs file. + Args: + path (pathlib.Path): Path to the sysfs file. + Raises: + SystemExit: If the file could not be read. + """ + with open(path, "rt", encoding="utf-8") as stream: + content = stream.read().strip() + if not content: + raise SystemExit("Failed to read sysfs file: {}".format(path)) + return content + + +def set_power_profile(profile): + """ + Sets the power profile to the specified value. + Args: + profile (str): The power profile to set (e.g., "power-saver"). + Raises: + SystemExit: If the power profile could not be set. + """ + # In sys file the modes are low-power, balanced, or performance + # but powerprofilesctl only accepts power-saver, balanced or performance + profile = "power-saver" if profile == "low-power" else profile + try: + subprocess.check_call(["powerprofilesctl", "set", profile]) + except subprocess.CalledProcessError as e: + raise SystemExit( + "Failed to set power mode to {}.".format(profile) + ) from e + + +@contextlib.contextmanager +def preserve_power_profile(): + """ + Rolls back the power profile to the original before calling + """ + sysfs_root = Path("/sys/firmware/acpi/") + profile_path = sysfs_root / "platform_profile" + old_profile = get_sysfs_content(profile_path) + try: + yield + finally: + set_power_profile(old_profile) + + +def main(): + """main function to switch the power mode.""" + sysfs_root = Path("/sys/firmware/acpi/") + choices_path = sysfs_root / "platform_profile_choices" + profile_path = sysfs_root / "platform_profile" + + # use a context manager to ensure the original power mode is restored + with preserve_power_profile(): + + choices = get_sysfs_content(choices_path).split() + + print("Power mode choices: {}".format(choices)) + for choice in choices: + set_power_profile(choice) + if get_sysfs_content(profile_path) == choice: + print("Switch to {} successfully.".format(choice)) + else: + raise SystemExit( + "ERROR: Failed to switch power mode to {}".format(choice) + ) + + +if __name__ == "__main__": + main() diff --git a/providers/base/tests/test_switch_power_mode.py b/providers/base/tests/test_switch_power_mode.py new file mode 100644 index 000000000..5b66b3922 --- /dev/null +++ b/providers/base/tests/test_switch_power_mode.py @@ -0,0 +1,177 @@ +#!/usr/bin/env python3 +# Copyright 2024 Canonical Ltd. +# Written by: +# Bin Li +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# pylint: disable=import-error + +""" A unittest module for the switch_power_mode module. """ +import unittest +import subprocess +from pathlib import Path +from unittest.mock import patch, MagicMock +import io + +from switch_power_mode import get_sysfs_content, set_power_profile, main + + +class TestSwitchPowerMode(unittest.TestCase): + """ Tests for the switch_power_mode module. """ + @patch("builtins.open") # Mock the open function + def test_get_sysfs_content_success(self, mock_open): + """ + Tests successful reading of sysfs file content. + """ + mock_file = MagicMock(spec=io.TextIOWrapper) + mock_file.read.return_value = "low-power balanced performance" + mock_open.return_value.__enter__.return_value = mock_file + + content = get_sysfs_content(Path("/fake/path/power_profile_choices")) + + self.assertEqual(content, "low-power balanced performance") + mock_open.assert_called_once_with( + Path("/fake/path/power_profile_choices"), "rt", encoding="utf-8" + ) + + @patch("switch_power_mode.open") # Mock the open function + def test_get_sysfs_content_failure(self, mock_open): + """ + Tests handling of an empty sysfs file. + """ + mock_file = MagicMock(spec=io.TextIOWrapper) + mock_file.read.return_value = "" + mock_open.return_value.__enter__.return_value = mock_file + + with self.assertRaises(SystemExit) as cm: + get_sysfs_content(Path("/fake/path/power_profile")) + + self.assertEqual( + str(cm.exception), + "Failed to read sysfs file: /fake/path/power_profile" + ) + mock_open.assert_called_once_with( + Path("/fake/path/power_profile"), "rt", encoding="utf-8" + ) + + @patch("subprocess.check_call") # Mock the subprocess.check_call function + def test_set_power_profile_success(self, mock_check_call): + """ + Tests successful setting of the power profile. + """ + set_power_profile("balanced") + + mock_check_call.assert_called_once_with( + ["powerprofilesctl", "set", "balanced"] + ) + + @patch("subprocess.check_call") # Mock the subprocess.check_call function + def test_set_power_profile_low_power(self, mock_check_call): + """ + Tests conversion of "low-power" to "power-saver" before setting. + """ + set_power_profile("low-power") + + mock_check_call.assert_called_once_with( + ["powerprofilesctl", "set", "power-saver"] + ) + + @patch("subprocess.check_call") # Mock the subprocess.check_call function + def test_set_power_profile_failure(self, mock_check_call): + """ + Tests handling of a failed power profile setting. + """ + mock_check_call.side_effect = subprocess.CalledProcessError( + 1, "powerprofilesctl" + ) + + with self.assertRaises(SystemExit) as cm: + set_power_profile("performance") + + self.assertEqual( + str(cm.exception), + "Failed to set power mode to performance." + ) + mock_check_call.assert_called_once_with( + ["powerprofilesctl", "set", "performance"] + ) + + @patch("sys.stdout", new_callable=io.StringIO) + def test_main_success(self, mock_stdout): + """ + Tests successful execution of the main function. + """ + with patch( + "switch_power_mode.get_sysfs_content" + ) as mock_get_sysfs_content, patch( + "switch_power_mode.set_power_profile" + ) as mock_set_power_profile: + mock_get_sysfs_content.side_effect = [ + "balanced", + "low-power balanced performance", + "low-power", + "balanced", + "performance", + ] + mock_set_power_profile.side_effect = [None, None, None, None] + + # Call the main function + main() + + expected_output = """\ +Power mode choices: ['low-power', 'balanced', 'performance'] +Switch to low-power successfully. +Switch to balanced successfully. +Switch to performance successfully. +""" + self.assertEqual(mock_stdout.getvalue(), expected_output) + + @patch("sys.stdout", new_callable=io.StringIO) + @patch("switch_power_mode.get_sysfs_content") + @patch("switch_power_mode.set_power_profile") + def test_main_failure(self, mock_set_power_profile, + mock_get_sysfs_content, mock_stdout): + """ + Tests failed execution of the main function. + """ + mock_get_sysfs_content.side_effect = [ + "balanced", + "low-power balanced performance", + "low-power", + "low-power", + ] + mock_set_power_profile.side_effect = [ + "lower-power", + "balanced", + "performance", + None + ] + + # Call the function and check if SystemExit is raised + with self.assertRaises(SystemExit) as cm: + main() + + # Assertions + self.assertEqual( + cm.exception.code, "ERROR: Failed to switch power mode to balanced" + ) + expected_output = """\ +Power mode choices: ['low-power', 'balanced', 'performance'] +Switch to low-power successfully. +""" + self.assertEqual(mock_stdout.getvalue(), expected_output) + + +if __name__ == "__main__": + unittest.main() diff --git a/providers/base/units/power-management/jobs.pxu b/providers/base/units/power-management/jobs.pxu index fcd09d160..7c7ea5dbc 100644 --- a/providers/base/units/power-management/jobs.pxu +++ b/providers/base/units/power-management/jobs.pxu @@ -107,6 +107,18 @@ _description: VERIFICATION: Does closing your laptop lid cause your system to suspend? +plugin: shell +category_id: com.canonical.plainbox::power-management +id: power-management/switch_power_mode +estimated_duration: 10.0 +requires: + module.name == 'platform_profile' + package.name == 'power-profiles-daemon' + platform_profile.supported == 'True' +command: switch_power_mode.py +_description: + This test will check if the power mode could be switched. + plugin: user-interact-verify category_id: com.canonical.plainbox::power-management id: power-management/lid_close @@ -509,4 +521,4 @@ _steps: 5. Wait until the message "Has ambient light sensor" is printed on the screen and wave your hand slowly during testing. _verification: Did the Ambient Light Sensor values change when you shaking your hands over the sensor? - Did the Screen backlight also changed? \ No newline at end of file + Did the Screen backlight also changed? diff --git a/providers/resource/bin/platform_profile_resource.py b/providers/resource/bin/platform_profile_resource.py new file mode 100755 index 000000000..978a25f73 --- /dev/null +++ b/providers/resource/bin/platform_profile_resource.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python3 +# +# This file is part of Checkbox. +# +# Copyright 2024 Canonical Ltd. +# Authors: Bin Li +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . + +# pylint: disable=consider-using-f-string + +""" Provides a resource to check if platform profiles are supported.""" +from pathlib import Path + + +def check_platform_profiles(): + """check platform_profiles and print supported or unsupported.""" + supported = False + + sysfs_root = Path("/sys/firmware/acpi/") + choices_path = sysfs_root / "platform_profile_choices" + profile_path = sysfs_root / "platform_profile" + + supported = ( + sysfs_root.exists() and choices_path.exists() and profile_path.exists() + ) + + print("supported: {}".format(supported)) + + +def main(): + """main function.""" + check_platform_profiles() + + +if __name__ == "__main__": + main() diff --git a/providers/resource/jobs/resource.pxu b/providers/resource/jobs/resource.pxu index 41b4ad300..4fe72bb8d 100644 --- a/providers/resource/jobs/resource.pxu +++ b/providers/resource/jobs/resource.pxu @@ -527,3 +527,10 @@ _description: Source: 'stock' or 'oem' Type: 'classic' or 'core' command: checkbox-support-image_checker -t -s + +id: platform_profile +estimated_duration: 1.0 +plugin: resource +_summary: Discover if the system supports power modes via acpi +_description: Discover resource info from /sys/firmware/apci +command: platform_profile_resource.py diff --git a/providers/resource/tests/test_platform_profile_resource.py b/providers/resource/tests/test_platform_profile_resource.py new file mode 100644 index 000000000..8801f79ac --- /dev/null +++ b/providers/resource/tests/test_platform_profile_resource.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +# Copyright 2024 Canonical Ltd. +# Written by: +# Bin Li +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# pylint: disable=import-error + +""" A unittest module for the platform_profile_resource module. """ +import unittest +from unittest.mock import patch +import platform_profile_resource + + +class TestPlatformProfilesSupport(unittest.TestCase): + """ Test the platform profile support """ + @patch("builtins.print") + def test_supported(self, mock_print): + """ Test the function when all paths exist""" + with patch("pathlib.Path.exists") as mock_exists: + # All paths exist + mock_exists.side_effect = [True, True, True] + platform_profile_resource.check_platform_profiles() + # Check the output + mock_print.assert_called_once_with("supported: True") + + @patch("builtins.print") + def test_unsupported(self, mock_print): + """ Test the function when some paths do not exist""" + with patch("pathlib.Path.exists") as mock_exists: + # First scenario: None of the paths exist + mock_exists.side_effect = [False, False, False] + platform_profile_resource.check_platform_profiles() + # Check the output + mock_print.assert_called_once_with("supported: False") + + # Second scenario: Only sysfs_root exists + mock_exists.side_effect = [True, False, False] + platform_profile_resource.check_platform_profiles() + # Check the output + mock_print.assert_called_with("supported: False") + self.assertEqual(mock_print.call_count, 2) + + # Third scenario: sysfs_root and choices_path exist, + # but profile_path does not exist + mock_exists.side_effect = [True, True, False] + platform_profile_resource.check_platform_profiles() + # Check the output + mock_print.assert_called_with("supported: False") + self.assertEqual(mock_print.call_count, 3) + + # Fourth scenario: sysfs_root and profile_path exist, + # but choices_path does not exist + mock_exists.side_effect = [True, False, True] + platform_profile_resource.check_platform_profiles() + # Check the output + mock_print.assert_called_with("supported: False") + self.assertEqual(mock_print.call_count, 4) + + @patch("platform_profile_resource.check_platform_profiles") + def test_main(self, mock_check_platform_profiles): + """ Test the main function """ + platform_profile_resource.main() + mock_check_platform_profiles.assert_has_calls([]) From 41b0e7a02d4f866537c92701e17ae8f6458a6581 Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Wed, 3 Apr 2024 16:37:51 +0200 Subject: [PATCH 21/26] Disk resource gated jobs (bugfix) (#1113) * New disk resource forked from disk_info.py * Updated jobs with the new requirement * Add unittests Minor: rota in json mode returns a boolean * Removed pointless depends * Updated license banner --- providers/base/bin/disk_resource.py | 109 +++++++++++++++++++ providers/base/tests/test_disk_resource.py | 120 +++++++++++++++++++++ providers/base/units/disk/jobs.pxu | 13 ++- 3 files changed, 241 insertions(+), 1 deletion(-) create mode 100755 providers/base/bin/disk_resource.py create mode 100644 providers/base/tests/test_disk_resource.py diff --git a/providers/base/bin/disk_resource.py b/providers/base/bin/disk_resource.py new file mode 100755 index 000000000..7dd94d468 --- /dev/null +++ b/providers/base/bin/disk_resource.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +# +# This file is part of Checkbox. +# +# Copyright (C) 2010-2013 by Cloud Computing Center for Mobile Applications +# Industrial Technology Research Institute +# Copyright 2024 Canonical Ltd. +# +# Authors: +# Nelson Chu +# Jeff Lane +# Sylvain Pineau +# Massimiliano Girardi +# +# Checkbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# Checkbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Checkbox. If not, see . +""" +disk_resource creates a resource per disk from the output of lsblk. +- name: column KNAME, internal kernel name +- path: column PATH, path to the device node +- model: column MODEL, model identifier +- size: column SIZE, size of the disk in bytes +- rotational: column ROTA, True for rotational drives like hard disks +""" + +import json +from subprocess import check_output, CalledProcessError + + +def get_blockdevices_info() -> dict: + try: + lsblk_out_text = check_output( + [ + "lsblk", + "--json", + "--bytes", + "--ascii", + "--noheadings", + "--output", + "KNAME,PATH,TYPE,SIZE,MODEL,ROTA,MOUNTPOINT", + ], + universal_newlines=True, + ) + except CalledProcessError as e: + raise SystemExit(str(e)) + lsblk_out = json.loads(lsblk_out_text) + return lsblk_out["blockdevices"] + + +def get_relevant_block_devices(block_devices: list) -> list: + """ + Filters out every block device that we don't usually consider a disk + like, for example, loopback devices + """ + + def include(block_device): + if block_device["type"] not in ("disk", "crypt"): + return False + is_mmcblk = block_device["kname"].startswith("mmcblk") + whitelisted_mountpoints = { + "/", + "/writable", + "/hostfs", + "/ubuntu-seed", + "/ubuntu-boot", + "/ubuntu-save", + "/data", + "/boot", + } + if is_mmcblk and block_device["mountpoint"] in whitelisted_mountpoints: + return False + if "snapd/save" in (block_device.get("mountpoint") or ""): + return False + return True + + return filter(include, block_devices) + + +def print_as_resource(block_device): + model = block_device.get("model", "Unknown") + print("name:", block_device["kname"]) + print("path:", block_device["path"]) + print("model:", model) + print("size:", block_device["size"]) + print("rotational:", block_device["rota"]) + print() + + +def main(): + """ + Uses lsblk to gather information about disks seen by the OS. + """ + block_devices = get_blockdevices_info() + relevant_block_devices = get_relevant_block_devices(block_devices) + for block_device in relevant_block_devices: + print_as_resource(block_device) + + +if __name__ == "__main__": + main() diff --git a/providers/base/tests/test_disk_resource.py b/providers/base/tests/test_disk_resource.py new file mode 100644 index 000000000..ad5c9a000 --- /dev/null +++ b/providers/base/tests/test_disk_resource.py @@ -0,0 +1,120 @@ +import unittest +import textwrap +from subprocess import CalledProcessError +from unittest.mock import patch, MagicMock + +import disk_resource + + +class TestDiskResource(unittest.TestCase): + def test_print_as_resource(self): + with patch("builtins.print") as mocked_print: + block_device = { + "kname": "sda", + "path": "/dev/sda", + "model": "FastSSD", + "size": "512110190592", + "rota": False, + } + disk_resource.print_as_resource(block_device) + mocked_print.assert_any_call("name:", "sda") + mocked_print.assert_any_call("path:", "/dev/sda") + mocked_print.assert_any_call("model:", "FastSSD") + mocked_print.assert_any_call("size:", "512110190592") + mocked_print.assert_any_call("rotational:", False) + + def test_get_relevant_block_devices_is_mmc(self): + block_devices = [ + {"type": "disk", "kname": "mmcblk0", "mountpoint": "/boot"} + ] + result = list(disk_resource.get_relevant_block_devices(block_devices)) + self.assertEqual(len(result), 0) + + def test_get_relevant_block_devices_loopback(self): + block_devices = [ + {"type": "loop", "kname": "loop0", "mountpoint": None} + ] + result = list(disk_resource.get_relevant_block_devices(block_devices)) + self.assertEqual(len(result), 0) + + def test_get_relevant_block_devices_snapd(self): + block_devices = [ + { + "type": "disk", + "kname": "sda", + "mountpoint": "var/lib/snapd/save", + } + ] + result = list(disk_resource.get_relevant_block_devices(block_devices)) + self.assertEqual(len(result), 0) + + def test_get_relevant_block_devices_ok(self): + block_devices = [{"type": "disk", "kname": "sda", "mountpoint": "/"}] + result = list(disk_resource.get_relevant_block_devices(block_devices)) + self.assertEqual(len(result), 1) + + @patch("disk_resource.check_output") + def test_get_blockdevices_info_ok(self, mock_check_output): + mock_check_output.return_value = textwrap.dedent( + """ + { + "blockdevices": [ + { + "kname": "sda", + "path": "/dev/sda", + "type": "disk", + "size": "256G", + "model": "FastSSD", + "rota": false + } + ] + } + """ + ) + result = disk_resource.get_blockdevices_info() + self.assertIsInstance(result, list) + self.assertEqual(len(result), 1) + self.assertEqual(result[0]["model"], "FastSSD") + + @patch("disk_resource.check_output") + def test_get_blockdevices_info_fail(self, mock_check_output): + mock_check_output.side_effect = CalledProcessError(1, "Command failed") + with self.assertRaises(SystemExit): + disk_resource.get_blockdevices_info() + + +class TestMain(unittest.TestCase): + @patch("disk_resource.check_output") + @patch("disk_resource.print_as_resource") + def test_main(self, mock_print_as_resource, mock_check_output): + mock_check_output.return_value = textwrap.dedent( + """ + { + "blockdevices": [ + { + "kname": "sda", + "path": "/dev/sda", + "type": "disk", + "size": "256G", + "model": "FastSSD", + "rota": "0", + "mountpoint" : "/" + }, + { + "kname": "loop1", + "path": "/dev/loop1", + "type": "loop", + "size": 58363904, + "model": null, + "rota": false, + "mountpoint": "/var/lib/snapd/snap/core16/2812" + } + + ] + } + """ + ) + + disk_resource.main() + + self.assertEqual(mock_print_as_resource.call_count, 1) diff --git a/providers/base/units/disk/jobs.pxu b/providers/base/units/disk/jobs.pxu index 00c76da33..cfa265d30 100644 --- a/providers/base/units/disk/jobs.pxu +++ b/providers/base/units/disk/jobs.pxu @@ -11,6 +11,15 @@ _description: command: disk_info.py estimated_duration: 0.25 +plugin: resource +id: disk_resource +requires: + executable.name == 'lsblk' +_summary: Produces a resource per block device in the lsblk output +_purpose: + Creates a resource to easily query the block devices available on the DUT. +command: disk_resource.py + unit: template template-resource: device template-filter: device.category == 'DISK' and device.name != '' @@ -140,7 +149,9 @@ estimated_duration: 60.0 requires: device.category == 'DISK' executable.name == 'hdapsd' -depends: input/accelerometer + disk_resource.rotational == 'True' +depends: + input/accelerometer user: root command: hdd_parking.py _description: From 46f69b2b3c272ff7e238053aedc70b29d3aa801e Mon Sep 17 00:00:00 2001 From: Fernando Bravo <39527354+fernando79513@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:46:05 +0200 Subject: [PATCH 22/26] Added udisks2 requirement (BugFix) (#1130) * Added udisks2 requirement * added also snap check for udisks2 --- providers/base/units/usb/usb.pxu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/providers/base/units/usb/usb.pxu b/providers/base/units/usb/usb.pxu index bac50f781..8978d4924 100644 --- a/providers/base/units/usb/usb.pxu +++ b/providers/base/units/usb/usb.pxu @@ -51,8 +51,10 @@ _description: Did the device work as expected? id: usb/insert -flags: also-after-suspend +flags: also-after-suspend fail-on-resource template-engine: jinja2 +requires: + package.name == 'udisks2' or snap.name == 'udisks2' _summary: USB 2.0 storage device insertion detected _purpose: Check system can detect USB 2.0 storage when inserted. From b8befd8ffff1f2dd6aee0485cf8a1c24a374f2c0 Mon Sep 17 00:00:00 2001 From: tang-mm <3333407+tang-mm@users.noreply.github.com> Date: Wed, 3 Apr 2024 23:04:18 +0800 Subject: [PATCH 23/26] add template-id fields to template units (infra) (#1137) add template-id fields to template units --- providers/base/units/audio/jobs.pxu | 6 ++++ providers/base/units/benchmarks/jobs.pxu | 2 ++ providers/base/units/bluetooth/jobs.pxu | 7 +++++ providers/base/units/camera/jobs.pxu | 7 +++++ providers/base/units/cpu/jobs.pxu | 2 ++ providers/base/units/disk/jobs.pxu | 8 +++++ providers/base/units/ethernet/jobs.pxu | 17 +++++++++++ providers/base/units/firmware/jobs.pxu | 2 ++ providers/base/units/gpio/jobs.pxu | 2 ++ providers/base/units/gpio/vendor-aaeon.pxu | 1 + providers/base/units/graphics/jobs.pxu | 26 +++++++++++++++++ providers/base/units/hibernate/jobs.pxu | 2 ++ providers/base/units/info/jobs.pxu | 1 + providers/base/units/input/jobs.pxu | 3 ++ providers/base/units/kernel-snap/jobs.pxu | 2 ++ providers/base/units/led/jobs.pxu | 3 ++ providers/base/units/led/vendor-aaeon.pxu | 2 ++ providers/base/units/mediacard/jobs.pxu | 1 + providers/base/units/miscellanea/jobs.pxu | 3 ++ .../miscellanea/snap-auto-connection.pxu | 1 + providers/base/units/mobilebroadband/jobs.pxu | 2 ++ providers/base/units/monitor/jobs.pxu | 14 +++++++++ providers/base/units/networking/ipv6.pxu | 1 + providers/base/units/networking/jobs.pxu | 1 + providers/base/units/optical/jobs.pxu | 9 ++++++ .../base/units/power-management/jobs.pxu | 1 + providers/base/units/qep/jobs.pxu | 2 ++ providers/base/units/rtc/jobs.pxu | 2 ++ providers/base/units/self/jobs.pxu | 1 + providers/base/units/serial/jobs.pxu | 1 + providers/base/units/snapd/jobs.pxu | 12 ++++++++ providers/base/units/snapd/snapd.pxu | 1 + providers/base/units/socketcan/jobs.pxu | 6 ++++ providers/base/units/stress/boot.pxu | 4 +++ providers/base/units/stress/s3s4.pxu | 6 ++++ providers/base/units/stress/stress-ng.pxu | 1 + .../units/stress/suspend_cycles_reboot.pxu | 6 ++++ .../base/units/suspend/suspend-graphics.pxu | 14 +++++++++ providers/base/units/suspend/suspend.pxu | 19 ++++++++++++ providers/base/units/touchpad/jobs.pxu | 1 + providers/base/units/touchscreen/jobs.pxu | 4 +++ providers/base/units/ubuntucore/jobs.pxu | 3 ++ providers/base/units/usb/usb.pxu | 1 + providers/base/units/wireless/jobs.pxu | 13 +++++++++ providers/base/units/wireless/nm-hotspot.pxu | 2 ++ providers/base/units/wireless/wifi-ap.pxu | 29 +++++++++++++++++++ .../wireless/wireless-connection-manual.pxu | 10 +++++++ .../wireless/wireless-connection-netplan.pxu | 9 ++++++ providers/base/units/wireless/wowlan.pxu | 6 ++++ providers/base/units/wwan/jobs.pxu | 3 ++ providers/base/units/zapper/jobs.pxu | 4 +++ providers/docker/units/docker.pxu | 19 ++++++++++++ providers/resource/jobs/resource.pxu | 1 + 53 files changed, 306 insertions(+) diff --git a/providers/base/units/audio/jobs.pxu b/providers/base/units/audio/jobs.pxu index c70e0ea79..992cc68fa 100644 --- a/providers/base/units/audio/jobs.pxu +++ b/providers/base/units/audio/jobs.pxu @@ -73,6 +73,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::audio id: audio/{index}_playback_hdmi_{product_slug} +template-id: audio/index_playback_hdmi_product_slug estimated_duration: 30.0 imports: from com.canonical.plainbox import manifest requires: @@ -109,6 +110,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::audio id: audio/{index}_playback_displayport_{product_slug} +template-id: audio/index_playback_displayport_product_slug estimated_duration: 30.0 imports: from com.canonical.plainbox import manifest requires: @@ -145,6 +147,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::audio id: audio/{index}_playback_thunderbolt_{product_slug} +template-id: audio/index_playback_thunderbolt_product_slug imports: from com.canonical.plainbox import manifest estimated_duration: 30.0 requires: @@ -181,6 +184,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::audio id: audio/{index}_playback_thunderbolt3_{product_slug} +template-id: audio/index_playback_thunderbolt3_product_slug imports: from com.canonical.plainbox import manifest estimated_duration: 30.0 requires: @@ -217,6 +221,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::audio id: audio/{index}_playback_type-c_displayport_{product_slug} +template-id: audio/index_playback_type-c_displayport_product_slug imports: from com.canonical.plainbox import manifest estimated_duration: 30.0 requires: @@ -253,6 +258,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::audio id: audio/{index}_playback_type-c_hdmi_{product_slug} +template-id: audio/index_playback_type-c_hdmi_product_slug imports: from com.canonical.plainbox import manifest estimated_duration: 30.0 requires: diff --git a/providers/base/units/benchmarks/jobs.pxu b/providers/base/units/benchmarks/jobs.pxu index 6d8afde98..0233576cf 100644 --- a/providers/base/units/benchmarks/jobs.pxu +++ b/providers/base/units/benchmarks/jobs.pxu @@ -4,6 +4,7 @@ template-filter: device.category == 'DISK' plugin: shell category_id: com.canonical.plainbox::benchmarks id: benchmarks/disk/hdparm-read_{name} +template-id: benchmarks/disk/hdparm-read_name flags: also-after-suspend estimated_duration: 15.0 user: root @@ -17,6 +18,7 @@ template-filter: device.category == 'DISK' plugin: shell category_id: com.canonical.plainbox::benchmarks id: benchmarks/disk/hdparm-cache-read_{name} +template-id: benchmarks/disk/hdparm-cache-read_name flags: also-after-suspend estimated_duration: 10.0 user: root diff --git a/providers/base/units/bluetooth/jobs.pxu b/providers/base/units/bluetooth/jobs.pxu index 5dc06b026..148e8bb04 100644 --- a/providers/base/units/bluetooth/jobs.pxu +++ b/providers/base/units/bluetooth/jobs.pxu @@ -248,6 +248,7 @@ template-filter: device.category == 'BLUETOOTH' template-engine: jinja2 template-unit: job id: bluetooth4/beacon_notification_{{ path }} +template-id: bluetooth4/beacon_notification_path _summary: Test system can get beacon notifications on the {{ path.split('/')[-1] }} adapter environ: ADV_SVC_UUID SVC_UUID MSRMT_UUID command: @@ -267,6 +268,7 @@ template-resource: device template-filter: device.category == 'BLUETOOTH' template-unit: job id: bluetooth4/beacon_eddystone_url_{interface} +template-id: bluetooth4/beacon_eddystone_url_interface _summary: Test system can get beacon EddyStone URL advertisements on the {interface} adapter command: checkbox-support-eddystone_scanner -D {interface} @@ -280,6 +282,7 @@ unit: template template-resource: bluez-internal-rfcomm-tests template-unit: job id: bluetooth/bluez-internal-rfcomm-tests_{bluez-internal-rfcomm-test} +template-id: bluetooth/bluez-internal-rfcomm-tests_bluez-internal-rfcomm-test category_id: bluetooth_bluez5_selftests _summary: BlueZ-{bluez-internal-rfcomm-test} _description: @@ -296,6 +299,7 @@ unit: template template-resource: bluez-internal-hci-tests template-unit: job id: bluetooth/bluez-internal-hci-tests_{bluez-internal-hci-test} +template-id: bluetooth/bluez-internal-hci-tests_bluez-internal-hci-test category_id: bluetooth_bluez5_selftests _summary: BlueZ-{bluez-internal-hci-test} _description: @@ -312,6 +316,7 @@ unit: template template-resource: bluez-internal-mgmt-tests template-unit: job id: bluetooth/bluez-internal-mgmt-tests_{bluez-internal-mgmt-test} +template-id: bluetooth/bluez-internal-mgmt-tests_bluez-internal-mgmt-test category_id: bluetooth_bluez5_selftests _summary: BlueZ-{bluez-internal-mgmt-test} _description: @@ -328,6 +333,7 @@ unit: template template-resource: bluez-internal-uc-tests template-unit: job id: bluetooth/bluez-internal-uc-tests_{bluez-internal-uc-test} +template-id: bluetooth/bluez-internal-uc-tests_bluez-internal-uc-test category_id: bluetooth_bluez5_selftests _summary: BlueZ-{bluez-internal-uc-test} _description: @@ -344,6 +350,7 @@ unit: template template-resource: bluez-internal-bnep-tests template-unit: job id: bluetooth/bluez-internal-bnep-tests_{bluez-internal-bnep-test} +template-id: bluetooth/bluez-internal-bnep-tests_bluez-internal-bnep-test category_id: bluetooth_bluez5_selftests _summary: BlueZ-{bluez-internal-bnep-test} _description: diff --git a/providers/base/units/camera/jobs.pxu b/providers/base/units/camera/jobs.pxu index a247450ed..dd9c923a6 100644 --- a/providers/base/units/camera/jobs.pxu +++ b/providers/base/units/camera/jobs.pxu @@ -29,6 +29,7 @@ template-unit: job plugin: user-interact-verify category_id: com.canonical.plainbox::camera id: camera/display_{name} +template-id: camera/display_name flags: also-after-suspend _summary: Webcam video display test for {product_slug} estimated_duration: 120.0 @@ -50,6 +51,7 @@ template-unit: job plugin: user-interact-verify category_id: com.canonical.plainbox::camera id: camera/led_{name} +template-id: camera/led_name _summary: Webcam LED test for {product_slug} estimated_duration: 120.0 depends: camera/detect @@ -72,6 +74,7 @@ template-unit: job plugin: user-interact-verify category_id: com.canonical.plainbox::camera id: camera/still_{name} +template-id: camera/still_name flags: also-after-suspend _summary: Webcam still image capture test for {product_slug} estimated_duration: 120.0 @@ -93,6 +96,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::camera id: camera/multiple-resolution-images_{name} +template-id: camera/multiple-resolution-images_name flags: also-after-suspend _summary: Webcam multiple resolution capture test for {product_slug} estimated_duration: 1.2 @@ -110,6 +114,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::camera id: camera/camera-quality_{name} +template-id: camera/camera-quality_name flags: also-after-suspend _summary: Webcam brisque score for {product_slug} estimated_duration: 20s @@ -145,6 +150,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::camera id: camera/multiple-resolution-images-rpi_{name} +template-id: camera/multiple-resolution-images-rpi_name _summary: Webcam multiple resolution capture test for Pi Camera estimated_duration: 16.0 depends: camera/detect-rpi @@ -164,6 +170,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::camera id: camera/roundtrip-qrcode_{{ name }} +template-id: camera/roundtrip-qrcode_name _summary: Test video output and camera {{ name }} by displaying and reading a qrcode estimated_duration: 5.0 depends: diff --git a/providers/base/units/cpu/jobs.pxu b/providers/base/units/cpu/jobs.pxu index 6e560970c..5148020eb 100644 --- a/providers/base/units/cpu/jobs.pxu +++ b/providers/base/units/cpu/jobs.pxu @@ -177,6 +177,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::cpu id: cpu/armhf_vfp_support_{platform} +template-id: cpu/armhf_vfp_support_platform estimated_duration: 1.0 user: root command: @@ -193,6 +194,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::cpu id: cpu/arm64_vfp_support_{platform} +template-id: cpu/arm64_vfp_support_platform estimated_duration: 1.0 user: root command: diff --git a/providers/base/units/disk/jobs.pxu b/providers/base/units/disk/jobs.pxu index cfa265d30..61dac7cc2 100644 --- a/providers/base/units/disk/jobs.pxu +++ b/providers/base/units/disk/jobs.pxu @@ -27,6 +27,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::disk id: disk/stats_{name} +template-id: disk/stats_name flags: deprecated also-after-suspend user: root estimated_duration: 10.0 @@ -49,6 +50,7 @@ template-filter: device.category == 'DISK' plugin: shell category_id: com.canonical.plainbox::disk id: disk/smart_{name} +template-id: disk/smart_name estimated_duration: 180.0 requires: executable.name == 'smartctl' @@ -66,6 +68,7 @@ template-filter: device.category == 'DISK' plugin: shell category_id: com.canonical.plainbox::disk id: disk/read_performance_{name} +template-id: disk/read_performance_name flags: also-after-suspend estimated_duration: 65.0 requires: @@ -81,6 +84,7 @@ template-filter: device.category == 'DISK' plugin: shell category_id: com.canonical.plainbox::disk id: disk/storage_device_{name} +template-id: disk/storage_device_name flags: also-after-suspend estimated_duration: 375.0 user: root @@ -95,6 +99,7 @@ template-filter: device.category == 'DISK' plugin: shell category_id: com.canonical.plainbox::disk id: disk/fstrim_{name} +template-id: disk/fstrim_name estimated_duration: 1.0 user: root requires: @@ -109,6 +114,7 @@ template-filter: device.category == 'DISK' plugin: shell category_id: com.canonical.plainbox::disk id: disk/disk_stress_ng_{name} +template-id: disk/disk_stress_ng_name estimated_duration: 4560.0 user: root requires: @@ -132,6 +138,7 @@ template-filter: device.category == 'DISK' plugin: shell category_id: com.canonical.plainbox::disk id: disk/disk_cpu_load_{name} +template-id: disk/disk_cpu_load_name estimated_duration: 15 user: root requires: @@ -171,6 +178,7 @@ template-filter: device.driver == 'nvme' and device.category == 'OTHER' plugin: shell category_id: com.canonical.plainbox::disk id: disk/apste_support_on_{name} +template-id: disk/apste_support_on_name flags: also-after-suspend estimated_duration: 1.0 user: root diff --git a/providers/base/units/ethernet/jobs.pxu b/providers/base/units/ethernet/jobs.pxu index ec15fbc5e..afe391ab9 100644 --- a/providers/base/units/ethernet/jobs.pxu +++ b/providers/base/units/ethernet/jobs.pxu @@ -60,6 +60,7 @@ template-filter: device.category == 'NETWORK' plugin: shell category_id: com.canonical.plainbox::ethernet id: ethernet/multi_nic_device{__index__}_{interface} +template-id: ethernet/multi_nic_device__index___interface _summary: Multi-NIC Iperf stress testing for NIC {interface} estimated_duration: 7400.0 requires: @@ -79,6 +80,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' plugin: shell category_id: com.canonical.plainbox::ethernet id: ethernet/multi_iperf3_nic_device{__index__}_{interface} +template-id: ethernet/multi_iperf3_nic_device__index___interface _summary: Multi-NIC Iperf3 stress testing for NIC {interface} estimated_duration: 7400.0 requires: @@ -98,6 +100,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' plugin: shell category_id: com.canonical.plainbox::ethernet id: ethernet/sru_iperf3_stress_device-{__index__}_{interface} +template-id: ethernet/sru_iperf3_stress_device-__index___interface _summary: Multi-NIC Iperf3 SRU testing for NIC {interface} estimated_duration: 1200.0 requires: @@ -118,6 +121,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' plugin: shell category_id: com.canonical.plainbox::ethernet id: ethernet/multi_iperf3_nic_underspeed_device{__index__}_{interface} +template-id: ethernet/multi_iperf3_nic_underspeed_device__index___interface _summary: Underspeed Enabled Multi-NIC Iperf3 stress testing for NIC {interface} estimated_duration: 7400.0 requires: @@ -137,6 +141,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' plugin: shell category_id: com.canonical.plainbox::ethernet id: ethernet/ethertool_check_device{__index__}_{interface} +template-id: ethernet/ethertool_check_device__index___interface _summary: ethtool check for NIC {interface} estimated_duration: 330.0 requires: @@ -152,6 +157,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' plugin: shell category_id: com.canonical.plainbox::ethernet id: ethernet/ethertool_eee_check_device_{interface} +template-id: ethernet/ethertool_eee_check_device_interface _summary: Check ethtool EEE status for NIC {interface} estimated_duration: 330.0 requires: @@ -167,6 +173,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' plugin: user-interact-verify category_id: com.canonical.plainbox::ethernet id: ethernet/maximum_bandwidth_device{__index__}_{interface} +template-id: ethernet/maximum_bandwidth_device__index___interface _summary: Maximum bandwidth test of device {__index__} ({interface}) estimated_duration: 330.0 requires: @@ -190,6 +197,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' plugin: shell category_id: com.canonical.plainbox::ethernet id: ethernet/stress_performance_device{__index__}_{interface} +template-id: ethernet/stress_performance_device__index___interface _summary: Stress and performance test of ethernet device {__index__} ({interface}) estimated_duration: 330.0 requires: @@ -202,6 +210,7 @@ unit: template template-resource: device template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' id: ethernet/ping_{interface} +template-id: ethernet/ping_interface _summary: Can ping another machine over Ethernet port {interface} _description: Check Ethernet works by pinging another machine plugin: shell @@ -230,6 +239,7 @@ unit: template template-resource: device template-filter: device.category == 'NETWORK' and device.mac != 'UNKNOWN' id: ethernet/wol_S5_{interface} +template-id: ethernet/wol_S5_interface _summary: Wake on LAN (WOL) test from S5 - {interface} _purpose: Check that another system can wake up from S5 the SUT using ethernet port {interface} WOL function. @@ -254,6 +264,7 @@ unit: template template-resource: device template-filter: device.category == 'NETWORK' and device.mac != 'UNKNOWN' id: ethernet/wol_S4_{interface} +template-id: ethernet/wol_S4_interface _summary: Wake on LAN (WOL) test from S4 - {interface} _purpose: Check that another system can wake up from S4 the SUT using ethernet port {interface} WOL function. @@ -279,6 +290,7 @@ unit: template template-resource: device template-filter: device.category == 'NETWORK' and device.mac != 'UNKNOWN' and device.interface != 'UNKNOWN' id: ethernet/wol_S3_{interface} +template-id: ethernet/wol_S3_interface _summary: Wake on LAN (WOL) test from S3 - {interface} _purpose: Check that another system can wake up from S3 the SUT using ethernet port {interface} WOL function. @@ -305,6 +317,7 @@ template-resource: device template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' template-engine: jinja2 id: ethernet/hotplug-{{ interface }} +template-id: ethernet/hotplug-interface _summary: Ensure hotplugging works on port {{ interface }} _purpose: Check that hotplugging works on port {{ interface }} @@ -324,6 +337,7 @@ template-resource: device template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' template-unit: job id: ethernet/iperf3_{interface} +template-id: ethernet/iperf3_interface plugin: shell _summary: Iperf3 stress testing for {interface} category_id: com.canonical.plainbox::ethernet @@ -342,6 +356,7 @@ template-resource: device template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' template-unit: job id: ethernet/iperf3_reverse_{interface} +template-id: ethernet/iperf3_reverse_interface plugin: shell _summary: Iperf3 stress testing for {interface} (reverse) category_id: com.canonical.plainbox::ethernet @@ -361,6 +376,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: ethernet/check-{{ interface }}-static-configuration +template-id: ethernet/check-interface-static-configuration _summary: Check that {{ interface }} has a static configuration _description: This job is intended to be used on particular devices where an interface has @@ -387,6 +403,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: ethernet/check-{{ interface }}-static-configuration-np +template-id: ethernet/check-interface-static-configuration-np _summary: Check that {{ interface }} has a static configuration _description: This job is intended to be used on particular devices where an interface has diff --git a/providers/base/units/firmware/jobs.pxu b/providers/base/units/firmware/jobs.pxu index e03648d69..88b5d3b07 100644 --- a/providers/base/units/firmware/jobs.pxu +++ b/providers/base/units/firmware/jobs.pxu @@ -3,6 +3,7 @@ template-resource: fwts plugin: shell category_id: com.canonical.plainbox::firmware id: firmware/fwts_{name} +template-id: firmware/fwts_name estimated_duration: 1.2 requires: executable.name == 'fwts' user: root @@ -15,6 +16,7 @@ template-resource: fwts plugin: attachment category_id: com.canonical.plainbox::firmware id: firmware/fwts_{name}.log +template-id: firmware/fwts_name.log estimated_duration: 1.2 requires: executable.name == 'fwts' user: root diff --git a/providers/base/units/gpio/jobs.pxu b/providers/base/units/gpio/jobs.pxu index 07def1e39..17a5c8f7f 100644 --- a/providers/base/units/gpio/jobs.pxu +++ b/providers/base/units/gpio/jobs.pxu @@ -6,6 +6,7 @@ template-resource: com.canonical.certification::model_assertion template-filter: model_assertion.model in ("pi2", "pi3", "ubuntu-core-18-pi2", "ubuntu-core-18-pi3") template-unit: job id: gpio/sysfs_loopback_pairs_{model} +template-id: gpio/sysfs_loopback_pairs_model _summary: Test GPIO lines exposed on headers can be controlled via sysfs plugin: shell user: root @@ -25,6 +26,7 @@ template-resource: com.canonical.certification::model_assertion template-filter: model_assertion.model in ("pi2", "pi3", "ubuntu-core-18-pi2", "ubuntu-core-18-pi3") template-unit: job id: gpio/gpiomem_loopback_pairs_{model} +template-id: gpio/gpiomem_loopback_pairs_model _summary: Test GPIO lines exposed on headers can be controlled via /dev/gpiomem plugin: shell user: root diff --git a/providers/base/units/gpio/vendor-aaeon.pxu b/providers/base/units/gpio/vendor-aaeon.pxu index cdf5f2d60..2e8970ea3 100644 --- a/providers/base/units/gpio/vendor-aaeon.pxu +++ b/providers/base/units/gpio/vendor-aaeon.pxu @@ -4,6 +4,7 @@ template-resource: dmi template-filter: dmi.category == 'SYSTEM' and dmi.vendor == 'AAEON' and dmi.product in ('UPX-TGL01', 'UPN-EHL01') template-unit: job id: gpio/sysfs_loopback_pairs_{vendor}_{product} +template-id: gpio/sysfs_loopback_pairs_vendor_product _summary: Test GPIO lines exposed on headers can be controlled via sysfs plugin: shell user: root diff --git a/providers/base/units/graphics/jobs.pxu b/providers/base/units/graphics/jobs.pxu index 1ded351b2..a3677c3b6 100644 --- a/providers/base/units/graphics/jobs.pxu +++ b/providers/base/units/graphics/jobs.pxu @@ -4,6 +4,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/{index}_driver_version_{product_slug} +template-id: graphics/index_driver_version_product_slug flags: also-after-suspend command: # shellcheck disable=SC1091 @@ -44,6 +45,7 @@ template-resource: graphics_card plugin: manual category_id: com.canonical.plainbox::graphics id: graphics/{index}_resolution-change_{product_slug} +template-id: graphics/index_resolution-change_product_slug _summary: Test changing resolution for {vendor} {product} _description: PURPOSE: @@ -72,6 +74,7 @@ template-resource: graphics_card plugin: user-interact-verify category_id: com.canonical.plainbox::graphics id: graphics/{index}_resolution_{product_slug} +template-id: graphics/index_resolution_product_slug requires: device.category == 'VIDEO' command: resolution_test.py @@ -91,6 +94,7 @@ template-resource: graphics_card plugin: user-interact-verify category_id: com.canonical.plainbox::graphics id: graphics/{index}_screen_resolution_{product_slug} +template-id: graphics/index_screen_resolution_product_slug requires: device.category == 'VIDEO' executable.name == 'qmlscene' @@ -111,6 +115,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/{index}_minimum_resolution_{product_slug} +template-id: graphics/index_minimum_resolution_product_slug flags: also-after-suspend requires: device.category == 'VIDEO' @@ -129,6 +134,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: graphics/{index}_maximum_resolution_{product_slug} +template-id: graphics/index_maximum_resolution_product_slug flags: also-after-suspend plugin: user-interact-verify category_id: com.canonical.plainbox::graphics @@ -151,6 +157,7 @@ _description: unit: template template-resource: graphics_card id: graphics/{index}_color_depth_{product_slug} +template-id: graphics/index_color_depth_product_slug plugin: shell category_id: com.canonical.plainbox::graphics command: color_depth_info.py @@ -161,6 +168,7 @@ _summary: Test color depth info for {vendor} {product} unit: template template-resource: graphics_card id: graphics/{index}_fresh_rate_{product_slug} +template-id: graphics/index_fresh_rate_product_slug plugin: shell category_id: com.canonical.plainbox::graphics command: fresh_rate_info.py @@ -170,6 +178,7 @@ _summary: Test refresh rate for {vendor} {product} unit: template template-resource: graphics_card id: graphics/{index}_graphic_memory_{product_slug} +template-id: graphics/index_graphic_memory_product_slug plugin: shell category_id: com.canonical.plainbox::graphics command: graphic_memory_info.py @@ -179,6 +188,7 @@ _summary: Test graphic memory info for {vendor} {product}. unit: template template-resource: graphics_card id: graphics/{index}_video_{product_slug} +template-id: graphics/index_video_product_slug flags: also-after-suspend plugin: user-interact-verify category_id: com.canonical.plainbox::graphics @@ -213,6 +223,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::graphics id: graphics/{index}_cycle_resolution_{product_slug} +template-id: graphics/index_cycle_resolution_product_slug flags: also-after-suspend requires: package.name == 'xorg' depends: graphics/VESA_drivers_not_in_use @@ -241,6 +252,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::graphics id: graphics/{index}_rotation_{product_slug} +template-id: graphics/index_rotation_product_slug flags: also-after-suspend command: # shellcheck disable=SC1091 @@ -263,6 +275,7 @@ template-resource: graphics_card plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/{index}_gl_support_{product_slug} +template-id: graphics/index_gl_support_product_slug flags: also-after-suspend command: "$CHECKBOX_RUNTIME"/usr/lib/nux/unity_support_test -p 2>&1 | sed -e "s/\x1b\[[0-9;]*m//g" @@ -278,6 +291,7 @@ template-filter: graphics_card.driver in ['nvidia', 'pcieport', 'amdgpu', 'amdgp plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/{index}_valid_opengl_renderer_{product_slug} +template-id: graphics/index_valid_opengl_renderer_product_slug requires: executable.name == 'glxinfo' command: # shellcheck disable=SC1091 @@ -295,6 +309,7 @@ template-resource: graphics_card plugin: user-interact-verify category_id: com.canonical.plainbox::graphics id: graphics/{index}_glxgears_{product_slug} +template-id: graphics/index_glxgears_product_slug flags: also-after-suspend requires: executable.name == 'glxgears' command: @@ -318,6 +333,7 @@ template-resource: graphics_card plugin: user-interact-verify category_id: com.canonical.plainbox::graphics id: graphics/{index}_glxgears_fullscreen_{product_slug} +template-id: graphics/index_glxgears_fullscreen_product_slug flags: also-after-suspend requires: executable.name == 'glxgears' command: @@ -341,6 +357,7 @@ template-resource: graphics_card plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/{index}_3d_window_open_close_{product_slug} +template-id: graphics/index_3d_window_open_close_product_slug requires: executable.name == 'glxgears' command: window_test.py -t open-close -i 10 estimated_duration: 60.525 @@ -352,6 +369,7 @@ template-resource: graphics_card plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/{index}_3d_window_suspend_resume_{product_slug} +template-id: graphics/index_3d_window_suspend_resume_product_slug requires: executable.name == 'glxgears' command: window_test.py -t suspend-resume -i 10 estimated_duration: 121.00 @@ -363,6 +381,7 @@ template-resource: graphics_card plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/{index}_multi_3d_windows_open_close_{product_slug} +template-id: graphics/index_multi_3d_windows_open_close_product_slug requires: executable.name == 'glxgears' command: window_test.py -t open-close-multi -i 10 -w 4 estimated_duration: 60.000 @@ -374,6 +393,7 @@ template-resource: graphics_card plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/{index}_3d_window_move_{product_slug} +template-id: graphics/index_3d_window_move_product_slug requires: executable.name == 'glxgears' executable.name == 'wmctrl' @@ -387,6 +407,7 @@ template-resource: graphics_card plugin: manual category_id: com.canonical.plainbox::graphics id: graphics/{index}_switch_card_{product_slug} +template-id: graphics/index_switch_card_product_slug _summary: Test GPU switching for {vendor} {product} _description: _purpose: @@ -406,6 +427,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: manual category_id: com.canonical.plainbox::graphics id: graphics/{index}_switch_card_{product_slug}_xenial +template-id: graphics/index_switch_card_product_slug_xenial requires: graphics_card.driver in ['nouveau', 'nvidia', 'amdgpu-pro', 'pcieport'] lsb.codename == 'xenial' @@ -449,6 +471,7 @@ template-resource: graphics_card plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/{index}_screen-capture-internal_{product_slug} +template-id: graphics/index_screen-capture-internal_product_slug _summary: Obtains a simple screen capture of {vendor} {product} estimated_duration: 1.0 requires: package.name == 'gnome-screenshot' @@ -460,6 +483,7 @@ template-resource: graphics_card plugin: attachment category_id: com.canonical.plainbox::graphics id: graphics/{index}_screen-capture-internal_{product_slug}.png +template-id: graphics/index_screen-capture-internal_product_slug.png depends: graphics/{index}_screen-capture-internal_{product_slug} _summary: Attaches a simple screen capture of {vendor} {product} estimated_duration: 1.0 @@ -470,6 +494,7 @@ unit: template template-resource: graphics_card category_id: com.canonical.plainbox::graphics id: graphics/{index}_auto_switch_card_{product_slug} +template-id: graphics/index_auto_switch_card_product_slug requires: graphics_card.driver in ['nvidia', 'amdgpu-pro', 'pcieport'] graphics_card.driver != 'amdgpu-pro' and lsb.release < '22.04' @@ -500,6 +525,7 @@ template-resource: graphics_card plugin: user-interact-verify category_id: com.canonical.plainbox::graphics id: graphics/{index}_glmark2-es2_{product_slug} +template-id: graphics/index_glmark2-es2_product_slug requires: executable.name == 'glmark2-es2' 'classic' in environment.SNAP_NAME diff --git a/providers/base/units/hibernate/jobs.pxu b/providers/base/units/hibernate/jobs.pxu index 3aedfe19f..a1c7c1edc 100644 --- a/providers/base/units/hibernate/jobs.pxu +++ b/providers/base/units/hibernate/jobs.pxu @@ -48,6 +48,7 @@ requires: plugin: user-interact-verify category_id: com.canonical.plainbox::hibernate id: power-management/{index}_hibernate_advanced_{vendor_slug}_{product_slug} +template-id: power-management/index_hibernate_advanced_vendor_slug_product_slug user: root environ: PLAINBOX_SESSION_SHARE estimated_duration: 300.00 @@ -90,6 +91,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: attachment category_id: com.canonical.plainbox::hibernate id: power-management/{index}_hibernate-single-log-attach_{product_slug} +template-id: power-management/index_hibernate-single-log-attach_product_slug depends: power-management/{index}_hibernate_advanced_{vendor_slug}_{product_slug} estimated_duration: 0.5 command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_hibernate-single.log ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_hibernate-single.log diff --git a/providers/base/units/info/jobs.pxu b/providers/base/units/info/jobs.pxu index 730a25734..44ff2997a 100644 --- a/providers/base/units/info/jobs.pxu +++ b/providers/base/units/info/jobs.pxu @@ -255,6 +255,7 @@ template-filter: device.category == 'DISK' plugin: attachment category_id: com.canonical.plainbox::info id: info/hdparm_{name}.txt +template-id: info/hdparm_name.txt estimated_duration: 1.0 requires: executable.name == 'hdparm' diff --git a/providers/base/units/input/jobs.pxu b/providers/base/units/input/jobs.pxu index 7232b547c..40622448f 100644 --- a/providers/base/units/input/jobs.pxu +++ b/providers/base/units/input/jobs.pxu @@ -4,6 +4,7 @@ template-filter: device.category == 'MOUSE' or device.category == 'TOUCHPAD' or plugin: manual category_id: com.canonical.plainbox::input id: input/pointing_{product_slug}_{category}_{__index__} +template-id: input/pointing_product_slug_category___index__ flags: also-after-suspend estimated_duration: 30.0 _summary: Check pointing functionality for {product} @@ -67,6 +68,7 @@ template-filter: device.category == 'MOUSE' or device.category == 'TOUCHPAD' plugin: manual category_id: com.canonical.plainbox::input id: input/clicking_{product_slug}_{category}_{__index__} +template-id: input/clicking_product_slug_category___index__ estimated_duration: 30.0 _summary: Check button functionality for {product} _purpose: @@ -86,6 +88,7 @@ plugin: shell category_id: com.canonical.plainbox::input estimated_duration: 2 id: input/fixed_screen_orientation_on_{product}_{__index__} +template-id: input/fixed_screen_orientation_on_product___index__ flags: also-after-suspend user: root requires: diff --git a/providers/base/units/kernel-snap/jobs.pxu b/providers/base/units/kernel-snap/jobs.pxu index b03d6a8d0..3313c4e8f 100644 --- a/providers/base/units/kernel-snap/jobs.pxu +++ b/providers/base/units/kernel-snap/jobs.pxu @@ -18,6 +18,7 @@ unit: template template-resource: bootloader template-filter: bootloader.booted_kernel_path != 'unknown' id: kernel-snap/booted-kernel-matches-current-{name} +template-id: kernel-snap/booted-kernel-matches-current-name category_id: kernel-snap _summary: The booted kernel image matches image in current kernel snap _description: @@ -38,6 +39,7 @@ unit: template template-resource: bootloader template-filter: bootloader.name == 'uboot' id: kernel-snap/booted-dtbs-match-current-{name} +template-id: kernel-snap/booted-dtbs-match-current-name requires: lsb.description == 'Ubuntu Core 18' snap.name == 'snapd' and int(snap.revision) >= 11841 diff --git a/providers/base/units/led/jobs.pxu b/providers/base/units/led/jobs.pxu index 1ede08616..626a1b002 100644 --- a/providers/base/units/led/jobs.pxu +++ b/providers/base/units/led/jobs.pxu @@ -289,6 +289,7 @@ template-resource: led-indicator/gpio-leds template-unit: job category_id: led id: led-indicator/gpio-leds-{name} +template-id: led-indicator/gpio-leds-name estimated_duration: 10 plugin: user-interact-verify user: root @@ -332,6 +333,7 @@ unit: template template-resource: led-indicator/sysfs-leds template-unit: job id: led-indicator/sysfs-leds-{name} +template-id: led-indicator/sysfs-leds-name category_id: led _summary: Check control of {name} LED. _description: @@ -367,6 +369,7 @@ template-resource: led-indicator/gpio-controller-leds template-unit: job category_id: led id: led-indicator/gpio-controller-leds-{name} +template-id: led-indicator/gpio-controller-leds-name estimated_duration: 10 plugin: user-interact-verify user: root diff --git a/providers/base/units/led/vendor-aaeon.pxu b/providers/base/units/led/vendor-aaeon.pxu index d4ed7cd7f..2d9cb9596 100644 --- a/providers/base/units/led/vendor-aaeon.pxu +++ b/providers/base/units/led/vendor-aaeon.pxu @@ -4,6 +4,7 @@ template-resource: dmi template-filter: dmi.category == 'SYSTEM' and dmi.vendor == 'AAEON' and dmi.product in ('UPX-TGL01') template-unit: job id: led/sysfs_led_brightness_on_{vendor}_{product} +template-id: led/sysfs_led_brightness_on_vendor_product plugin: user-interact-verify category_id: led estimated_duration: 30.0 @@ -23,6 +24,7 @@ template-resource: dmi template-filter: dmi.category == 'SYSTEM' and dmi.vendor == 'AAEON' and dmi.product in ('UPX-TGL01') template-unit: job id: led/sysfs_led_brightness_off_{vendor}_{product} +template-id: led/sysfs_led_brightness_off_vendor_product plugin: user-interact-verify category_id: led estimated_duration: 30.0 diff --git a/providers/base/units/mediacard/jobs.pxu b/providers/base/units/mediacard/jobs.pxu index 89cc7382f..586d12a5d 100644 --- a/providers/base/units/mediacard/jobs.pxu +++ b/providers/base/units/mediacard/jobs.pxu @@ -586,6 +586,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::mediacard id: mediacard/storage-preinserted-{symlink_uuid} +template-id: mediacard/storage-preinserted-symlink_uuid user: root estimated_duration: 45.0 flags: also-after-suspend reset-locale diff --git a/providers/base/units/miscellanea/jobs.pxu b/providers/base/units/miscellanea/jobs.pxu index 8f8c8bafa..d381bae32 100644 --- a/providers/base/units/miscellanea/jobs.pxu +++ b/providers/base/units/miscellanea/jobs.pxu @@ -156,6 +156,7 @@ template-unit: job requires: executable.name == 'dumpimage' or executable.name == 'mokutil' id: miscellanea/secure_boot_mode_{gadget} +template-id: miscellanea/secure_boot_mode_gadget _summary: Test that {gadget} Ubuntu Core system booted with Secure Boot active _description: Test to verify that the system booted with Secure Boot active. @@ -284,6 +285,7 @@ template-filter: device.category == 'NETWORK' plugin: manual category_id: com.canonical.plainbox::miscellanea id: miscellanea/pxe_boot_device{__index__}_{interface} +template-id: miscellanea/pxe_boot_device__index___interface _summary: PXE verification test of device {__index__} ({interface}) estimated_duration: 30.0 _purpose: @@ -302,6 +304,7 @@ template-filter: device.category == 'NETWORK' plugin: manual category_id: com.canonical.plainbox::miscellanea id: miscellanea/remote_shared_ipmi_device{__index__}_{interface} +template-id: miscellanea/remote_shared_ipmi_device__index___interface _summary: Remote Shared IPMI verification test for device {__index__} ({interface}) estimated_duration: 30.0 _purpose: diff --git a/providers/base/units/miscellanea/snap-auto-connection.pxu b/providers/base/units/miscellanea/snap-auto-connection.pxu index 1dee3f3f6..7e1d2dc0d 100644 --- a/providers/base/units/miscellanea/snap-auto-connection.pxu +++ b/providers/base/units/miscellanea/snap-auto-connection.pxu @@ -7,6 +7,7 @@ template-engine: jinja2 template-resource: interface template-filter: interface.type == 'plug' id: miscellanea/check-plug_{{ snap }}_{{ name }} +template-id: miscellanea/check-plug_snap_name _summary: Ensure the {{ snap }} snap's {{ name }} plug is connected plugin: shell command: diff --git a/providers/base/units/mobilebroadband/jobs.pxu b/providers/base/units/mobilebroadband/jobs.pxu index 5a0f8cbec..cad244e82 100644 --- a/providers/base/units/mobilebroadband/jobs.pxu +++ b/providers/base/units/mobilebroadband/jobs.pxu @@ -67,6 +67,7 @@ template-filter: device.category == 'NETWORK' plugin: user-interact-verify category_id: com.canonical.plainbox::mobilebroadband id: mobilebroadband/maximum_bandwidth_gsm_device{__index__}_{interface} +template-id: mobilebroadband/maximum_bandwidth_gsm_device__index___interface depends: mobilebroadband/gsm_connection estimated_duration: 330.0 requires: @@ -90,6 +91,7 @@ template-filter: device.category == 'NETWORK' plugin: user-interact-verify category_id: com.canonical.plainbox::mobilebroadband id: mobilebroadband/maximum_bandwidth_cdma_device{__index__}_{interface} +template-id: mobilebroadband/maximum_bandwidth_cdma_device__index___interface depends: mobilebroadband/cdma_connection estimated_duration: 330.0 requires: diff --git a/providers/base/units/monitor/jobs.pxu b/providers/base/units/monitor/jobs.pxu index d98223786..50ceed39d 100644 --- a/providers/base/units/monitor/jobs.pxu +++ b/providers/base/units/monitor/jobs.pxu @@ -2,6 +2,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_vga_{product_slug} +template-id: monitor/index_vga_product_slug imports: from com.canonical.plainbox import manifest requires: manifest.has_vga == 'True' flags: also-after-suspend @@ -21,6 +22,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_dvi_{product_slug} +template-id: monitor/index_dvi_product_slug imports: from com.canonical.plainbox import manifest requires: manifest.has_dvi == 'True' flags: also-after-suspend @@ -40,6 +42,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_displayport_{product_slug} +template-id: monitor/index_displayport_product_slug imports: from com.canonical.plainbox import manifest requires: manifest.has_dp == 'True' flags: also-after-suspend @@ -59,6 +62,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_hdmi_{product_slug} +template-id: monitor/index_hdmi_product_slug imports: from com.canonical.plainbox import manifest requires: manifest.has_hdmi == 'True' flags: also-after-suspend @@ -78,6 +82,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_svideo_{product_slug} +template-id: monitor/index_svideo_product_slug plugin: manual category_id: com.canonical.plainbox::monitor _purpose: @@ -95,6 +100,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_rca_{product_slug} +template-id: monitor/index_rca_product_slug plugin: manual category_id: com.canonical.plainbox::monitor _purpose: @@ -112,6 +118,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_multi-head_{product_slug} +template-id: monitor/index_multi-head_product_slug requires: dmi.product in ['Desktop','Low Profile Desktop','Tower','Mini Tower', 'Space-saving', 'Mini PC'] flags: also-after-suspend plugin: manual @@ -132,6 +139,7 @@ template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' flags: also-after-suspend id: monitor/{index}_powersaving_{product_slug} +template-id: monitor/index_powersaving_product_slug plugin: user-interact-verify category_id: com.canonical.plainbox::monitor command: @@ -149,6 +157,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_dim_brightness_{product_slug} +template-id: monitor/index_dim_brightness_product_slug requires: dmi.product in ['Notebook','Laptop','Portable','All In One','All-In-One','AIO','Convertible'] plugin: user-interact-verify category_id: com.canonical.plainbox::monitor @@ -169,6 +178,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_thunderbolt_{product_slug} +template-id: monitor/index_thunderbolt_product_slug imports: from com.canonical.plainbox import manifest requires: manifest.has_thunderbolt == 'True' flags: also-after-suspend @@ -191,6 +201,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: monitor/{index}_thunderbolt3_{product_slug} +template-id: monitor/index_thunderbolt3_product_slug imports: from com.canonical.plainbox import manifest requires: manifest.has_thunderbolt3 == 'True' flags: also-after-suspend @@ -212,6 +223,7 @@ _verification: unit: template template-resource: graphics_card id: monitor/{index}_type-c_displayport_{product_slug} +template-id: monitor/index_type-c_displayport_product_slug template-filter: graphics_card.prime_gpu_offload == 'Off' imports: from com.canonical.plainbox import manifest requires: @@ -235,6 +247,7 @@ _verification: unit: template template-resource: graphics_card id: monitor/{index}_type-c_hdmi_{product_slug} +template-id: monitor/index_type-c_hdmi_product_slug template-filter: graphics_card.prime_gpu_offload == 'Off' imports: from com.canonical.plainbox import manifest requires: @@ -258,6 +271,7 @@ _verification: unit: template template-resource: graphics_card id: monitor/{index}_type-c_vga_{product_slug} +template-id: monitor/index_type-c_vga_product_slug template-filter: graphics_card.prime_gpu_offload == 'Off' imports: from com.canonical.plainbox import manifest requires: diff --git a/providers/base/units/networking/ipv6.pxu b/providers/base/units/networking/ipv6.pxu index 69c3ba1c1..d19f1029d 100644 --- a/providers/base/units/networking/ipv6.pxu +++ b/providers/base/units/networking/ipv6.pxu @@ -18,6 +18,7 @@ template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' template-unit: job depends: ipv6_detect id: ipv6_link_local_address_{interface} +template-id: ipv6_link_local_address_interface _summary: Test that {interface} has an IPv6 link local address plugin: shell category_id: com.canonical.plainbox::networking diff --git a/providers/base/units/networking/jobs.pxu b/providers/base/units/networking/jobs.pxu index 30ea187b9..b7cf8fdad 100644 --- a/providers/base/units/networking/jobs.pxu +++ b/providers/base/units/networking/jobs.pxu @@ -14,6 +14,7 @@ template-filter: device.category == 'NETWORK' plugin: user-interact-verify category_id: com.canonical.plainbox::networking id: networking/info_device{__index__}_{interface} +template-id: networking/info_device__index___interface flags: also-after-suspend _summary: Network Information of device {__index__} ({interface}) estimated_duration: 1.0 diff --git a/providers/base/units/optical/jobs.pxu b/providers/base/units/optical/jobs.pxu index e38a9989e..0c9b4e993 100644 --- a/providers/base/units/optical/jobs.pxu +++ b/providers/base/units/optical/jobs.pxu @@ -13,6 +13,7 @@ template-filter: device.category == 'CDROM' plugin: user-interact-verify category_id: com.canonical.plainbox::optical id: optical/read_{name} +template-id: optical/read_name estimated_duration: 120.0 user: root command: optical_read_test.py /dev/{name} @@ -33,6 +34,7 @@ template-filter: device.category == 'CDROM' plugin: shell category_id: com.canonical.plainbox::optical id: optical/read-automated_{name} +template-id: optical/read-automated_name estimated_duration: 120.0 user: root command: optical_read_test.py /dev/{name} @@ -47,6 +49,7 @@ template-filter: device.category == 'CDROM' plugin: user-interact-verify category_id: com.canonical.plainbox::optical id: optical/cdrom-write_{name} +template-id: optical/cdrom-write_name estimated_duration: 120.0 requires: optical_drive_{name}.cd_write == 'supported' @@ -69,6 +72,7 @@ template-filter: device.category == 'CDROM' plugin: shell category_id: com.canonical.plainbox::optical id: optical/cdrom-write-automated_{name} +template-id: optical/cdrom-write-automated_name estimated_duration: 120.0 requires: optical_drive_{name}.cd_write == 'supported' @@ -83,6 +87,7 @@ template-filter: device.category == 'CDROM' plugin: manual category_id: com.canonical.plainbox::optical id: optical/cdrom-audio-playback_{name} +template-id: optical/cdrom-audio-playback_name depends: optical/read_{name} estimated_duration: 120.0 _description: @@ -107,6 +112,7 @@ template-filter: device.category == 'CDROM' plugin: user-interact-verify category_id: com.canonical.plainbox::optical id: optical/dvd-write_{name} +template-id: optical/dvd-write_name requires: optical_drive_{name}.dvd_write == 'supported' estimated_duration: 120.0 @@ -129,6 +135,7 @@ template-filter: device.category == 'CDROM' plugin: shell category_id: com.canonical.plainbox::optical id: optical/dvd-write-automated_{name} +template-id: optical/dvd-write-automated_name estimated_duration: 120.0 requires: optical_drive_{name}.dvd_write == 'supported' @@ -160,6 +167,7 @@ template-filter: device.category == 'CDROM' plugin: user-interact category_id: com.canonical.plainbox::optical id: optical/bluray-read_{name} +template-id: optical/bluray-read_name estimated_duration: 120.0 requires: optical_drive_{name}.bd_read == "supported" @@ -182,6 +190,7 @@ template-filter: device.category == 'CDROM' plugin: user-interact category_id: com.canonical.plainbox::optical id: optical/bluray-write_{name} +template-id: optical/bluray-write_name requires: optical_drive_{name}.bd_write == "supported" package.name == "growisofs" diff --git a/providers/base/units/power-management/jobs.pxu b/providers/base/units/power-management/jobs.pxu index 7c7ea5dbc..a73b4129e 100644 --- a/providers/base/units/power-management/jobs.pxu +++ b/providers/base/units/power-management/jobs.pxu @@ -495,6 +495,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::power-management id: power-management/tickless_idle_{kernel} +template-id: power-management/tickless_idle_kernel estimated_duration: 1.0 requires: cpuinfo.platform in ('i386', 'x86_64', 'ppc64el', 'pSeries') _description: Check to see if CONFIG_NO_HZ is set in the kernel (this is just a simple regression check) diff --git a/providers/base/units/qep/jobs.pxu b/providers/base/units/qep/jobs.pxu index 6623f1d5f..577f1ad0a 100644 --- a/providers/base/units/qep/jobs.pxu +++ b/providers/base/units/qep/jobs.pxu @@ -15,6 +15,7 @@ unit: template template-resource: qep/qep-devices template-unit: job id: qep/qep-device-driver-for-{qep-device} +template-id: qep/qep-device-driver-for-qep-device category_id: qep _summary: Verify PCI Device {qep-device} is using the correct driver _description: @@ -32,6 +33,7 @@ unit: template template-resource: qep/qep-devices template-unit: job id: qep/qep-device-node-for-{qep-device} +template-id: qep/qep-device-node-for-qep-device category_id: qep _summary: Verify device directory exists for {qep-device} _description: diff --git a/providers/base/units/rtc/jobs.pxu b/providers/base/units/rtc/jobs.pxu index 0cefb7ed8..472929407 100644 --- a/providers/base/units/rtc/jobs.pxu +++ b/providers/base/units/rtc/jobs.pxu @@ -59,6 +59,7 @@ unit: template template-resource: rtc_list template-unit: job id: rtc/rtc_alarm_{rtc} +template-id: rtc/rtc_alarm_rtc _summary: Check that RTC alarm of {rtc} works plugin: shell user: root @@ -77,6 +78,7 @@ unit: template template-resource: rtc_list template-unit: job id: rtc/rtc_clock_{rtc} +template-id: rtc/rtc_clock_rtc _summary: Check that {rtc} clock is synchronized with system clock plugin: shell user: root diff --git a/providers/base/units/self/jobs.pxu b/providers/base/units/self/jobs.pxu index f085a590b..5f5d6c926 100644 --- a/providers/base/units/self/jobs.pxu +++ b/providers/base/units/self/jobs.pxu @@ -4,6 +4,7 @@ template-engine: jinja2 template-resource: interface template-filter: interface.interface == 'content' and interface.type == 'plug' and interface.snap == '{{ __system_env__["SNAP_NAME"] }}' id: self/content-plug-connected-{{ name }} +template-id: self/content-plug-connected-name _summary: Ensure the content interface plug {{ name }} is connected plugin: shell command: diff --git a/providers/base/units/serial/jobs.pxu b/providers/base/units/serial/jobs.pxu index 1a82448c4..9b2c6b67d 100644 --- a/providers/base/units/serial/jobs.pxu +++ b/providers/base/units/serial/jobs.pxu @@ -23,6 +23,7 @@ unit: template template-resource: serial_ports_static template-unit: job id: serial/loopback-{dev} +template-id: serial/loopback-dev _summary: Serial loopback test of {dev} _purpose: Check if serial port is working hardwired plugin: shell diff --git a/providers/base/units/snapd/jobs.pxu b/providers/base/units/snapd/jobs.pxu index b21360925..a1feafea9 100644 --- a/providers/base/units/snapd/jobs.pxu +++ b/providers/base/units/snapd/jobs.pxu @@ -11,6 +11,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/snap-refresh-{type}-{name}-to-stable-rev +template-id: snapd/snap-refresh-type-name-to-stable-rev _summary: Refresh {name} snap to latest revision in stable channel _description: This test is currently for SUV process, the snap to be tested is on the beta @@ -35,6 +36,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/reboot-after-snap-refresh-{type}-{name}-to-stable-rev +template-id: snapd/reboot-after-snap-refresh-type-name-to-stable-rev _summary: Reboot after {name} snap refresh to latest revision in stable channel plugin: shell flags: noreturn autorestart @@ -51,6 +53,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/snap-verify-after-refresh-{type}-{name}-to-stable-rev +template-id: snapd/snap-verify-after-refresh-type-name-to-stable-rev _summary: Verify {name} snap revision after refreshing to latest revision in stable channel plugin: shell estimated_duration: 30s @@ -65,6 +68,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/snap-revert-{type}-{name}-from-stable-rev +template-id: snapd/snap-revert-type-name-from-stable-rev _summary: Revert {name} snap to original revision from stable channel plugin: shell estimated_duration: 3m @@ -79,6 +83,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/reboot-after-snap-revert-{type}-{name}-from-stable-rev +template-id: snapd/reboot-after-snap-revert-type-name-from-stable-rev _summary: Reboot after {name} snap reverting to latest revision in stable channel plugin: shell flags: noreturn autorestart @@ -95,6 +100,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/snap-verify-after-revert-{type}-{name}-from-stable-rev +template-id: snapd/snap-verify-after-revert-type-name-from-stable-rev _summary: Verify {name} snap revision after reverting from stable revision plugin: shell estimated_duration: 3s @@ -109,6 +115,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/snap-refresh-{type}-{name}-to-base-rev +template-id: snapd/snap-refresh-type-name-to-base-rev _summary: Refresh {name} snap to its base revision _description: This test is currently for SUV process, the snap to be tested is on the beta @@ -136,6 +143,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/reboot-after-snap-refresh-{type}-{name}-to-base-rev +template-id: snapd/reboot-after-snap-refresh-type-name-to-base-rev _summary: Reboot after {name} snap refresh to base revision plugin: shell flags: noreturn autorestart @@ -152,6 +160,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/snap-verify-after-refresh-{type}-{name}-to-base-rev +template-id: snapd/snap-verify-after-refresh-type-name-to-base-rev _summary: Verify {name} snap revision after refreshing to base revision plugin: shell estimated_duration: 30s @@ -166,6 +175,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/snap-revert-{type}-{name}-from-base-rev +template-id: snapd/snap-revert-type-name-from-base-rev _summary: Revert {name} snap from base revision to original revision plugin: shell estimated_duration: 3m @@ -180,6 +190,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/reboot-after-snap-revert-{type}-{name}-from-base-rev +template-id: snapd/reboot-after-snap-revert-type-name-from-base-rev _summary: Reboot after {name} snap revert to base revision plugin: shell flags: noreturn autorestart @@ -196,6 +207,7 @@ unit: template template-resource: snap_revision_info template-unit: job id: snapd/snap-verify-after-revert-{type}-{name}-from-base-rev +template-id: snapd/snap-verify-after-revert-type-name-from-base-rev _summary: Verify {name} snap revision after reverting from base revision plugin: shell estimated_duration: 3s diff --git a/providers/base/units/snapd/snapd.pxu b/providers/base/units/snapd/snapd.pxu index 49e03c5c8..96f75ea81 100644 --- a/providers/base/units/snapd/snapd.pxu +++ b/providers/base/units/snapd/snapd.pxu @@ -257,6 +257,7 @@ unit: template template-resource: com.canonical.certification::model_assertion template-unit: job id: snappy/test-store-config-{store} +template-id: snappy/test-store-config-store _summary: Test that image is using the correct snappy store configuration. _purpose: The image can be tied to using a particular store for the OEM. This diff --git a/providers/base/units/socketcan/jobs.pxu b/providers/base/units/socketcan/jobs.pxu index fded1adc2..e5c9223f9 100644 --- a/providers/base/units/socketcan/jobs.pxu +++ b/providers/base/units/socketcan/jobs.pxu @@ -85,6 +85,7 @@ unit: template template-resource: device template-filter: device.category == 'SOCKETCAN' id: socketcan/send_packet_local_sff_{interface} +template-id: socketcan/send_packet_local_sff_interface _summary: CAN device support test {interface} (Raw, Local) _description: Test a CAN device by sending packets using a raw socket, this is only a @@ -110,6 +111,7 @@ unit: template template-resource: device template-filter: device.category == 'SOCKETCAN' id: socketcan/send_packet_local_eff_{interface} +template-id: socketcan/send_packet_local_eff_interface _summary: CAN device support test {interface} (Raw, Local, EFF) _description: Test a CAN device by sending packets using a raw socket, this is only a @@ -135,6 +137,7 @@ unit: template template-resource: device template-filter: device.category == 'SOCKETCAN' id: socketcan/send_packet_local_fd_{interface} +template-id: socketcan/send_packet_local_fd_interface _summary: CAN device support test {interface} (Raw, Local, FD) _description: Test a CAN device by sending packets using a raw socket, this is only a @@ -161,6 +164,7 @@ unit: template template-resource: device template-filter: device.category == 'SOCKETCAN' id: socketcan/send_packet_remote_sff_{interface} +template-id: socketcan/send_packet_remote_sff_interface _summary: CAN device support test {interface} (Raw, Remote) _description: Test a CAN device by sending packets using a raw socket to a remote device. @@ -189,6 +193,7 @@ unit: template template-resource: device template-filter: device.category == 'SOCKETCAN' id: socketcan/send_packet_remote_eff_{interface} +template-id: socketcan/send_packet_remote_eff_interface _summary: CAN device support test {interface} (Raw, Remote, EFF) _description: Test a CAN device by sending packets using a raw socket to a remote device. @@ -217,6 +222,7 @@ unit: template template-resource: device template-filter: device.category == 'SOCKETCAN' id: socketcan/send_packet_remote_fd_{interface} +template-id: socketcan/send_packet_remote_fd_interface _summary: CAN device support test {interface} (Raw, Remote, FD) _description: Test a CAN device by sending packets using a raw socket to a remote device. diff --git a/providers/base/units/stress/boot.pxu b/providers/base/units/stress/boot.pxu index 803fae3a2..8200c5477 100644 --- a/providers/base/units/stress/boot.pxu +++ b/providers/base/units/stress/boot.pxu @@ -67,6 +67,7 @@ estimated_duration: 180.0 depends: init-boot-loop-data id: cold-boot-loop-reboot{reboot_id} +template-id: cold-boot-loop-rebootreboot_id category_id: stress-tests/cold-boot _summary: Perform cold reboot {reboot_id} _description: Enter sleep mode after a configurable delay. @@ -99,6 +100,7 @@ estimated_duration: 1.0 depends: cold-boot-loop-reboot1 id: cold-boot-loop-test{reboot_id} +template-id: cold-boot-loop-testreboot_id category_id: stress-tests/cold-boot _summary: Cold boot system configuration test {reboot_id} _description: Compare the data after waking up the system with the base data set @@ -131,6 +133,7 @@ estimated_duration: 60s depends: init-boot-loop-data id: warm-boot-loop-reboot{reboot_id} +template-id: warm-boot-loop-rebootreboot_id category_id: stress-tests/warm-boot _summary: Perform warm reboot {reboot_id} _description: Perform warm reboot after a configurable delay. @@ -163,6 +166,7 @@ estimated_duration: 1.0 depends: warm-boot-loop-reboot1 id: warm-boot-loop-test{reboot_id} +template-id: warm-boot-loop-testreboot_id category_id: stress-tests/warm-boot _summary: Warm boot system configuration test {reboot_id} _description: Compare data after warm boot with baseline data set diff --git a/providers/base/units/stress/s3s4.pxu b/providers/base/units/stress/s3s4.pxu index df451060e..1677238b4 100644 --- a/providers/base/units/stress/s3s4.pxu +++ b/providers/base/units/stress/s3s4.pxu @@ -46,6 +46,7 @@ plugin: shell flags: preserve-locale category_id: stress-tests/suspend id: stress-tests/suspend_{{ s3_iterations }}_cycles +template-id: stress-tests/suspend_s3_iterations_cycles imports: from com.canonical.certification import sleep from com.canonical.certification import rtc @@ -77,6 +78,7 @@ plugin: shell flags: preserve-locale category_id: stress-tests/suspend id: stress-tests/suspend-{s3_iterations}-cycles-log-check +template-id: stress-tests/suspend-s3_iterations-cycles-log-check after: stress-tests/suspend_{s3_iterations}_cycles requires: cpuinfo.platform in ("i386", "x86_64") estimated_duration: 1.0 @@ -91,6 +93,7 @@ plugin: attachment flags: preserve-locale category_id: stress-tests/suspend id: stress-tests/suspend-{s3_iterations}-cycles-log-attach +template-id: stress-tests/suspend-s3_iterations-cycles-log-attach estimated_duration: 1.0 after: stress-tests/suspend_{s3_iterations}_cycles requires: cpuinfo.platform in ("i386", "x86_64") @@ -107,6 +110,7 @@ plugin: shell flags: preserve-locale category_id: stress-tests/hibernate id: stress-tests/hibernate_{{ s4_iterations }}_cycles +template-id: stress-tests/hibernate_s4_iterations_cycles imports: from com.canonical.certification import sleep from com.canonical.certification import rtc @@ -130,6 +134,7 @@ plugin: shell flags: preserve-locale category_id: stress-tests/hibernate id: stress-tests/hibernate-{s4_iterations}-cycles-log-check +template-id: stress-tests/hibernate-s4_iterations-cycles-log-check after: stress-tests/hibernate_{s4_iterations}_cycles requires: cpuinfo.platform in ("i386", "x86_64") estimated_duration: 1.0 @@ -144,6 +149,7 @@ plugin: attachment flags: preserve-locale category_id: stress-tests/hibernate id: stress-tests/hibernate-{s4_iterations}-cycles-log-attach +template-id: stress-tests/hibernate-s4_iterations-cycles-log-attach estimated_duration: 1.0 after: stress-tests/hibernate_{s4_iterations}_cycles requires: cpuinfo.platform in ("i386", "x86_64") diff --git a/providers/base/units/stress/stress-ng.pxu b/providers/base/units/stress/stress-ng.pxu index 6265bac25..fb7bf5099 100644 --- a/providers/base/units/stress/stress-ng.pxu +++ b/providers/base/units/stress/stress-ng.pxu @@ -15,6 +15,7 @@ unit: template template-resource: stress-ng-stressors template-unit: job id: stress/stress-ng-test-for-stressor-{stressor} +template-id: stress/stress-ng-test-for-stressor-stressor category_id: stress-tests _summary: Run the stress-ng for stressor {stressor} _description: diff --git a/providers/base/units/stress/suspend_cycles_reboot.pxu b/providers/base/units/stress/suspend_cycles_reboot.pxu index 1353324df..65dcd9014 100644 --- a/providers/base/units/stress/suspend_cycles_reboot.pxu +++ b/providers/base/units/stress/suspend_cycles_reboot.pxu @@ -87,6 +87,7 @@ template-engine: jinja2 plugin: shell category_id: stress-tests/suspend id: stress-tests/suspend_cycles_1_reboot{{suspend_reboot_id}} +template-id: stress-tests/suspend_cycles_1_rebootsuspend_reboot_id imports: from com.canonical.certification import sleep from com.canonical.certification import rtc @@ -109,6 +110,7 @@ template-engine: jinja2 plugin: shell category_id: stress-tests/suspend id: stress-tests/suspend_cycles_{{suspend_id}}_reboot{{suspend_reboot_id}} +template-id: stress-tests/suspend_cycles_suspend_id_rebootsuspend_reboot_id imports: from com.canonical.certification import sleep from com.canonical.certification import rtc @@ -131,6 +133,7 @@ template-engine: jinja2 plugin: shell category_id: stress-tests/suspend id: stress-tests/suspend_cycles_reboot{{suspend_reboot_id}} +template-id: stress-tests/suspend_cycles_rebootsuspend_reboot_id imports: from com.canonical.certification import sleep from com.canonical.certification import rtc @@ -152,6 +155,7 @@ template-unit: job plugin: shell category_id: stress-tests/suspend id: stress-tests/suspend-{s3_iterations}-cycles-with-reboot-{reboot_iterations}-log-check +template-id: stress-tests/suspend-s3_iterations-cycles-with-reboot-reboot_iterations-log-check requires: cpuinfo.platform in ("i386", "x86_64") estimated_duration: 1.0 command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_cycles_with_reboot_total.log ] && sleep_test_log_check.py -v --ignore-warning -t all "$PLAINBOX_SESSION_SHARE"/suspend_cycles_with_reboot_total.log @@ -165,6 +169,7 @@ template-unit: job plugin: shell category_id: stress-tests/suspend id: stress-tests/suspend-{s3_iterations}-cycles-with-reboot-{reboot_iterations}-time-check +template-id: stress-tests/suspend-s3_iterations-cycles-with-reboot-reboot_iterations-time-check requires: cpuinfo.platform in ("i386", "x86_64") estimated_duration: 1.0 command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_cycles_with_reboot_total.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/suspend_cycles_with_reboot_total.log --s {sleep_threshold} --r {resume_threshold} @@ -178,6 +183,7 @@ template-unit: job plugin: attachment category_id: stress-tests/suspend id: stress-tests/suspend-{s3_iterations}-cycles-with-reboot-{reboot_iterations}-log-attach +template-id: stress-tests/suspend-s3_iterations-cycles-with-reboot-reboot_iterations-log-attach estimated_duration: 1.0 command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_cycles_with_reboot_total.log ] && cat "$PLAINBOX_SESSION_SHARE"/suspend_cycles_with_reboot_total.log summary: diff --git a/providers/base/units/suspend/suspend-graphics.pxu b/providers/base/units/suspend/suspend-graphics.pxu index ece173a44..eb16d6b9b 100644 --- a/providers/base/units/suspend/suspend-graphics.pxu +++ b/providers/base/units/suspend/suspend-graphics.pxu @@ -4,6 +4,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{index}_resolution_before_suspend_{product_slug}_auto +template-id: suspend/index_resolution_before_suspend_product_slug_auto after: graphics/{index}_auto_switch_card_{product_slug} estimated_duration: 1.2 _description: Record the current resolution before suspending. @@ -18,6 +19,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{index}_suspend_after_switch_to_card_{product_slug}_auto +template-id: suspend/index_suspend_after_switch_to_card_product_slug_auto requires: sleep.mem == 'supported' rtc.state == 'supported' @@ -39,6 +41,7 @@ template-engine: jinja2 plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{{ index }}_resolution_after_suspend_{{ product_slug }}_auto +template-id: suspend/index_resolution_after_suspend_product_slug_auto estimated_duration: 1.2 depends: suspend/{{ index }}_resolution_before_suspend_{{ product_slug }}_auto @@ -60,6 +63,7 @@ template-engine: jinja2 plugin: manual category_id: com.canonical.plainbox::suspend id: suspend/{{ index }}_display_after_suspend_{{ product_slug }}_graphics +template-id: suspend/index_display_after_suspend_product_slug_graphics depends: {%- if gpu_count > "1" %} suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto @@ -82,6 +86,7 @@ template-engine: jinja2 plugin: user-interact-verify category_id: com.canonical.plainbox::suspend id: suspend/{{ index }}_cycle_resolutions_after_suspend_{{ product_slug }}_graphics +template-id: suspend/index_cycle_resolutions_after_suspend_product_slug_graphics requires: package.name == 'xorg' depends: {%- if gpu_count > "1" %} @@ -113,6 +118,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: attachment category_id: com.canonical.plainbox::suspend id: suspend/{index}_xrandr_screens_after_suspend.tar.gz_auto +template-id: suspend/index_xrandr_screens_after_suspend.tar.gz_auto depends: after-suspend-graphics/{index}_cycle_resolution_{product_slug} command: [ -f "$PLAINBOX_SESSION_SHARE"/xrandr_screens_{index}_after_suspend.tgz ] && cat "$PLAINBOX_SESSION_SHARE"/xrandr_screens_{index}_after_suspend.tgz _description: This attaches screenshots from the suspend/cycle_resolutions_after_suspend test to the results submission. @@ -124,6 +130,7 @@ template-engine: jinja2 plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{{ index }}_gl_support_after_suspend_{{ product_slug }}_auto +template-id: suspend/index_gl_support_after_suspend_product_slug_auto depends: {%- if gpu_count > "1" %} suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto @@ -145,6 +152,7 @@ template-engine: jinja2 plugin: user-interact-verify category_id: com.canonical.plainbox::suspend id: suspend/{{ index }}_glxgears_after_suspend_{{ product_slug }}_graphics +template-id: suspend/index_glxgears_after_suspend_product_slug_graphics depends: {%- if gpu_count > "1" %} suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto @@ -172,6 +180,7 @@ unit: template template-resource: graphics_card template-engine: jinja2 id: suspend/{{ index }}_video_after_suspend_{{ product_slug }}_graphics +template-id: suspend/index_video_after_suspend_product_slug_graphics depends: {%- if gpu_count > "1" %} suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto @@ -203,6 +212,7 @@ template-engine: jinja2 plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{{ index }}_driver_version_after_suspend_{{ product_slug }}_auto +template-id: suspend/index_driver_version_after_suspend_product_slug_auto depends: {%- if gpu_count > "1" %} suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto @@ -229,6 +239,7 @@ template-engine: jinja2 plugin: attachment category_id: com.canonical.plainbox::suspend id: suspend/{{ index }}_suspend-single-log-attach_{{ product_slug }}_auto +template-id: suspend/index_suspend-single-log-attach_product_slug_auto depends: {%- if gpu_count > "1" %} suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto @@ -246,6 +257,7 @@ template-engine: jinja2 plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{{ index }}_suspend-time-check_{{ product_slug }}_auto +template-id: suspend/index_suspend-time-check_product_slug_auto depends: {%- if gpu_count > "1" %} suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto @@ -260,6 +272,7 @@ unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' id: power-management/{index}_suspend_30_times_on_{product_slug} +template-id: power-management/index_suspend_30_times_on_product_slug plugin: shell category_id: com.canonical.plainbox::stress estimated_duration: 5400.0 @@ -287,6 +300,7 @@ template-engine: jinja2 plugin: user-interact-verify category_id: com.canonical.plainbox::suspend id: suspend/{{ index }}_rotation_after_suspend_{{ product_slug }}_graphics +template-id: suspend/index_rotation_after_suspend_product_slug_graphics depends: {%- if gpu_count > "1" %} suspend/{{ index }}_suspend_after_switch_to_card_{{ product_slug }}_auto diff --git a/providers/base/units/suspend/suspend.pxu b/providers/base/units/suspend/suspend.pxu index 3ac3ff125..44de42cef 100644 --- a/providers/base/units/suspend/suspend.pxu +++ b/providers/base/units/suspend/suspend.pxu @@ -20,6 +20,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{index}_resolution_before_suspend_{product_slug} +template-id: suspend/index_resolution_before_suspend_product_slug depends: graphics/{index}_switch_card_{product_slug} estimated_duration: 1.2 _summary: Record the current resolution before suspending. @@ -61,6 +62,7 @@ template-filter: device.category == 'NETWORK' plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/iperf_before_suspend_ether_auto_device{__index__}_{interface} +template-id: suspend/iperf_before_suspend_ether_auto_device__index___interface depends: ethernet/detect estimated_duration: 20.0 requires: @@ -210,6 +212,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::suspend id: suspend/{index}_suspend_after_switch_to_card_{product_slug} +template-id: suspend/index_suspend_after_switch_to_card_product_slug requires: sleep.mem == 'supported' rtc.state == 'supported' @@ -277,6 +280,7 @@ template-resource: graphics_card plugin: user-interact-verify category_id: com.canonical.plainbox::suspend id: suspend/{index}_hybrid_sleep_{product_slug} +template-id: suspend/index_hybrid_sleep_product_slug user: root command: if [[ -v SNAP ]]; then @@ -317,6 +321,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: attachment category_id: com.canonical.plainbox::suspend id: suspend/{index}_suspend-single-log-attach_{product_slug} +template-id: suspend/index_suspend-single-log-attach_product_slug depends: suspend/{index}_suspend_after_switch_to_card_{product_slug} command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single.log ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single.log _summary: Attaches the log from the single suspend/resume test @@ -326,6 +331,7 @@ template-resource: graphics_card plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{index}_hybrid-sleep-single-log-check +template-id: suspend/index_hybrid-sleep-single-log-check depends: suspend/{index}_hybrid_sleep_{product_slug} estimated_duration: 1.2 command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single.log ] && sleep_test_log_check.py -v --ignore-warning -t all "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single.log @@ -336,6 +342,7 @@ template-resource: graphics_card plugin: attachment category_id: com.canonical.plainbox::suspend id: suspend/{index}_hybrid-sleep-single-log-attach_{product_slug} +template-id: suspend/index_hybrid-sleep-single-log-attach_product_slug depends: suspend/{index}_hybrid_sleep_{product_slug} command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single.log ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single.log _summary: Attaches the log from the single hybrid sleep/resume test @@ -355,6 +362,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{index}_suspend-time-check_{product_slug} +template-id: suspend/index_suspend-time-check_product_slug depends: suspend/{index}_suspend_after_switch_to_card_{product_slug} estimated_duration: 1.2 command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single_times.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single_times.log @@ -427,6 +435,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{index}_resolution_after_suspend_{product_slug} +template-id: suspend/index_resolution_after_suspend_product_slug estimated_duration: 1.2 depends: suspend/{index}_resolution_before_suspend_{product_slug} _description: Test to see that we have the same resolution after resuming as before. @@ -619,6 +628,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: manual category_id: com.canonical.plainbox::suspend id: suspend/{index}_display_after_suspend_{product_slug} +template-id: suspend/index_display_after_suspend_product_slug depends: suspend/{index}_suspend_after_switch_to_card_{product_slug} _summary: Test display function after suspend for {vendor} {product} _description: @@ -635,6 +645,7 @@ template-filter: device.category == 'NETWORK' plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/iperf_after_suspend_ether_auto_device{__index__}_{interface} +template-id: suspend/iperf_after_suspend_ether_auto_device__index___interface depends: suspend/suspend_advanced_auto estimated_duration: 30.0 requires: @@ -651,6 +662,7 @@ template-filter: device.category == 'WIRELESS' plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/iperf_after_suspend_wifi_auto_device{__index__}_{interface} +template-id: suspend/iperf_after_suspend_wifi_auto_device__index___interface depends: suspend/suspend_advanced_auto estimated_duration: 30.0 requires: @@ -1130,6 +1142,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: user-interact-verify category_id: com.canonical.plainbox::suspend id: suspend/{index}_cycle_resolutions_after_suspend_{product_slug} +template-id: suspend/index_cycle_resolutions_after_suspend_product_slug requires: package.name == 'xorg' depends: suspend/{index}_suspend_after_switch_to_card_{product_slug} estimated_duration: 120.0 @@ -1178,6 +1191,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: attachment category_id: com.canonical.plainbox::suspend id: suspend/{index}_xrandr_screens_after_suspend.tar.gz +template-id: suspend/index_xrandr_screens_after_suspend.tar.gz depends: suspend/{index}_cycle_resolutions_after_suspend_{product_slug} command: [ -f "$PLAINBOX_SESSION_SHARE"/{index}_xrandr_screens_after_suspend.tgz ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_xrandr_screens_after_suspend.tgz _description: This attaches screenshots from the suspend/cycle_resolutions_after_suspend test to the results submission. @@ -2050,6 +2064,7 @@ template-filter: device.category == 'MOUSE' or device.category == 'TOUCHPAD' or plugin: manual category_id: com.canonical.plainbox::suspend id: suspend/pointing-after-suspend_{product_slug}_{category}_{__index__} +template-id: suspend/pointing-after-suspend_product_slug_category___index__ depends: suspend/suspend_advanced_auto _description: PURPOSE: @@ -2066,6 +2081,7 @@ plugin: manual category_id: com.canonical.plainbox::suspend estimated_duration: 30.0 id: suspend/clicking-after-suspend_{product_slug}_{category}_{__index__} +template-id: suspend/clicking-after-suspend_product_slug_category___index__ depends: suspend/suspend_advanced_auto _summary: Check post suspend button functionality for {product} _description: @@ -2085,6 +2101,7 @@ template-filter: graphics_card.prime_gpu_offload == 'Off' plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{index}_gl_support_after_suspend_{product_slug} +template-id: suspend/index_gl_support_after_suspend_product_slug depends: suspend/{index}_suspend_after_switch_to_card_{product_slug} requires: package.name == 'nux-tools' command: /usr/lib/nux/unity_support_test -p 2>&1 @@ -2107,6 +2124,7 @@ template-resource: graphics_card plugin: user-interact-verify category_id: com.canonical.plainbox::suspend id: suspend/{index}_glxgears_after_suspend_{product_slug} +template-id: suspend/index_glxgears_after_suspend_product_slug depends: suspend/{index}_suspend_after_switch_to_card_{product_slug} requires: executable.name == 'glxgears' command: glxgears; true @@ -2143,6 +2161,7 @@ _description: unit: template template-resource: graphics_card id: suspend/{index}_video_after_suspend_{product_slug} +template-id: suspend/index_video_after_suspend_product_slug depends: suspend/{index}_suspend_after_switch_to_card_{product_slug} plugin: user-interact-verify category_id: com.canonical.plainbox::suspend diff --git a/providers/base/units/touchpad/jobs.pxu b/providers/base/units/touchpad/jobs.pxu index 7db0d5d75..cf5f21596 100644 --- a/providers/base/units/touchpad/jobs.pxu +++ b/providers/base/units/touchpad/jobs.pxu @@ -230,6 +230,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::touchpad id: touchpad/palm-rejection-firmware-labeling_{product_slug} +template-id: touchpad/palm-rejection-firmware-labeling_product_slug flags: also-after-suspend estimated_duration: 5.0 imports: from com.canonical.plainbox import manifest diff --git a/providers/base/units/touchscreen/jobs.pxu b/providers/base/units/touchscreen/jobs.pxu index 524f0ca3a..7605ac7e9 100644 --- a/providers/base/units/touchscreen/jobs.pxu +++ b/providers/base/units/touchscreen/jobs.pxu @@ -209,6 +209,7 @@ template-unit: job plugin: user-interact category_id: com.canonical.plainbox::touchscreen id: touchscreen/evdev/single-touch-tap-{{ product_slug }} +template-id: touchscreen/evdev/single-touch-tap-product_slug flags: also-after-suspend imports: from com.canonical.plainbox import manifest requires: manifest.has_touchscreen == 'True' @@ -232,6 +233,7 @@ template-unit: job plugin: user-interact category_id: com.canonical.plainbox::touchscreen id: touchscreen/evdev/2-touch-tap-{{ product_slug }} +template-id: touchscreen/evdev/2-touch-tap-product_slug imports: from com.canonical.plainbox import manifest requires: manifest.has_touchscreen == 'True' estimated_duration: 10.0 @@ -256,6 +258,7 @@ template-unit: job plugin: user-interact category_id: com.canonical.plainbox::touchscreen id: touchscreen/evdev/3-touch-tap-{{ product_slug }} +template-id: touchscreen/evdev/3-touch-tap-product_slug imports: from com.canonical.plainbox import manifest requires: manifest.has_touchscreen == 'True' estimated_duration: 10.0 @@ -280,6 +283,7 @@ template-unit: job plugin: user-interact category_id: com.canonical.plainbox::touchscreen id: touchscreen/evdev/4-touch-tap-{{ product_slug }} +template-id: touchscreen/evdev/4-touch-tap-product_slug imports: from com.canonical.plainbox import manifest requires: manifest.has_touchscreen == 'True' estimated_duration: 10.0 diff --git a/providers/base/units/ubuntucore/jobs.pxu b/providers/base/units/ubuntucore/jobs.pxu index 04c30b3a5..ca3fc953e 100644 --- a/providers/base/units/ubuntucore/jobs.pxu +++ b/providers/base/units/ubuntucore/jobs.pxu @@ -56,6 +56,7 @@ template-filter: lsb.distributor_id == 'Ubuntu Core' template-engine: jinja2 template-unit: job id: ubuntucore/os-fail-boot-{{description}} +template-id: ubuntucore/os-fail-boot-description _summary: Automatically rollback after failed boot after upgrade _purpose: Check system will rollback to original core snap if failed to boot the updated one @@ -89,6 +90,7 @@ template-filter: lsb.distributor_id == 'Ubuntu Core' template-engine: jinja2 template-unit: job id: ubuntucore/os-fail-boot-with-refresh-control-{{description}} +template-id: ubuntucore/os-fail-boot-with-refresh-control-description _summary: Automatically rollback after failed boot after upgrade _purpose: Check system will rollback to original core snap if failed to boot the updated one @@ -135,6 +137,7 @@ template-resource: model_assertion template-unit: job plugin: manual id: ubuntucore/kernel-failboot-{kernel} +template-id: ubuntucore/kernel-failboot-kernel _summary: Reboot with failboot kernel to verify system rollback function _purpose: Check if system will rollback to previous(functional) kernel diff --git a/providers/base/units/usb/usb.pxu b/providers/base/units/usb/usb.pxu index 8978d4924..7b5aefdff 100644 --- a/providers/base/units/usb/usb.pxu +++ b/providers/base/units/usb/usb.pxu @@ -329,6 +329,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::usb id: usb/storage-preinserted-{symlink_uuid} +template-id: usb/storage-preinserted-symlink_uuid user: root estimated_duration: 45.0 flags: also-after-suspend reset-locale diff --git a/providers/base/units/wireless/jobs.pxu b/providers/base/units/wireless/jobs.pxu index db307d27e..3dd3ac08e 100644 --- a/providers/base/units/wireless/jobs.pxu +++ b/providers/base/units/wireless/jobs.pxu @@ -16,6 +16,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_scanning_{{ interface }} +template-id: wireless/wireless_scanning_interface user: root _summary: Test system can discover Wi-Fi networks on {{ interface }} command: @@ -39,6 +40,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa_bg_nm_{{ interface }} +template-id: wireless/wireless_connection_wpa_bg_nm_interface _summary: Connect to WPA-encrypted 802.11b/g Wi-Fi network on {{ interface }} _purpose: Check system can connect to 802.11b/g AP with wpa security @@ -62,6 +64,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_open_bg_nm_{{ interface }} +template-id: wireless/wireless_connection_open_bg_nm_interface _summary: Connect to unencrypted 802.11b/g Wi-Fi network on {{ interface }} _purpose: Check system can connect to insecure 802.11b/g AP @@ -85,6 +88,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa_n_nm_{{ interface }} +template-id: wireless/wireless_connection_wpa_n_nm_interface _summary: Connect to WPA-encrypted 802.11n Wi-Fi network on {{ interface }} _purpose: Check system can connect to 802.11n AP with wpa security @@ -108,6 +112,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_open_n_nm_{{ interface }} +template-id: wireless/wireless_connection_open_n_nm_interface _summary: Connect to unencrypted 802.11n Wi-Fi network on {{ interface }} _purpose: Check system can connect to insecure 802.11n AP @@ -131,6 +136,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa_ac_nm_{{ interface }} +template-id: wireless/wireless_connection_wpa_ac_nm_interface _summary: Connect to WPA-encrypted 802.11ac Wi-Fi network on {{ interface }} _purpose: Check system can connect to 802.11ac AP with wpa security @@ -155,6 +161,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_open_ac_nm_{{ interface }} +template-id: wireless/wireless_connection_open_ac_nm_interface _summary: Connect to unencrypted 802.11ac Wi-Fi network on {{ interface }} _purpose: Check system can connect to insecure 802.11ac AP @@ -179,6 +186,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa_ax_nm_{{ interface }} +template-id: wireless/wireless_connection_wpa_ax_nm_interface _summary: Connect to WPA-encrypted 802.11ax Wi-Fi network on {{ interface }} _purpose: Check system can connect to 802.11ax AP with wpa security @@ -203,6 +211,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa3_ax_nm_{{ interface }} +template-id: wireless/wireless_connection_wpa3_ax_nm_interface _summary: Connect to WPA3-encrypted 802.11ax Wi-Fi network on {{ interface }} _purpose: Check system can connect to 802.11ax AP with wpa3 security @@ -227,6 +236,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_open_ax_nm_{{ interface }} +template-id: wireless/wireless_connection_open_ax_nm_interface _summary: Connect to unencrypted 802.11ax Wi-Fi network on {{ interface }} _purpose: Check system can connect to insecure 802.11ax AP @@ -554,6 +564,7 @@ unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' id: wireless/nm_connection_save_{interface} +template-id: wireless/nm_connection_save_interface category_id: com.canonical.plainbox::wireless _summary: Save any NetworkManager 802.11 configurations prior to testing plugin: shell @@ -567,6 +578,7 @@ unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' id: wireless/nm_connection_restore_{interface} +template-id: wireless/nm_connection_restore_interface category_id: com.canonical.plainbox::wireless _summary: Restore any NetworkManager 802.11 configurations after testing plugin: shell @@ -581,6 +593,7 @@ unit: template template-resource: device template-filter: device.driver == 'iwlwifi' id: wireless/check_iwlwifi_microcode_crash_{interface} +template-id: wireless/check_iwlwifi_microcode_crash_interface _summary: Check there have been no iwlwifi crashes plugin: shell command: check-iwlwifi-microcode-sw-error.sh diff --git a/providers/base/units/wireless/nm-hotspot.pxu b/providers/base/units/wireless/nm-hotspot.pxu index 609c3c0c8..40a1d4bfd 100644 --- a/providers/base/units/wireless/nm-hotspot.pxu +++ b/providers/base/units/wireless/nm-hotspot.pxu @@ -5,6 +5,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/nmcli_wifi_ap_bg_{{ interface }} +template-id: wireless/nmcli_wifi_ap_bg_interface _summary: Create 802.11b/g Wi-Fi AP on {{ interface }} using NetworkManager command: net_driver_info.py "$NET_DRIVER_INFO" @@ -28,6 +29,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/nmcli_wifi_ap_a_{{ interface }} +template-id: wireless/nmcli_wifi_ap_a_interface _summary: Create 802.11a Wi-Fi AP on {{ interface }} using NetworkManager command: net_driver_info.py "$NET_DRIVER_INFO" diff --git a/providers/base/units/wireless/wifi-ap.pxu b/providers/base/units/wireless/wifi-ap.pxu index ad5dfae20..3be6e888c 100644 --- a/providers/base/units/wireless/wifi-ap.pxu +++ b/providers/base/units/wireless/wifi-ap.pxu @@ -3,6 +3,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_open_a_no_sta_{interface}_manual +template-id: wireless/wifi_ap_open_a_no_sta_interface_manual category_id: wifi_ap _summary: Create open 802.11a Wi-Fi AP on {interface} with no STA (Manual) plugin: manual @@ -32,6 +33,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_open_a_no_sta_{interface}_auto +template-id: wireless/wifi_ap_open_a_no_sta_interface_auto category_id: wifi_ap _summary: Create open 802.11a Wi-Fi AP on {interface} with no STA plugin: shell @@ -74,6 +76,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_open_b_no_sta_{interface}_manual +template-id: wireless/wifi_ap_open_b_no_sta_interface_manual category_id: wifi_ap _summary: Create open 802.11b Wi-Fi AP on {interface} with no STA (Manual) plugin: manual @@ -103,6 +106,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_open_b_no_sta_{interface}_auto +template-id: wireless/wifi_ap_open_b_no_sta_interface_auto category_id: wifi_ap _summary: Create open 802.11b Wi-Fi AP on {interface} with no STA plugin: shell @@ -145,6 +149,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_open_g_no_sta_{interface}_manual +template-id: wireless/wifi_ap_open_g_no_sta_interface_manual category_id: wifi_ap _summary: Create open 802.11g Wi-Fi AP on {interface} with no STA (Manual) plugin: manual @@ -174,6 +179,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_open_g_no_sta_{interface}_auto +template-id: wireless/wifi_ap_open_g_no_sta_interface_auto category_id: wifi_ap _summary: Create open 802.11g Wi-Fi AP on {interface} with no STA plugin: shell @@ -216,6 +222,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_open_ad_no_sta_{interface}_manual +template-id: wireless/wifi_ap_open_ad_no_sta_interface_manual category_id: wifi_ap _summary: Create open 802.11ad Wi-Fi AP on {interface} with no STA (Manual) plugin: manual @@ -245,6 +252,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_open_ad_no_sta_{interface}_auto +template-id: wireless/wifi_ap_open_ad_no_sta_interface_auto category_id: wifi_ap _summary: Create open 802.11ad Wi-Fi AP on {interface} with no STA plugin: shell @@ -287,6 +295,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_a_no_sta_{interface}_manual +template-id: wireless/wifi_ap_wpa_a_no_sta_interface_manual category_id: wifi_ap _summary: Create WPA2 802.11a Wi-Fi AP on {interface} with no STA (Manual) plugin: manual @@ -317,6 +326,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_a_no_sta_{interface}_auto +template-id: wireless/wifi_ap_wpa_a_no_sta_interface_auto category_id: wifi_ap _summary: Create WPA2 802.11a Wi-Fi AP on {interface} with no STA plugin: shell @@ -360,6 +370,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_b_no_sta_{interface}_manual +template-id: wireless/wifi_ap_wpa_b_no_sta_interface_manual category_id: wifi_ap _summary: Create WPA2 802.11b Wi-Fi AP on {interface} with no STA (Manual) plugin: manual @@ -390,6 +401,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_b_no_sta_{interface}_auto +template-id: wireless/wifi_ap_wpa_b_no_sta_interface_auto category_id: wifi_ap _summary: Create WPA2 802.11b Wi-Fi AP on {interface} with no STA plugin: shell @@ -433,6 +445,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_g_no_sta_{interface}_manual +template-id: wireless/wifi_ap_wpa_g_no_sta_interface_manual category_id: wifi_ap _summary: Create WPA2 802.11g Wi-Fi AP on {interface} with no STA (Manual) plugin: manual @@ -463,6 +476,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_g_no_sta_{interface}_auto +template-id: wireless/wifi_ap_wpa_g_no_sta_interface_auto category_id: wifi_ap _summary: Create WPA2 802.11g Wi-Fi AP on {interface} with no STA plugin: shell @@ -506,6 +520,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_ad_no_sta_{interface}_manual +template-id: wireless/wifi_ap_wpa_ad_no_sta_interface_manual category_id: wifi_ap _summary: Create WPA2 802.11ad Wi-Fi AP on {interface} with no STA (Manual) plugin: manual @@ -536,6 +551,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_ad_no_sta_{interface}_auto +template-id: wireless/wifi_ap_wpa_ad_no_sta_interface_auto category_id: wifi_ap _summary: Create WPA2 802.11ad Wi-Fi AP on {interface} with no STA plugin: shell @@ -579,6 +595,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_a_with_sta_{interface} +template-id: wireless/wifi_ap_wpa_a_with_sta_interface category_id: wifi_ap _summary: Create WPA2 802.11a Wi-Fi AP on {interface} with active STA (Manual) plugin: user-interact-verify @@ -617,6 +634,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_a_with_sta_{interface}_auto +template-id: wireless/wifi_ap_wpa_a_with_sta_interface_auto category_id: wifi_ap _summary: Create WPA2 802.11a Wi-Fi Access Point on {interface} with active STA plugin: shell @@ -665,6 +683,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_b_with_sta_{interface} +template-id: wireless/wifi_ap_wpa_b_with_sta_interface category_id: wifi_ap _summary: Create WPA2 802.11b Wi-Fi AP on {interface} with active STA (Manual) plugin: user-interact-verify @@ -703,6 +722,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_b_with_sta_{interface}_auto +template-id: wireless/wifi_ap_wpa_b_with_sta_interface_auto category_id: wifi_ap _summary: Create WPA2 802.11b Wi-Fi Access Point on {interface} with active STA plugin: shell @@ -751,6 +771,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_g_with_sta_{interface} +template-id: wireless/wifi_ap_wpa_g_with_sta_interface category_id: wifi_ap _summary: Create WPA2 802.11g Wi-Fi AP on {interface} with active STA (Manual) plugin: user-interact-verify @@ -789,6 +810,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_g_with_sta_{interface}_auto +template-id: wireless/wifi_ap_wpa_g_with_sta_interface_auto category_id: wifi_ap _summary: Create WPA2 802.11g Wi-Fi Access Point on {interface} with active STA plugin: shell @@ -837,6 +859,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_ad_with_sta_{interface} +template-id: wireless/wifi_ap_wpa_ad_with_sta_interface category_id: wifi_ap _summary: Create WPA2 802.11ad Wi-Fi AP on {interface} with active STA (Manual) plugin: user-interact-verify @@ -875,6 +898,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_wpa_ad_with_sta_{interface}_auto +template-id: wireless/wifi_ap_wpa_ad_with_sta_interface_auto category_id: wifi_ap _summary: Create WPA2 802.11ad Wi-Fi Access Point on {interface} with active STA plugin: shell @@ -923,6 +947,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_setup_wizard_{interface}_auto +template-id: wireless/wifi_ap_setup_wizard_interface_auto category_id: wifi_ap _summary: Create Access Point on {interface} using wifi-ap.setup-wizard plugin: shell @@ -954,6 +979,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_across_reboot_{interface}_setup +template-id: wireless/wifi_ap_across_reboot_interface_setup category_id: wifi_ap _summary: Create WPA2 802.11g Wi-Fi AP on {interface} and reboot (setup part) plugin: shell @@ -986,6 +1012,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_across_reboot_{interface}_setup_manual +template-id: wireless/wifi_ap_across_reboot_interface_setup_manual category_id: wifi_ap _summary: Create WPA2 AP on {interface} and reboot (setup part, manual resume) plugin: user-interact-verify @@ -1020,6 +1047,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_across_reboot_{interface}_check +template-id: wireless/wifi_ap_across_reboot_interface_check category_id: wifi_ap _summary: Create WPA2 802.11g Wi-Fi AP on {interface} and reboot (after reboot part) plugin: shell @@ -1052,6 +1080,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wifi_ap_across_reboot_{interface}_check_manual +template-id: wireless/wifi_ap_across_reboot_interface_check_manual category_id: wifi_ap _summary: Create WPA2 AP on {interface} (after reboot part, manual resume) plugin: shell diff --git a/providers/base/units/wireless/wireless-connection-manual.pxu b/providers/base/units/wireless/wireless-connection-manual.pxu index bcb75ece0..854c8b28f 100644 --- a/providers/base/units/wireless/wireless-connection-manual.pxu +++ b/providers/base/units/wireless/wireless-connection-manual.pxu @@ -3,6 +3,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wireless_connection_open_ax_{interface} +template-id: wireless/wireless_connection_open_ax_interface _summary: Connect to unencrypted 802.11ax Wi-Fi network on {interface} _purpose: Check system can connect to insecure 802.11ax AP @@ -24,6 +25,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wireless_connection_open_ac_{interface} +template-id: wireless/wireless_connection_open_ac_interface _summary: Connect to unencrypted 802.11ac Wi-Fi network on {interface} _purpose: Check system can connect to insecure 802.11ac AP @@ -45,6 +47,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wireless_connection_open_bg_{interface} +template-id: wireless/wireless_connection_open_bg_interface _summary: Connect to unencrypted 802.11b/g Wi-Fi network on {interface} _purpose: Check system can connect to insecure 802.11b/g AP @@ -66,6 +69,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wireless_connection_open_n_{interface} +template-id: wireless/wireless_connection_open_n_interface _summary: Connect to unencrypted 802.11n Wi-Fi network on {interface} _purpose: Check system can connect to insecure 802.11n AP @@ -87,6 +91,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wireless_connection_wpa_ax_{interface} +template-id: wireless/wireless_connection_wpa_ax_interface _summary: Connect to WPA-encrypted 802.11ax Wi-Fi network on {interface} _purpose: Check system can connect to 802.11ax AP with wpa security @@ -108,6 +113,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wireless_connection_wpa3_ax_{interface} +template-id: wireless/wireless_connection_wpa3_ax_interface _summary: Connect to WPA3-encrypted 802.11ax Wi-Fi network on {interface} _purpose: Check system can connect to 802.11ax AP with wpa3 security @@ -129,6 +135,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wireless_connection_wpa_ac_{interface} +template-id: wireless/wireless_connection_wpa_ac_interface _summary: Connect to WPA-encrypted 802.11ac Wi-Fi network on {interface} _purpose: Check system can connect to 802.11ac AP with wpa security @@ -150,6 +157,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wireless_connection_wpa_bg_{interface} +template-id: wireless/wireless_connection_wpa_bg_interface _summary: Connect to WPA-encrypted 802.11b/g Wi-Fi network {interface} _purpose: Check system can connect to 802.11b/g AP with wpa security @@ -171,6 +179,7 @@ template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-unit: job id: wireless/wireless_connection_wpa_n_{interface} +template-id: wireless/wireless_connection_wpa_n_interface _summary: Connect to WPA-encrypted 802.11n Wi-Fi network on {interface} _purpose: Check system can connect to 802.11n AP with wpa security @@ -195,6 +204,7 @@ template-unit: job plugin: shell category_id: com.canonical.plainbox::wireless id: wireless/monitor_wireless_connection_udp_{{ interface }} +template-id: wireless/monitor_wireless_connection_udp_interface requires: connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' environ: diff --git a/providers/base/units/wireless/wireless-connection-netplan.pxu b/providers/base/units/wireless/wireless-connection-netplan.pxu index 6c9d57a5e..400b3cc71 100644 --- a/providers/base/units/wireless/wireless-connection-netplan.pxu +++ b/providers/base/units/wireless/wireless-connection-netplan.pxu @@ -4,6 +4,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_open_ax_np_{{ interface }} +template-id: wireless/wireless_connection_open_ax_np_interface _summary: Connect to unencrypted 802.11ax Wi-Fi network on {{ interface }} - netplan _purpose: @@ -28,6 +29,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_open_ac_np_{{ interface }} +template-id: wireless/wireless_connection_open_ac_np_interface _summary: Connect to unencrypted 802.11ac Wi-Fi network on {{ interface }} - netplan _purpose: @@ -53,6 +55,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_open_bg_np_{{ interface }} +template-id: wireless/wireless_connection_open_bg_np_interface _summary: Connect to unencrypted 802.11b/g Wi-Fi network on {{ interface }} - netplan _purpose: @@ -76,6 +79,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_open_n_np_{{ interface }} +template-id: wireless/wireless_connection_open_n_np_interface _summary: Connect to unencrypted 802.11n Wi-Fi network on {{ interface }} - netplan _purpose: @@ -99,6 +103,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa_ax_np_{{ interface }} +template-id: wireless/wireless_connection_wpa_ax_np_interface _summary: Connect to WPA-encrypted 802.11ax Wi-Fi network on {{ interface }} - netplan _purpose: @@ -123,6 +128,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa3_ax_np_{{ interface }} +template-id: wireless/wireless_connection_wpa3_ax_np_interface _summary: Connect to WPA3-encrypted 802.11ax Wi-Fi network on {{ interface }} - netplan _purpose: @@ -147,6 +153,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa_ac_np_{{ interface }} +template-id: wireless/wireless_connection_wpa_ac_np_interface _summary: Connect to WPA-encrypted 802.11ac Wi-Fi network on {{ interface }} - netplan _purpose: @@ -171,6 +178,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa_bg_np_{{ interface }} +template-id: wireless/wireless_connection_wpa_bg_np_interface _summary: Connect to WPA-encrypted 802.11b/g Wi-Fi network on {{ interface }} - netplan _purpose: @@ -194,6 +202,7 @@ template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' template-engine: jinja2 template-unit: job id: wireless/wireless_connection_wpa_n_np_{{ interface }} +template-id: wireless/wireless_connection_wpa_n_np_interface _summary: Connect to WPA-encrypted 802.11n Wi-Fi network on {{ interface }} - netplan _purpose: diff --git a/providers/base/units/wireless/wowlan.pxu b/providers/base/units/wireless/wowlan.pxu index 1c110524b..d12c4feb9 100644 --- a/providers/base/units/wireless/wowlan.pxu +++ b/providers/base/units/wireless/wowlan.pxu @@ -2,6 +2,7 @@ unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN' id: wireless/wowlan_S5_{interface}_wakeonlan +template-id: wireless/wowlan_S5_interface_wakeonlan _summary: Wake on Wireless LAN (WoWLAN) test from S5 - {interface} - wakeonlan _purpose: Check that another system can wake up from S5 the SUT using WoWLAN function. @@ -29,6 +30,7 @@ unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN' id: wireless/wowlan_S5_{interface}_etherwake +template-id: wireless/wowlan_S5_interface_etherwake _summary: Wake on Wireless LAN (WoWLAN) test from S5 - {interface} - etherwake _purpose: Check that another system can wake up from S5 the SUT using WoWLAN function. @@ -56,6 +58,7 @@ unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN' id: wireless/wowlan_S4_{interface}_wakeonlan +template-id: wireless/wowlan_S4_interface_wakeonlan _summary: Wake on Wireless LAN (WoWLAN) test from S4 - {interface} - wakeonlan _purpose: Check that another system can wake up from S4 the SUT using WoWLAN function. @@ -84,6 +87,7 @@ unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN' id: wireless/wowlan_S4_{interface}_etherwake +template-id: wireless/wowlan_S4_interface_etherwake _summary: Wake on Wireless LAN (WoWLAN) test from S4 - {interface} - etherwake _purpose: Check that another system can wake up from S4 the SUT using WoWLAN function. @@ -112,6 +116,7 @@ unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN' id: wireless/wowlan_S3_{interface}_wakeonlan +template-id: wireless/wowlan_S3_interface_wakeonlan _summary: Wake on Wireless LAN (WoWLAN) test from S3 - {interface} - wakeonlan _purpose: Check that another system can wake up from S3 the SUT using WoWLAN function. @@ -140,6 +145,7 @@ unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN' id: wireless/wowlan_S3_{interface}_etherwake +template-id: wireless/wowlan_S3_interface_etherwake _summary: Wake on Wireless LAN (WoWLAN) test from S3 - {interface} - etherwake _purpose: Check that another system can wake up from S3 the SUT using WoWLAN function. diff --git a/providers/base/units/wwan/jobs.pxu b/providers/base/units/wwan/jobs.pxu index f651a42fb..8f6df8190 100644 --- a/providers/base/units/wwan/jobs.pxu +++ b/providers/base/units/wwan/jobs.pxu @@ -30,6 +30,7 @@ unit: template template-resource: wwan_resource template-unit: job id: wwan/gsm-connection-{manufacturer}-{model}-{hw_id}-auto +template-id: wwan/gsm-connection-manufacturer-model-hw_id-auto _summary: Verify a GSM broadband modem can create a data connection _description: Any modems discovered by the resource job that list GSM support @@ -58,6 +59,7 @@ unit: template template-resource: wwan_resource template-unit: job id: wwan/check-sim-present-{manufacturer}-{model}-{hw_id}-auto +template-id: wwan/check-sim-present-manufacturer-model-hw_id-auto _summary: Check if a SIM card is present in a slot connected to the modem _description: Check if a SIM card is present in a slot connected to the modem @@ -77,6 +79,7 @@ unit: template template-resource: wwan_resource template-unit: job id: wwan/verify-sim-info-{manufacturer}-{model}-{hw_id} +template-id: wwan/verify-sim-info-manufacturer-model-hw_id depends: wwan/check-sim-present-{manufacturer}-{model}-{hw_id}-auto _summary: Verify that the information retrieved from a SIM card is valid _description: diff --git a/providers/base/units/zapper/jobs.pxu b/providers/base/units/zapper/jobs.pxu index 3ee306ff3..62537aea7 100644 --- a/providers/base/units/zapper/jobs.pxu +++ b/providers/base/units/zapper/jobs.pxu @@ -12,6 +12,7 @@ template-resource: zapper_capabilities template-filter: zapper_capabilities.capability == 'USB hotplug' and zapper_capabilities.usb_version == '2' category_id: com.canonical.plainbox::usb id: usb/zapper-usb-insert-{{ port_alias }} +template-id: usb/zapper-usb-insert-port_alias template-engine: jinja2 _summary: Zapper-driven USB insertion test on port {{ port_alias }} requires: usb.usb2 == 'supported' @@ -31,6 +32,7 @@ template-resource: zapper_capabilities template-filter: zapper_capabilities.capability == 'USB hotplug' and zapper_capabilities.usb_version == '3' category_id: com.canonical.plainbox::usb id: usb3/zapper-usb-insert-{{ port_alias }} +template-id: usb3/zapper-usb-insert-port_alias template-engine: jinja2 _summary: Zapper-driven USB 3.0 insertion test on port {{ port_alias }} requires: usb.usb3 == 'supported' @@ -50,6 +52,7 @@ template-resource: zapper_capabilities template-filter: zapper_capabilities.capability == 'USB hotplug' and zapper_capabilities.usb_version == '2' category_id: com.canonical.plainbox::usb id: usb/zapper-usb-remove-{{ port_alias }} +template-id: usb/zapper-usb-remove-port_alias template-engine: jinja2 _summary: Zapper-driven USB removal test on port {{ port_alias }} requires: usb.usb2 == 'supported' @@ -69,6 +72,7 @@ template-resource: zapper_capabilities template-filter: zapper_capabilities.capability == 'USB hotplug' and zapper_capabilities.usb_version == '3' category_id: com.canonical.plainbox::usb id: usb3/zapper-usb-remove-{{ port_alias }} +template-id: usb3/zapper-usb-remove-port_alias template-engine: jinja2 _summary: Zapper-driven USB 3.0 removal test on port {{ port_alias }} requires: usb.usb3 == 'supported' diff --git a/providers/docker/units/docker.pxu b/providers/docker/units/docker.pxu index 2c8f3e691..fa03f3499 100644 --- a/providers/docker/units/docker.pxu +++ b/providers/docker/units/docker.pxu @@ -56,6 +56,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/run_{arch} +template-id: docker/run_arch user: root category_id: docker requires: executable.name == 'docker' @@ -67,6 +68,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/interative_{arch} +template-id: docker/interative_arch user: root category_id: docker requires: executable.name == 'docker' @@ -78,6 +80,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/diff_{arch} +template-id: docker/diff_arch user: root category_id: docker requires: executable.name == 'docker' @@ -93,6 +96,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/copy_{arch} +template-id: docker/copy_arch user: root category_id: docker requires: executable.name == 'docker' @@ -112,6 +116,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/inspect_{arch} +template-id: docker/inspect_arch user: root category_id: docker requires: executable.name == 'docker' @@ -130,6 +135,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/kill_{arch} +template-id: docker/kill_arch user: root category_id: docker requires: executable.name == 'docker' @@ -147,6 +153,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/start-stop_{arch} +template-id: docker/start-stop_arch user: root category_id: docker requires: executable.name == 'docker' @@ -166,6 +173,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/build-single_{arch} +template-id: docker/build-single_arch user: root category_id: docker requires: executable.name == 'docker' @@ -188,6 +196,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/export-and-import_{arch} +template-id: docker/export-and-import_arch user: root category_id: docker requires: executable.name == 'docker' @@ -207,6 +216,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/commit_{arch} +template-id: docker/commit_arch user: root category_id: docker requires: executable.name == 'docker' @@ -226,6 +236,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/save-and-load_{arch} +template-id: docker/save-and-load_arch user: root category_id: docker requires: executable.name == 'docker' @@ -242,6 +253,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/compose-single_{arch} +template-id: docker/compose-single_arch user: root category_id: docker requires: executable.name == 'docker' @@ -268,6 +280,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/compose-and-basic_{arch} +template-id: docker/compose-and-basic_arch user: root category_id: docker requires: executable.name == 'docker' @@ -309,6 +322,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/deploy-registry_{arch} +template-id: docker/deploy-registry_arch user: root category_id: docker requires: @@ -339,6 +353,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/restart-on-failure_{arch} +template-id: docker/restart-on-failure_arch user: root category_id: docker requires: executable.name == 'docker' @@ -366,6 +381,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/restart-always_{arch} +template-id: docker/restart-always_arch user: root category_id: docker requires: executable.name == 'docker' @@ -391,6 +407,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/update_{arch} +template-id: docker/update_arch user: root category_id: docker requires: executable.name == 'docker' @@ -410,6 +427,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/compose-restart_{arch} +template-id: docker/compose-restart_arch user: root category_id: docker requires: executable.name == 'docker' @@ -438,6 +456,7 @@ unit: template template-resource: docker_resource template-unit: job id: docker/edgex_compose_{arch} +template-id: docker/edgex_compose_arch user: root category_id: docker requires: executable.name == 'docker' diff --git a/providers/resource/jobs/resource.pxu b/providers/resource/jobs/resource.pxu index 4fe72bb8d..e2a6aa23d 100644 --- a/providers/resource/jobs/resource.pxu +++ b/providers/resource/jobs/resource.pxu @@ -195,6 +195,7 @@ unit: template template-resource: device template-filter: device.category == 'CDROM' id: optical_drive_{name} +template-id: optical_drive_name plugin: resource category_id: information_gathering command: optical_resource.py /dev/{name} From 1cc36a865ee2db80e9aecc47bf84245fcc75c5ae Mon Sep 17 00:00:00 2001 From: Isaac Yang <47034756+seankingyang@users.noreply.github.com> Date: Wed, 3 Apr 2024 23:09:22 +0800 Subject: [PATCH 24/26] Correct the alsa_info user (BugFix) (#1143) Correct the alsa_info user --- providers/base/units/audio/jobs.pxu | 1 + 1 file changed, 1 insertion(+) diff --git a/providers/base/units/audio/jobs.pxu b/providers/base/units/audio/jobs.pxu index 992cc68fa..30dab162f 100644 --- a/providers/base/units/audio/jobs.pxu +++ b/providers/base/units/audio/jobs.pxu @@ -496,6 +496,7 @@ category_id: com.canonical.plainbox::audio id: audio/alsa_info_collect estimated_duration: 2.0 command: alsa_info --no-dialog --no-upload --output "${PLAINBOX_SESSION_SHARE}"/alsa_info.log +user: root _purpose: Collect audio-related system information. This data can be used to simulate this computer's audio subsystem and perform more detailed tests From 51710bbbb8ecce177604841e8f2b8ffa603a294c Mon Sep 17 00:00:00 2001 From: Isaac Yang <47034756+seankingyang@users.noreply.github.com> Date: Wed, 3 Apr 2024 23:18:04 +0800 Subject: [PATCH 25/26] Correct desktop 2404 suspend cycles plan (BugFix) (#1133) Correct desktop 2404 suspend cycles plan --- .../certification-client/units/client-cert-desktop-24-04.pxu | 2 +- .../units/client-cert-odm-desktop-24-04.pxu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/certification-client/units/client-cert-desktop-24-04.pxu b/providers/certification-client/units/client-cert-desktop-24-04.pxu index 0e3eb2a91..b33b5b26e 100644 --- a/providers/certification-client/units/client-cert-desktop-24-04.pxu +++ b/providers/certification-client/units/client-cert-desktop-24-04.pxu @@ -172,6 +172,6 @@ nested_part: stress-ng-cert-automated stress-iperf3-automated #stress-cert-full - stress-suspend-30-cycles-with-reboots-automated + suspend-cycles-stress-test stress-warmboot-coldboot-automated stress-pm-graph diff --git a/providers/certification-client/units/client-cert-odm-desktop-24-04.pxu b/providers/certification-client/units/client-cert-odm-desktop-24-04.pxu index 03bf2f8af..0e4062cec 100644 --- a/providers/certification-client/units/client-cert-odm-desktop-24-04.pxu +++ b/providers/certification-client/units/client-cert-odm-desktop-24-04.pxu @@ -172,7 +172,7 @@ nested_part: stress-iperf3-automated warm-boot-stress-test cold-boot-stress-test - suspend-stress-test + suspend-cycles-stress-test stress-ng-cert-automated tpm-cert-automated info-attachment-cert-full From 4c58a1438541a0c838f2ad4d6a954c5fe339ab86 Mon Sep 17 00:00:00 2001 From: Isaac Yang <47034756+seankingyang@users.noreply.github.com> Date: Wed, 3 Apr 2024 23:23:26 +0800 Subject: [PATCH 26/26] Retire hwclock (BugFix) (#1134) Retire hwclock --- providers/base/units/power-management/jobs.pxu | 16 ++++++++++++++-- providers/base/units/rtc/jobs.pxu | 15 +++++++-------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/providers/base/units/power-management/jobs.pxu b/providers/base/units/power-management/jobs.pxu index a73b4129e..63949c9c9 100644 --- a/providers/base/units/power-management/jobs.pxu +++ b/providers/base/units/power-management/jobs.pxu @@ -188,10 +188,22 @@ id: power-management/rtc flags: also-after-suspend requires: rtc.state == 'supported' - executable.name == 'hwclock' cpuinfo.other != 'emulated by qemu' user: root -command: hwclock -r +environ: RTC_DEVICE_FILE +command: + if [[ -n "$RTC_DEVICE_FILE" ]]; then + rtc_path="/sys/class/rtc/${RTC_DEVICE_FILE/#\/dev\/}" + else + rtc_path="/sys/class/rtc/rtc0" + fi + if [[ -f "${rtc_path}/since_epoch" ]]; then + rtc_time=$(cat "${rtc_path}/since_epoch") + echo "RTC time: ${rtc_time} seconds since epoch." + else + echo "RTC time information not available." + exit 1 + fi estimated_duration: 0.02 _summary: Test that RTC functions properly (if present) _description: diff --git a/providers/base/units/rtc/jobs.pxu b/providers/base/units/rtc/jobs.pxu index 472929407..c27c23c21 100644 --- a/providers/base/units/rtc/jobs.pxu +++ b/providers/base/units/rtc/jobs.pxu @@ -84,19 +84,18 @@ plugin: shell user: root category_id: rtc_category estimated_duration: 5 +environ: command: - rtctime=$(date +"%s" -d "$( hwclock --rtc /dev/{rtc} -u)") - rtc_date=$(date -d "@$rtctime") - systime=$(date +"%s") - systime_date=$(date -d "@$systime") - result=$(("$systime" - "$rtctime")) + rtc_time=$(cat "/sys/class/rtc/{rtc}/since_epoch") + sys_time=$(date +"%s") + result=$(("$sys_time" - "$rtc_time")) if [[ "$result" -le "5" ]]; then echo "{rtc} Clock synchronized with System Clock" - echo "$rtc_date" + echo "RTC clock= $rtc_time" else echo "{rtc} Clock not synchronized with System Clock" - echo "System clock=" "$systime_date" - echo "RTC clock=" "$rtc_date" + echo "System clock= $sys_time" + echo "RTC clock= $rtc_time" exit 1 fi flags: also-after-suspend