diff options
| -rw-r--r-- | units/keys/jobs.pxu | 24 | ||||
| -rw-r--r-- | units/keys/test-plan.pxu | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/units/keys/jobs.pxu b/units/keys/jobs.pxu index 8cef3e7..3b42f3e 100644 --- a/units/keys/jobs.pxu +++ b/units/keys/jobs.pxu @@ -290,6 +290,30 @@ _steps: _verification: Did the power management prompt pop up when press power button? +plugin: user-interact +category_id: com.canonical.plainbox::keys +_summary: + Check power button event filtering +id: keys/power-button-event +estimated_duration: 15.0 +requires: + package.name == 'acpid' + package.name == 'libglib2.0-bin' +command: + action=$(gsettings get org.gnome.settings-daemon.plugins.power power-button-action) + gsettings set org.gnome.settings-daemon.plugins.power power-button-action nothing + acpi_listen -t 10 | tee "$PLAINBOX_SESSION_SHARE"/power-button-event.log + gsettings set org.gnome.settings-daemon.plugins.power power-button-action "$action" + [[ $(grep -c "PBTN.*00000080" "$PLAINBOX_SESSION_SHARE"/power-button-event.log) -eq 1 ]] || \ + [[ $(grep -c "PWRB.*00000080" "$PLAINBOX_SESSION_SHARE"/power-button-event.log) -eq 1 ]] +purpose: + This test will check if power button event has reported correctly, the listener will + wait for 10 seconds. +steps: + 1. Single press and release the power button in 10 seconds, some platforms might need long-press + to trigger the PBTN or PWRB event + 2. Check the number of output PBTN/PWRB event + plugin: manual category_id: com.canonical.plainbox::keys id: keys/fn-lock diff --git a/units/keys/test-plan.pxu b/units/keys/test-plan.pxu index d4d2fe2..ffc111c 100644 --- a/units/keys/test-plan.pxu +++ b/units/keys/test-plan.pxu @@ -25,6 +25,7 @@ include: keys/keyboard-backlight certification-status=blocker keys/microphone-mute certification-status=blocker keys/power-button certification-status=blocker + keys/power-button-event certification-status=blocker keys/fn-lock certification-status=non-blocker id: keys-cert-automated @@ -72,6 +73,7 @@ include: keys/keyboard-backlight certification-status=blocker keys/microphone-mute certification-status=blocker keys/power-button certification-status=blocker + keys/power-button-event certification-status=blocker id: after-suspend-keys-cert-blockers unit: test plan |
