1# Copyright (c) 2014 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5from autotest_lib.server import utils 6 7AUTHOR = "Chrome OS Team" 8NAME = "power_BrightnessResetAfterReboot" 9PURPOSE = "default brightness test." 10CRITERIA = "This test will fail if unable to set the default brightness after reboot." 11TIME = "SHORT" 12TEST_CATEGORY = "Functional" 13TEST_CLASS = "power" 14TEST_TYPE = "server" 15ATTRIBUTES = "suite:bvt-perbuild, suite:partners" 16REQUIRE_SSP = False 17 18DOC = """ 19This test: 201. Checks that ambient light sensor exists if specified in powerd prefs. 212. Checks that the default brightness after initial boot is reasonable. 223. Changes the brightness level to min (0%) and max (100%). 234. Checks that the brightness level resets after rebooting the device. 24 25The test fails if: 26-Ambient light sensor does not exist even though specified in powerd prefs. 27-Initial brightness is not reasonable. 28-Device not able to change brightness to min and max levels. 29-Device not able to set the brightness level to default after reboot. 30 31Note: for devices with ambient light sensor, test will allow for a small change 32in internal display brightness; test will fail if internal display brightness 33changes drastically. 34 35Example usage: 36test_that -b <board> <host> power_BrightnessResetAfterReboot 37""" 38 39def run(machine): 40 host = hosts.create_host(machine) 41 job.run_test("power_BrightnessResetAfterReboot", host=host, 42 disable_sysinfo=True, client_autotest="desktopui_SimpleLogin") 43 44parallel_simple(run, machines) 45