blob: 4978865549c79732d3f77b33f203babdec166e6c [file] [log] [blame]
# Copyright 2014 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Description
# This test:
# 1. Checks that ambient light sensor exists if specified in powerd prefs.
# 2. Checks that the default brightness after initial boot is reasonable.
# 3. Changes the brightness level to min (0%) and max (100%).
# 4. Checks that the brightness level resets after rebooting the device.
# The test fails if:
# -Ambient light sensor does not exist even though specified in powerd prefs.
# -Initial brightness is not reasonable.
# -Device not able to change brightness to min and max levels.
# -Device not able to set the brightness level to default after reboot.
# Note: for devices with ambient light sensor, test will allow for a small change
# in internal display brightness; test will fail if internal display brightness
# changes drastically.
# Example usage:
# test_that -b <board> <host> power_BrightnessResetAfterReboot
NAME = "power_BrightnessResetAfterReboot"
METADATA = {
"contacts": ["chromeos-platform-power@google.com"],
"bug_component": "b:1361410",
"criteria": "This test will fail if unable to set the default brightness after reboot.",
"hw_agnostic": False
}
TEST_TYPE = "server"
ATTRIBUTES = "suite:bvt-perbuild, suite:partners, suite:distributed_lab_qual_bvt_shard1"
REQUIRE_SSP = False
from autotest_lib.server import utils
def run(machine):
host = hosts.create_host(machine)
job.run_test("power_BrightnessResetAfterReboot", host=host,
client_autotest="desktopui_SimpleLogin")
parallel_simple(run, machines)