From a6f590d9432c39b16d3e48e1d2d4e5b5a291f1f7 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Sat, 3 Aug 2024 22:12:17 +0200 Subject: [PATCH 1/5] Add manifest for interactive LED jobs Instead of asking the tester to manually skip tests when a device does not have a given LED (for instance no Microphone Mute LED), this commit introduces manifest entries for all the related LED jobs. This way, the tester defines what LEDs the device has before running the tests, and tests that are not required due to a lack of specific LED are automatically skipped. --- providers/base/units/camera/jobs.pxu | 12 ++--- providers/base/units/camera/manifest.pxu | 6 +++ providers/base/units/led/jobs.pxu | 30 +++++++++++-- providers/base/units/led/manifest.pxu | 56 +++++++++++++++++++++++- 4 files changed, 95 insertions(+), 9 deletions(-) diff --git a/providers/base/units/camera/jobs.pxu b/providers/base/units/camera/jobs.pxu index 95689dcee9..0c1c42bf66 100644 --- a/providers/base/units/camera/jobs.pxu +++ b/providers/base/units/camera/jobs.pxu @@ -54,16 +54,18 @@ id: camera/led_{name} template-id: camera/led_name _summary: Webcam LED test for {product_slug} estimated_duration: 120.0 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_camera == 'True' depends: camera/detect command: camera_test.py led -d /dev/{name} -_description: - PURPOSE: +_purpose: This test will check that the {product_slug} camera LED works - STEPS: +_steps: 1. Select Test to activate camera 2. Camera LED should light for a few seconds - VERIFICATION: +_verification: Did the camera LED light? flags: also-after-suspend @@ -235,4 +237,4 @@ _description: a gstreamer pipeline is used to capture an image of the display. An attempt to decode a QRcode in the image is then made and data compared against the random string. -user: root \ No newline at end of file +user: root diff --git a/providers/base/units/camera/manifest.pxu b/providers/base/units/camera/manifest.pxu index ed79336bee..2af71a95dc 100644 --- a/providers/base/units/camera/manifest.pxu +++ b/providers/base/units/camera/manifest.pxu @@ -7,3 +7,9 @@ unit: manifest entry id: has_camera _name: Camera/Capture Device value-type: bool + +unit: manifest entry +id: has_led_camera +_name: Camera +_prompt: Does this machine have the following LED indicators? +value-type: bool diff --git a/providers/base/units/led/jobs.pxu b/providers/base/units/led/jobs.pxu index f55358468b..d473430c9f 100644 --- a/providers/base/units/led/jobs.pxu +++ b/providers/base/units/led/jobs.pxu @@ -10,6 +10,9 @@ _verification: plugin: manual category_id: led estimated_duration: 15.0 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_power == 'True' id: led/power-blink-suspend _summary: Power LED behavior when suspended @@ -97,6 +100,9 @@ category_id: led id: led/numeric-keypad flags: also-after-suspend estimated_duration: 30.0 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_numeric_keypad == 'True' command: keyboard_test.py _description: _purpose: @@ -114,6 +120,9 @@ plugin: manual category_id: led id: led/caps-lock flags: also-after-suspend +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_caps_lock == 'True' estimated_duration: 30.0 _description: _purpose: @@ -178,6 +187,9 @@ estimated_duration: 180 plugin: manual category_id: led id: led/touchpad +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_touchpad == 'True' estimated_duration: 30.0 _description: _purpose: @@ -195,6 +207,9 @@ plugin: manual category_id: led id: led/wireless estimated_duration: 120.0 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_wireless == 'True' _description: _purpose: Wireless (WLAN + Bluetooth) LED verification @@ -214,11 +229,13 @@ category_id: led id: led/mute depends: keys/mute estimated_duration: 30.0 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_audio_mute == 'True' _description: _purpose: Audio Mute LED verification. _steps: - Skip this test if your system does not have a special Audio Mute LED. 1. Press the Mute key twice and observe the Audio LED to determine if it either turned off and on or changed colors. _verification: @@ -230,12 +247,14 @@ plugin: manual category_id: led id: led/microphone-mute estimated_duration: 30.0 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_microphone_mute == 'True' depends: keys/microphone-mute _description: _purpose: Microphone Mute LED verification. _steps: - Skip this test if your system does not have a special Microphone Mute LED. 1. Press the Microphone Mute key twice and observe the Microphone LED to determine if it either turned off and on or changed colors. _verification: @@ -256,16 +275,21 @@ command: echo {0..1024} | tee /dev/ttyS{0..100} &> /dev/null user: root category_id: led estimated_duration: 15 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_serial == 'True' plugin: manual category_id: led id: led/fn estimated_duration: 30.0 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_fn_lock == 'True' flags: also-after-suspend _purpose: This test will test the Fn key LED. _steps: - Skip this test if your system does not have an Fn Lock key. 1. Press the Fn+Fn Lock key to activate/deactivate Fn keys locking. 2. The Fn key LED should be switched on/off every time the key is pressed. _verification: diff --git a/providers/base/units/led/manifest.pxu b/providers/base/units/led/manifest.pxu index dd8ceaef4e..dbf682be87 100644 --- a/providers/base/units/led/manifest.pxu +++ b/providers/base/units/led/manifest.pxu @@ -1,4 +1,58 @@ unit: manifest entry id: has_led_indicator _name: Does device supported LED indicator? -value-type: bool \ No newline at end of file +value-type: bool + +unit: manifest entry +id: has_led_power +_name: Power +_prompt: Does this machine have the following LED indicators? +value-type: bool + +unit: manifest entry +id: has_led_caps_lock +_name: Caps lock +_prompt: Does this machine have the following LED indicators? +value-type: bool + +unit: manifest entry +id: has_led_touchpad +_name: Touchpad +_prompt: Does this machine have the following LED indicators? +value-type: bool + +unit: manifest entry +id: has_led_wireless +_name: Wireless +_prompt: Does this machine have the following LED indicators? +value-type: bool + +unit: manifest entry +id: has_led_audio_mute +_name: Audio mute +_prompt: Does this machine have the following LED indicators? +value-type: bool + +unit: manifest entry +id: has_led_microphone_mute +_name: Microphone mute +_prompt: Does this machine have the following LED indicators? +value-type: bool + +unit: manifest entry +id: has_led_serial +_name: Serial transfer +_prompt: Does this machine have the following LED indicators? +value-type: bool + +unit: manifest entry +id: has_led_fn_lock +_name: Function key lock (Fn lock) +_prompt: Does this machine have the following LED indicators? +value-type: bool + +unit: manifest entry +id: has_led_numeric_keypad +_name: Numeric keypad +_prompt: Does this machine have the following LED indicators? +value-type: bool From fe18e3e324d9c61d443937c1e16ee12a8cc4d9dc Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Sat, 3 Aug 2024 22:15:08 +0200 Subject: [PATCH 2/5] Modify LED manifest used for GPIO/sysfs controlled LEDs jobs The generic "has_led_indicator" manifest entry, which originally came from the CE-OEM provider for IoT testing, is renamed as "has_led_gpio_sysfs" to better reflect the need for IoT projects. It is grouped with other LED-related manifest entries by using the same prompt. --- providers/base/units/led/jobs.pxu | 8 ++++---- providers/base/units/led/manifest.pxu | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/providers/base/units/led/jobs.pxu b/providers/base/units/led/jobs.pxu index d473430c9f..7b5e88694d 100644 --- a/providers/base/units/led/jobs.pxu +++ b/providers/base/units/led/jobs.pxu @@ -326,7 +326,7 @@ estimated_duration: 10 plugin: user-interact-verify user: root imports: from com.canonical.plainbox import manifest -requires: manifest.has_led_indicator == 'True' +requires: manifest.has_led_gpio_sysfs == 'True' flags: also-after-suspend _summary: Check control of {name} LED indicator. _purpose: @@ -379,7 +379,7 @@ user: root flags: also-after-suspend estimated_duration: 10 imports: from com.canonical.plainbox import manifest -requires: manifest.has_led_indicator == 'True' +requires: manifest.has_led_gpio_sysfs == 'True' command: led_control_test.py -n {path} -d 10 @@ -397,7 +397,7 @@ user: root flags: also-after-suspend estimated_duration: 10 imports: from com.canonical.plainbox import manifest -requires: manifest.has_led_indicator == 'True' +requires: manifest.has_led_gpio_sysfs == 'True' command: led_control_test.py -n {path} -d 10 @@ -424,7 +424,7 @@ estimated_duration: 10 plugin: user-interact-verify user: root imports: from com.canonical.plainbox import manifest -requires: manifest.has_led_indicator == 'True' +requires: manifest.has_led_gpio_sysfs == 'True' flags: also-after-suspend _summary: Check control of {name} LED indicator. _purpose: diff --git a/providers/base/units/led/manifest.pxu b/providers/base/units/led/manifest.pxu index dbf682be87..3bf360d1fe 100644 --- a/providers/base/units/led/manifest.pxu +++ b/providers/base/units/led/manifest.pxu @@ -1,6 +1,7 @@ unit: manifest entry -id: has_led_indicator -_name: Does device supported LED indicator? +id: has_led_gpio_sysfs +_name: LEDs controlled via GPIO or sysfs +_prompt: Does this machine have the following LED indicators? value-type: bool unit: manifest entry From ebe6961366865922479e76b757887562b8a1ef83 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Sat, 3 Aug 2024 22:18:00 +0200 Subject: [PATCH 3/5] Add led/wireless to test plans and remove redundant LED jobs led/wlan, led/wlan-disabled and led/bluetooth are all testing a subset of what led/wireless is testing. This commit - removes these jobs - replaces their calls with led/wireless in related test plans --- providers/base/units/led/jobs.pxu | 50 ------------------- providers/base/units/led/test-plan.pxu | 12 ++--- .../units/client-cert-odm-desktop-18-04.pxu | 8 +-- .../units/client-cert-odm-desktop-20-04.pxu | 8 +-- .../units/client-cert-odm-desktop-22-04.pxu | 8 +-- .../units/client-cert-odm-desktop-24-04.pxu | 8 +-- 6 files changed, 13 insertions(+), 81 deletions(-) diff --git a/providers/base/units/led/jobs.pxu b/providers/base/units/led/jobs.pxu index 7b5e88694d..3875a1fef3 100644 --- a/providers/base/units/led/jobs.pxu +++ b/providers/base/units/led/jobs.pxu @@ -134,56 +134,6 @@ _verification: Did the Caps Lock LED light as expected? _summary: Verify the functionality of the Caps Lock LED by pressing the Caps Lock key. -plugin: manual -category_id: led -id: led/wlan -depends: keys/wireless -estimated_duration: 60.0 -_purpose: - WLAN LED verification -_steps: - 1. During the keys/wireless test you should have observed the - wireless LED while turning wireless back on. - 2. WLAN LED should light or change color when wireless is turned on -_verification: - Did the WLAN LED turn on or change color as expected? -_summary: Verify the functionality of the WLAN LED during the keys/wireless test. - -plugin: manual -category_id: led -id: led/wlan-disabled -estimated_duration: 30.0 -depends: keys/wireless -_purpose: - Validate that WLAN LED shuts off when disabled -_steps: - 1. During the keys/wireless test you should have observed the WLAN LED - while performing that test after turning wireless off. - 2. WLAN LED should turn off or change color when wireless is turned off -_verification: - Did the WLAN LED turn off or change color as expected? -_summary: Verify the behavior of the WLAN LED when wireless is disabled. - -id: led/bluetooth -_summary: Bluetooth LED behavior -_purpose: - Check bluetooth LED behavior is correct -_steps: - 1. Run following command to start bluetoothctl console: - sudo bluetoothctl - ***Following steps are run in bluetoothctl console*** - 2. Power on the device: - power on - 3. Power off the device: - power off - 4. Quit bluetoothctl console - quit -_verification: - Bluetooth LED is turned on in step 2, and turned off in step 3. -plugin: manual -category_id: led -estimated_duration: 180 - plugin: manual category_id: led id: led/touchpad diff --git a/providers/base/units/led/test-plan.pxu b/providers/base/units/led/test-plan.pxu index c25e525602..28527c3845 100644 --- a/providers/base/units/led/test-plan.pxu +++ b/providers/base/units/led/test-plan.pxu @@ -5,8 +5,6 @@ _description: LED tests Notes: - led/power-blink-suspend and led/suspend are used later in the power management testplan just after a number of suspend tests. - - led/wireless is redundant given that we have led/wlan and - led/bluetooth already. include: nested_part: com.canonical.certification::led-cert-manual @@ -20,8 +18,6 @@ _description: LED tests Notes: - led/power-blink-suspend and led/suspend are used later in the power management testplan just after a number of suspend tests. - - led/wireless is redundant given that we have led/wlan and - led/bluetooth already. (Manual) include: camera/led_.* certification-status=blocker led/caps-lock certification-status=blocker @@ -30,6 +26,7 @@ include: led/fn certification-status=non-blocker led/mute certification-status=blocker led/microphone-mute certification-status=blocker + led/wireless certification-status=blocker bootstrap_include: device @@ -41,8 +38,6 @@ _description: LED tests Notes: - led/power-blink-suspend and led/suspend are used later in the power management testplan just after a number of suspend tests. - - led/wireless is redundant given that we have led/wlan and - led/bluetooth already. (Automated) include: @@ -58,6 +53,7 @@ include: after-suspend-led/mute certification-status=blocker after-suspend-led/microphone-mute certification-status=blocker after-suspend-led/fn certification-status=non-blocker + after-suspend-led/wireless certification-status=blocker bootstrap_include: device @@ -73,6 +69,7 @@ include: led/power certification-status=blocker led/mute certification-status=blocker led/microphone-mute certification-status=blocker + led/wireless certification-status=blocker bootstrap_include: device @@ -88,6 +85,7 @@ include: suspend/led_after_suspend/power certification-status=blocker after-suspend-led/mute certification-status=blocker after-suspend-led/microphone-mute certification-status=blocker + after-suspend-led/wireless certification-status=blocker bootstrap_include: device @@ -108,7 +106,7 @@ _description: Manual LED tests for IoT devices include: led/power led/power-blink-suspend - led/bluetooth + led/wireless led/serial led/fn led/sysfs_led_brightness_on_.* diff --git a/providers/certification-client/units/client-cert-odm-desktop-18-04.pxu b/providers/certification-client/units/client-cert-odm-desktop-18-04.pxu index b434395481..0a1893a9ea 100644 --- a/providers/certification-client/units/client-cert-odm-desktop-18-04.pxu +++ b/providers/certification-client/units/client-cert-odm-desktop-18-04.pxu @@ -83,9 +83,7 @@ exclude: com.canonical.certification::after-suspend-manual-keys/keyboard-backlight com.canonical.certification::after-suspend-manual-keys/microphone-mute com.canonical.certification::after-suspend-manual-keys/fn-lock - com.canonical.certification::led/bluetooth - com.canonical.certification::led/wlan - com.canonical.certification::led/wlan-disabled + com.canonical.certification::led/wireless com.canonical.certification::led/fn com.canonical.certification::led/mute com.canonical.certification::led/microphone-mute @@ -194,9 +192,7 @@ exclude: com.canonical.certification::after-suspend-manual-keys/keyboard-backlight com.canonical.certification::after-suspend-manual-keys/microphone-mute com.canonical.certification::after-suspend-manual-keys/fn-lock - com.canonical.certification::led/bluetooth - com.canonical.certification::led/wlan - com.canonical.certification::led/wlan-disabled + com.canonical.certification::led/wireless com.canonical.certification::led/fn com.canonical.certification::led/mute com.canonical.certification::led/microphone-mute diff --git a/providers/certification-client/units/client-cert-odm-desktop-20-04.pxu b/providers/certification-client/units/client-cert-odm-desktop-20-04.pxu index bb559a3bbd..1f8951feb3 100644 --- a/providers/certification-client/units/client-cert-odm-desktop-20-04.pxu +++ b/providers/certification-client/units/client-cert-odm-desktop-20-04.pxu @@ -85,9 +85,7 @@ exclude: com.canonical.certification::after-suspend-manual-keys/keyboard-backlight com.canonical.certification::after-suspend-manual-keys/microphone-mute com.canonical.certification::after-suspend-manual-keys/fn-lock - com.canonical.certification::led/bluetooth - com.canonical.certification::led/wlan - com.canonical.certification::led/wlan-disabled + com.canonical.certification::led/wireless com.canonical.certification::led/fn com.canonical.certification::led/mute com.canonical.certification::led/microphone-mute @@ -198,9 +196,7 @@ exclude: com.canonical.certification::after-suspend-manual-keys/keyboard-backlight com.canonical.certification::after-suspend-manual-keys/microphone-mute com.canonical.certification::after-suspend-manual-keys/fn-lock - com.canonical.certification::led/bluetooth - com.canonical.certification::led/wlan - com.canonical.certification::led/wlan-disabled + com.canonical.certification::led/wireless com.canonical.certification::led/fn com.canonical.certification::led/mute com.canonical.certification::led/microphone-mute diff --git a/providers/certification-client/units/client-cert-odm-desktop-22-04.pxu b/providers/certification-client/units/client-cert-odm-desktop-22-04.pxu index bbc35d8872..bbfd06e400 100644 --- a/providers/certification-client/units/client-cert-odm-desktop-22-04.pxu +++ b/providers/certification-client/units/client-cert-odm-desktop-22-04.pxu @@ -86,9 +86,7 @@ exclude: com.canonical.certification::after-suspend-manual-keys/keyboard-backlight com.canonical.certification::after-suspend-manual-keys/microphone-mute com.canonical.certification::after-suspend-manual-keys/fn-lock - com.canonical.certification::led/bluetooth - com.canonical.certification::led/wlan - com.canonical.certification::led/wlan-disabled + com.canonical.certification::led/wireless com.canonical.certification::led/fn com.canonical.certification::led/mute com.canonical.certification::led/microphone-mute @@ -199,9 +197,7 @@ exclude: com.canonical.certification::after-suspend-manual-keys/keyboard-backlight com.canonical.certification::after-suspend-manual-keys/microphone-mute com.canonical.certification::after-suspend-manual-keys/fn-lock - com.canonical.certification::led/bluetooth - com.canonical.certification::led/wlan - com.canonical.certification::led/wlan-disabled + com.canonical.certification::led/wireless com.canonical.certification::led/fn com.canonical.certification::led/mute com.canonical.certification::led/microphone-mute 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 f7d609850f..960d74257c 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 @@ -82,9 +82,7 @@ exclude: com.canonical.certification::after-suspend-manual-keys/keyboard-backlight com.canonical.certification::after-suspend-manual-keys/microphone-mute com.canonical.certification::after-suspend-manual-keys/fn-lock - com.canonical.certification::led/bluetooth - com.canonical.certification::led/wlan - com.canonical.certification::led/wlan-disabled + com.canonical.certification::led/wireless com.canonical.certification::led/fn com.canonical.certification::led/mute com.canonical.certification::led/microphone-mute @@ -191,9 +189,7 @@ exclude: com.canonical.certification::after-suspend-manual-keys/keyboard-backlight com.canonical.certification::after-suspend-manual-keys/microphone-mute com.canonical.certification::after-suspend-manual-keys/fn-lock - com.canonical.certification::led/bluetooth - com.canonical.certification::led/wlan - com.canonical.certification::led/wlan-disabled + com.canonical.certification::led/wireless com.canonical.certification::led/fn com.canonical.certification::led/mute com.canonical.certification::led/microphone-mute From d5bbe5f64b16698396e4fc69413a8563d8c58b64 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Thu, 22 Aug 2024 11:34:38 +0200 Subject: [PATCH 4/5] Add manifest for suspend LED Based on feedback from QA team, add a manifest for the suspend LED and use it in the led/suspend job. --- providers/base/units/led/jobs.pxu | 4 +++- providers/base/units/led/manifest.pxu | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/providers/base/units/led/jobs.pxu b/providers/base/units/led/jobs.pxu index 3875a1fef3..211c18cc51 100644 --- a/providers/base/units/led/jobs.pxu +++ b/providers/base/units/led/jobs.pxu @@ -31,11 +31,13 @@ plugin: manual category_id: led id: led/suspend estimated_duration: 30.0 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_suspend == 'True' depends: suspend/suspend_advanced_auto _purpose: Suspend LED verification. _steps: - Skip this test if your system does not have a dedicated Suspend LED. 1. The Suspend LED should blink or change color while the system is suspended _verification: Did the Suspend LED blink or change color while the system was suspended? diff --git a/providers/base/units/led/manifest.pxu b/providers/base/units/led/manifest.pxu index 3bf360d1fe..4e11653a46 100644 --- a/providers/base/units/led/manifest.pxu +++ b/providers/base/units/led/manifest.pxu @@ -10,6 +10,12 @@ _name: Power _prompt: Does this machine have the following LED indicators? value-type: bool +unit: manifest entry +id: has_led_suspend +_name: Suspend +_prompt: Does this machine have the following LED indicators? +value-type: bool + unit: manifest entry id: has_led_caps_lock _name: Caps lock From cea64392eab06e929311c7badaa95e54f383b34e Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Thu, 22 Aug 2024 11:39:49 +0200 Subject: [PATCH 5/5] Make sure device has a power LED before running the led/power-blink test --- providers/base/units/led/jobs.pxu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/base/units/led/jobs.pxu b/providers/base/units/led/jobs.pxu index 211c18cc51..78cf3d0483 100644 --- a/providers/base/units/led/jobs.pxu +++ b/providers/base/units/led/jobs.pxu @@ -26,6 +26,9 @@ _verification: plugin: manual category_id: led estimated_duration: 180 +imports: from com.canonical.plainbox import manifest +requires: + manifest.has_led_power == 'True' plugin: manual category_id: led