plugin: manual
name: power-management/shutdown-boot
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
name: power-management/fwts_wakealarm
user: root
description: Test ACPI Wakealarm (fwts wakealarm)
description-en_GB.UTF-8: Test ACPI Wakealarm (fwts wakealarm)
description-es.UTF-8: Prueba de ACPI Wakealarm (fwts wakealarm)
description-fr.UTF-8: Test ACPI Wakealarm (fwts wakealarm)
description-ms.UTF-8: Ujia Penggera Bangun ACPI (fwts wakealarm)
description-pt_BR.UTF-8: Testa despertador ACPI (despertador fwts)
requires:
 package.name == 'linux'
 package.name == 'fwts'
command: fwts_test -w -l $CHECKBOX_DATA/fwts-wakealarm.log

plugin: attachment
name: power-management/fwts_wakealarm-log-attach
depends: power-management/fwts_wakealarm
description: Attach log from fwts wakealarm test
description-en_GB.UTF-8: Attach log from fwts wakealarm test
description-es.UTF-8: Adjunta registros de la prueba de fwts wakealarm
description-fr.UTF-8: Joindre le journal du test fwts wakealarm
description-ms.UTF-8: Lampirkan log dari ujian fwts wakealarm
description-pt_BR.UTF-8: Anexa o relatório do teste do despertador fwts
requires:
 package.name == 'linux'
 package.name == 'fwts'
command: [ -e ${CHECKBOX_DATA}/fwts-wakealarm.log ] && cat ${CHECKBOX_DATA}/fwts-wakealarm.log

plugin: manual
name: power-management/poweroff
depends: power-management/fwts_wakealarm
user: root
requires:
 package.name == 'upstart'
 package.name == 'fwts'
command: pm_test poweroff --log-level=debug --log-dir=$CHECKBOX_DATA
description:
 PURPOSE:
  This test will check the system's ability to power-off and boot.
 STEPS:
  1: Select "Test" to begin.
  2: The machine will shut down.
  3: Power the machine back on.
  4: After rebooting, wait for the test prompts to inform you that the test is complete.
  5: Once the test has completed, restart checkbox and select Re-Run when prompted
 VERIFICATION:
  If the machine successfully shuts down and boots, select Yes then select Next.

plugin: attachment
name: power-management/poweroff-log-attach
command: tar cvfz power-management_poweroff.tgz $CHECKBOX_DATA/*poweroff.1.log && cat $CHECKBOX_DATA/power-management_poweroff.tgz
description:
 This will attach any logs from the power-management/poweroff test to the results.

plugin: manual
name: power-management/reboot
user: root
requires:
 package.name == 'upstart'
 package.name == 'fwts'
command: pm_test reboot --log-level=debug --log-dir=$CHECKBOX_DATA
description:
 PURPOSE:
  This test will check the system's ability to reboot cleanly.
 STEPS:
  1: Select "Test" to begin.
  2: The machine will reboot.
  3: After rebooting, wait for the test prompts to inform you that the test is complete.
  4: Once the test has completed, restart checkbox and select Re-Run when prompted
 VERIFICATION:
  If the machine successfully reboots, select Yes then select Next.

plugin: attachment
name: power-management/reboot-log-attach
command: tar cvfz power-management_reboot.tgz $CHECKBOX_DATA/*reboot.1.log && cat $CHECKBOX_DATA/power-management_reboot.tgz
description:
 This will attach any logs from the power-management/reboot test to the results.

plugin: manual
name: power-management/lid
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: manual
name: power-management/lid_close
requires: device.product == 'Lid Switch' and package.name == 'linux'
command:
 for i in `seq 20`; do
  state=`cat /proc/acpi/button/lid/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. Click "Test"
     2. Close and open the lid
 VERIFICATION:
     Did the screen turn off while the lid was closed?

plugin: manual
name: power-management/lid_open
requires: device.product == 'Lid Switch' and package.name == 'linux'
command:
 for i in `seq 20`; do
  state=`cat /proc/acpi/button/lid/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. Click "Test"
     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
name: power-management/rtc
requires: package.name == 'linux'
command:
 test -e /dev/rtc || ( echo "ERROR: Real Time Clock not found" >&2 && exit 1 )
description:
 Make sure that the RTC (Real-Time Clock) device exists.

plugin: shell
name: power-management/tickless_idle
requires: package.name == 'linux'
description: Check to see if CONFIG_NO_HZ is set in the kernel (this is just a simple regression check)
description-ast.UTF-8: Conseñar pa ver si CONFIG_NO_HZ afitóse nel nucleu (esto ye sólo una simple comprobación de regresión)
description-bn.UTF-8: CONFIG_NO_HZ তে kernel নির্ধারিত হয়েছে কিনা তা দেখার জন্য পরীক্ষা করুন (এটি শুধুমাত্র একটি সাধারণ নিবন্ধনের পরীক্ষা)
description-bs.UTF-8: Provjera da se vidi da li je CONFIG_NO_HZ postavljen u kernel (to je samo prosti test regresije)
description-cs.UTF-8: Ověřit, zda má kernel volbu CONFIG_NO_HZ (jednoduché ověření)
description-de.UTF-8: Überprüfen, ob CONFIG_NO_HZ im Kernel gesetzt ist (Dies ist nur ein einfacher Regressionstest)
description-el.utf-8: Έλεγχος για το αν το CONFIG_NO_HZ έχει ρυθμιστεί στον πυρήνα (Αυτός είναι ένας απλός έλεγχος παλινδρόμησης)
description-en_AU.UTF-8: Check to see if CONFIG_NO_HZ is set in the kernel (this is just a simple regression check)
description-en_GB.UTF-8: Check to see if CONFIG_NO_HZ is set in the kernel (this is just a simple regression check)
description-es.UTF-8: Marcar para ver si CONFIG_NO_HZ se ha establecido en el núcleo (esto es solo una simple comprobación de regresión)
description-fr.UTF-8: Vérifier si CONFIG_NO_HZ est paramétré dans le noyau (c'est juste un simple contrôle de régression)
description-hu.UTF-8: A CONFIG_NO_HZ beállítás ellenőrzése a kernelben (ez egy egyszerű regresszióteszt)
description-it.UTF-8: Verifica se CONFIG_NO_HZ è impostato nel kernel (questa è solo una semplice verifica di regressione).
description-km.UTF-8: ពិនិត្យមើល​ថា​តើ CONFIG_NO_HZ ត្រូវ​បាន​កំណត់​នៅ​ក្នុង​ខឺណែល​ដែរ​ឬទេ (នេះ​គ្រាន់តែ​ជា​ការ​ពិនិត្យមើល​ការ​ដើរ​ថយក្រោយ​ធម្មតា​ប៉ុណ្ណោះ)
description-ms.UTF-8: Tanda untuk melihat jika CONFIG_NO_HZ ditetapkan dalam kernel (ini merupakan semakan regresi ringkas)
description-nl.UTF-8: Controleer of CONFIG_NO_HZ ingesteld is in de kernel (dit is een simpele regressietest)
description-pt_BR.UTF-8: Verifique para ver se CONFIG_NO_HZ está configurado no kernel (isto é apenas um simples teste de regressão)
description-ro.UTF-8: Verifică dacă în kernel este configurată opțiunea CONFIG_NO_HZ (o simplă verificare pentru regresie)
description-ru.UTF-8: Проверьте установлена ли в ядре директива CONFIG_NO_HZ (это простой тест на регрессию)
description-sl.UTF-8: Preveri, če je CONFIG_NO_HZ nastavljen v jedru (to je enostavno preverjanje regresij)
description-tr.UTF-8: CONFIG_NO_HZ'nin çekirdekte ayarlı olup olmadığını görmek için denetleme yapın (bu sadece basit bir gerileme denetlemesidir).
description-ug.UTF-8: يادرودا CONFIG_NO_HZ بەلگىلەنگەنمۇ يوق تەكشۈرىدۇ(بۇ پەقەتلا ئاددىي بىر قايتىلانما تەكشۈرۈشتۇر(regression check))
description-zh_CN.UTF-8: 查看内核中是否设置了 CONFIG_NO_HZ(这只是一个简单回归检查)
command:
 zgrep 'CONFIG_NO_HZ=y' /boot/config-`uname -r` >/dev/null 2>&1 || ( echo "WARNING: Tickless Idle is NOT set" >&2 && exit 1 )
