diff options
author | Jonathan Cave <jonathan.cave@canonical.com> | 2019-08-20 17:01:41 +0100 |
---|---|---|
committer | Jonathan Cave <jonathan.cave@canonical.com> | 2019-08-21 11:04:44 +0100 |
commit | aff7b7c0917cf1288eed0ac2cb6bd67f0d3dd202 (patch) | |
tree | 4441c17322f105c3af723ffe3fe9a74ffd731734 /units | |
parent | 4a95aaaff9caa4651580d39a4ef5df02bde1218d (diff) |
power-management: import from p-p-snappy
Diffstat (limited to 'units')
-rw-r--r-- | units/power-management/category.pxu | 3 | ||||
-rw-r--r-- | units/power-management/jobs.pxu | 67 | ||||
-rw-r--r-- | units/power-management/test-plan.pxu | 27 |
3 files changed, 97 insertions, 0 deletions
diff --git a/units/power-management/category.pxu b/units/power-management/category.pxu new file mode 100644 index 0000000..1487d92 --- /dev/null +++ b/units/power-management/category.pxu @@ -0,0 +1,3 @@ +unit: category +id: power +_name: Power and Power Management diff --git a/units/power-management/jobs.pxu b/units/power-management/jobs.pxu index 9f8f62e..23a3054 100644 --- a/units/power-management/jobs.pxu +++ b/units/power-management/jobs.pxu @@ -251,3 +251,70 @@ _description: successfully otherwise, Select 'Fail' to indicate there was a problem. VERIFICATION: Did the system shutdown and boot correctly? + +id: power-management/poweroff-manual +_summary: System can be powered off +_purpose: + Check system can poweroff successfully +_steps: + 1. Execute following command: + sudo poweroff +_verification: + System poweroff successfully +plugin: manual +category_id: power +estimated_duration: 300 + +id: power-management/reboot-manual +_summary: System can be rebooted +_purpose: + Check system can reboot +_steps: + 1. Execute following command: + sudo reboot +_verification: + System reboot into system successfully +plugin: manual +category_id: power +estimated_duration: 300 + +id: power-management/warm-reboot +category_id: power +_summary: Warm reboot +_description: This tests reboots the system using the `reboot` command +unit: job +plugin: shell +command: + dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Reboot" boolean:true +user: root +flags: preserve-locale noreturn autorestart +estimated_duration: 180.0 + +id: power-management/cold-reboot +category_id: power +_summary: Cold reboot +_description: This tests powers off the system and then powers it on using RTC +unit: job +plugin: shell +requires: rtc.state == 'supported' +command: + rtcwake --mode no -s 120 + sleep 5 + rtcwake -m show + sleep 5 + dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true +user: root +flags: preserve-locale noreturn autorestart +estimated_duration: 300 + +unit: template +template-resource: model_assertion +template-unit: job +plugin: shell +category_id: power +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) +command: + zgrep 'CONFIG_NO_HZ=y' /snap/{kernel}/current/config-`uname -r` >/dev/null 2>&1 || ( echo "WARNING: Tickless Idle is NOT set" >&2 && exit 1 ) diff --git a/units/power-management/test-plan.pxu b/units/power-management/test-plan.pxu index 2cd1a76..bb782c1 100644 --- a/units/power-management/test-plan.pxu +++ b/units/power-management/test-plan.pxu @@ -57,3 +57,30 @@ include: power-management/poweroff-log-attach power-management/reboot certification-status=blocker power-management/reboot-log-attach + +id: power-full +unit: test plan +_name: Power tests +_description: QA power tests for Snappy Ubuntu Core devices +include: +nested_part: + power-manual + # power-automated is not part of the -full test plan as it silently + # autorestarts checkbox upon reboots thanks to a systemd unit on core. + # This could lead to multiple jobs being skipped w/o any notice + +id: power-automated +unit: test plan +_name: Automated power tests +_description: Automated power tests for Snappy Ubuntu Core devices +include: + power-management/warm-reboot + power-management/cold-reboot + +id: power-manual +unit: test plan +_name: Manual power tests +_description: Manual power tests for Snappy Ubuntu Core devices +include: + power-management/poweroff-manual + power-management/reboot-manual |