summaryrefslogtreecommitdiff
path: root/units/power-management
diff options
authorSylvain Pineau <sylvain.pineau@canonical.com>2017-09-18 20:56:16 +0200
committerSylvain Pineau <sylvain.pineau@canonical.com>2017-09-18 20:56:16 +0200
commit06ebc0457992bddfca74c3decc554d70ffdd310d (patch)
treeddc2038690c7e0bbd7146b3375681b919e91ab95 /units/power-management
parenta2cbc59e55ed21f755f45a5db2df5695a2220315 (diff)
Move all jobs definition files into pxu units
Diffstat (limited to 'units/power-management')
-rw-r--r--units/power-management/jobs.pxu257
1 files changed, 257 insertions, 0 deletions
diff --git a/units/power-management/jobs.pxu b/units/power-management/jobs.pxu
new file mode 100644
index 0000000..2521f81
--- /dev/null
+++ b/units/power-management/jobs.pxu
@@ -0,0 +1,257 @@
+plugin: manual
+category_id: com.canonical.plainbox::power-management
+id: power-management/shutdown-boot
+estimated_duration: 300.0
+_description:
+ PURPOSE:
+ This test will check your system shutdown/booting cycle.
+ STEPS:
+ 1. Shutdown your machine.
+ 2. Boot your machine.
+ 3. Repeat steps 1 and 2 at least 5 times.
+ VERIFICATION:
+ Did the system shutdown and rebooted correctly?
+
+plugin: shell
+category_id: com.canonical.plainbox::power-management
+id: power-management/fwts_wakealarm
+environ: PLAINBOX_SESSION_SHARE
+estimated_duration: 25.0
+user: root
+_description: Test ACPI Wakealarm (fwts wakealarm)
+requires:
+ package.name == 'fwts' or executable.name == 'fwts'
+command: checkbox-support-fwts_test -f aborted -t wakealarm -l $PLAINBOX_SESSION_SHARE/fwts-wakealarm.log
+
+plugin: attachment
+category_id: com.canonical.plainbox::power-management
+id: power-management/fwts_wakealarm-log-attach
+depends: power-management/fwts_wakealarm
+estimated_duration: 2.0
+_description: Attach log from fwts wakealarm test
+command: [ -e ${PLAINBOX_SESSION_SHARE}/fwts-wakealarm.log ] && cat ${PLAINBOX_SESSION_SHARE}/fwts-wakealarm.log
+
+plugin: shell
+category_id: com.canonical.plainbox::power-management
+id: power-management/poweroff
+estimated_duration: 120.0
+depends: power-management/fwts_wakealarm
+user: root
+environ: PLAINBOX_SESSION_SHARE
+requires:
+ package.name == 'fwts'
+command: pm_test --silent --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox poweroff --log-level=debug --log-dir=$PLAINBOX_SESSION_SHARE
+flags: noreturn autorestart
+_description:
+ This test will check the system's ability to power-off and boot.
+
+plugin: attachment
+category_id: com.canonical.plainbox::power-management
+id: power-management/poweroff-log-attach
+estimated_duration: 1.0
+command:
+ set -o pipefail
+ tar cvz $PLAINBOX_SESSION_SHARE/*poweroff.1.log | base64
+_description:
+ This will attach any logs from the power-management/poweroff test to the results.
+
+plugin: shell
+category_id: com.canonical.plainbox::power-management
+id: power-management/reboot
+estimated_duration: 120.0
+user: root
+environ: PLAINBOX_SESSION_SHARE
+requires:
+ package.name == 'fwts'
+command: pm_test --silent --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox reboot --log-level=debug --log-dir=$PLAINBOX_SESSION_SHARE
+flags: noreturn autorestart
+_description:
+ This test will check the system's ability to reboot cleanly.
+
+plugin: attachment
+category_id: com.canonical.plainbox::power-management
+id: power-management/reboot-log-attach
+estimated_duration: 1.0
+command:
+ set -o pipefail
+ tar cvz $PLAINBOX_SESSION_SHARE/*reboot.1.log | base64
+_description:
+ This will attach any logs from the power-management/reboot test to the results.
+
+plugin: manual
+category_id: com.canonical.plainbox::power-management
+id: power-management/lid
+estimated_duration: 120.0
+requires: dmi.product in ['Notebook','Laptop','Portable']
+_description:
+ PURPOSE:
+ This test will check your lid sensors.
+ STEPS:
+ 1. Close your laptop lid.
+ VERIFICATION:
+ Does closing your laptop lid cause your system to suspend?
+
+plugin: user-interact-verify
+category_id: com.canonical.plainbox::power-management
+id: power-management/lid_close
+estimated_duration: 60.0
+requires: device.product == 'Lid Switch'
+command:
+ for i in `seq 20`; do
+ state=`cat /proc/acpi/button/lid/*/state | awk '{print $2}'`
+ [ "$state" = "closed" ] && exit 0 || sleep 0.5
+ done
+ exit 1
+_description:
+ PURPOSE:
+ This test will check your lid sensors
+ STEPS:
+ 1. Press "Enter".
+ 2. Close and open the lid.
+ VERIFICATION:
+ Did the screen turn off while the lid was closed?
+
+plugin: user-interact-verify
+category_id: com.canonical.plainbox::power-management
+id: power-management/lid_open
+estimated_duration: 60.0
+requires: device.product == 'Lid Switch'
+command:
+ for i in `seq 20`; do
+ state=`cat /proc/acpi/button/lid/*/state | awk '{print $2}'`
+ [ "$state" = "open" ] && exit 0 || sleep 0.5
+ done
+ exit 1
+_description:
+ PURPOSE:
+ This test will check your lid sensors.
+ STEPS:
+ 1. Press "Enter".
+ 2. Close the lid.
+ 3. Wait 5 seconds with the lid closed.
+ 4. Open the lid.
+ VERIFICATION:
+ Did the system resume when the lid was opened?
+
+plugin: shell
+category_id: com.canonical.plainbox::power-management
+id: power-management/rtc
+requires:
+ rtc.state == 'supported'
+ executable.name == 'hwclock'
+ cpuinfo.other != 'emulated by qemu'
+user: root
+command: hwclock -r
+estimated_duration: 0.02
+_summary: Test that RTC functions properly (if present)
+_description:
+ Verify that the Real-time clock (RTC) device functions properly, if present.
+
+plugin: shell
+category_id: com.canonical.plainbox::power-management
+id: power-management/tickless_idle
+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' /boot/config-`uname -r` >/dev/null 2>&1 || ( echo "WARNING: Tickless Idle is NOT set" >&2 && exit 1 )
+
+plugin: manual
+category_id: com.canonical.plainbox::power-management
+id: power-management/unplug_ac
+estimated_duration: 30.0
+_description:
+ PURPOSE:
+ This test will ensure that the AC is unplugged for the battery drain tests to run.
+ STEPS:
+ 1. Unplug laptop from AC.
+ VERIFICATION:
+ Was the laptop unplugged from AC?
+
+plugin: shell
+category_id: com.canonical.plainbox::power-management
+id: power-management/battery_drain_idle
+estimated_duration: 90.0
+requires: package.name == 'upower'
+depends: power-management/unplug_ac
+_description: Checks the battery drain during idle. Reports time and capacity until empty.
+command:
+ battery_test -t 90 --idle
+
+plugin: shell
+category_id: com.canonical.plainbox::power-management
+id: power-management/battery_drain_movie
+estimated_duration: 90.0
+requires:
+ package.name == 'upower'
+depends: power-management/unplug_ac
+_description: Checks the battery drain while watching a movie. Reports time and capacity until empty. Requires MOVIE_VAR to be set.
+command:
+ battery_test -t 90 --movie $MOVIE_VAR
+
+plugin: shell
+category_id: com.canonical.plainbox::power-management
+id: power-management/battery_drain_sleep
+estimated_duration: 140.0
+user: root
+requires:
+ package.name == 'upower'
+ package.name == 'fwts'
+depends: power-management/unplug_ac
+_description: Checks the battery drain during suspend. Reports time and capacity until empty.
+command:
+ battery_test -t 120 --sleep
+
+plugin: manual
+category_id: com.canonical.plainbox::power-management
+id: power-management/plug_ac
+estimated_duration: 30.0
+depends: power-management/battery_drain_idle power-management/battery_drain_movie power-management/battery_drain_sleep
+_description:
+ PURPOSE:
+ This test will ensure that the AC is plugged back in after the battery tests.
+ STEPS:
+ 1. Plug laptop into AC.
+ VERIFICATION:
+ Was the laptop plugged into AC?
+
+plugin: user-interact-verify
+category_id: com.canonical.plainbox::power-management
+id: power-management/reboot_manual
+estimated_duration: 120.0
+user:root
+command: shutdown -r now
+_description:
+ PURPOSE:
+ This test will verify that your system can successfully reboot.
+ STEPS:
+ 1. Press 'Enter' to initiate a system reboot.
+ 2. When the grub boot menu is displayed, boot into Ubuntu (Or allow the
+ system to automatically boot on its own).
+ 3. Once the system has restarted, log in and restart checkbox-certification-server.
+ 4. Select 'Re-Run' to return to this test.
+ 5. Select Pass to indicate the test has passed if the system rebooted
+ successfully, otherwise, select 'Fail' to indicate there was a problem.
+ VERIFICATION:
+ Did the system reboot correctly?
+
+plugin: user-interact-verify
+category_id: com.canonical.plainbox::power-management
+id: power-management/shutdown_manual
+estimated_duration: 120.0
+user: root
+command: shutdown -h now
+_description:
+ PURPOSE:
+ This test will check your system shutdown/booting cycle
+ STEPS:
+ 1. Press 'Enter' to initiate a system shutdown.
+ 2. Power the system back on.
+ 3. From the grub menu, boot into the Xen Hypervisor.
+ 4. When the system has restarted, log in and restart checkbox-certification-server.
+ 5. Select 'Re-Run' to return to this test.
+ 6. Select Pass to indicate the test has passed if the machine shut down
+ successfully otherwise, Select 'Fail' to indicate there was a problem.
+ VERIFICATION:
+ Did the system shutdown and boot correctly?
+