summaryrefslogtreecommitdiff
path: root/units/power-management
diff options
authorray.chen <ray.chen@canonical.com>2020-02-27 17:56:32 +0800
committerray.chen <ray.chen@canonical.com>2020-03-25 17:04:09 +0800
commite1359aca12d20666de5b5e4943e110e95288ad05 (patch)
treea82b66b70a0c8bce30c6d91a617666a0a04c0af3 /units/power-management
parentc1d56e398568c2e7b80cbaca7434a07c1d2ec75a (diff)
power: add light sensor test
Diffstat (limited to 'units/power-management')
-rw-r--r--units/power-management/jobs.pxu20
1 files changed, 20 insertions, 0 deletions
diff --git a/units/power-management/jobs.pxu b/units/power-management/jobs.pxu
index 904c2f0e..36e31c2a 100644
--- a/units/power-management/jobs.pxu
+++ b/units/power-management/jobs.pxu
@@ -318,3 +318,23 @@ 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 )
+
+plugin: user-interact-verify
+category_id: com.canonical.plainbox::power-management
+id: power-management/light_sensor
+estimated_duration: 10.0
+requires: dmi.product in ['Notebook','Laptop','Portable'] and executable.name == 'monitor-sensor'
+flags: also-after-suspend-manual
+command: light_sensor_test
+_description:
+_purpose:
+ This test will check your Ambient Light Sensor work, if you don't have it, please skip this test.
+_steps:
+ 1. Make sure "Automatic brightness" is ON in Power settings.
+ 2. Locate Ambient Light Sensor, should be around the Camera.
+ 3. Cover your hand on the Ambient Light Sensor.
+ 4. When the backlight dimmed, press Enter to start testing.
+ 5. Wait until the message "Has ambient light sensor" is printed on the screen and wave your hand slowly during testing.
+_verification:
+ Did the Ambient Light Sensor values change when you shaking your hands over the sensor?
+ Did the Screen backlight also changed?