xref: /aosp_15_r20/external/autotest/server/site_tests/power_BrightnessResetAfterReboot/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
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 = "ChromeOS 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
17PY_VERSION = 3
18
19DOC = """
20This test:
211. Checks that ambient light sensor exists if specified in powerd prefs.
222. Checks that the default brightness after initial boot is reasonable.
233. Changes the brightness level to min (0%) and max (100%).
244. Checks that the brightness level resets after rebooting the device.
25
26The test fails if:
27-Ambient light sensor does not exist even though specified in powerd prefs.
28-Initial brightness is not reasonable.
29-Device not able to change brightness to min and max levels.
30-Device not able to set the brightness level to default after reboot.
31
32Note: for devices with ambient light sensor, test will allow for a small change
33in internal display brightness; test will fail if internal display brightness
34changes drastically.
35
36Example usage:
37test_that -b <board> <host> power_BrightnessResetAfterReboot
38"""
39
40def run(machine):
41    host = hosts.create_host(machine)
42    job.run_test("power_BrightnessResetAfterReboot", host=host,
43                 disable_sysinfo=True, client_autotest="desktopui_SimpleLogin")
44
45parallel_simple(run, machines)
46