OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 AUTHOR = "Chrome OS Team" | 5 AUTHOR = "Chrome OS Team" |
6 NAME = "power_Draw" | 6 NAME = "power_Draw" |
7 PURPOSE = "Measure how much power is drawn over a given amount of time." | 7 PURPOSE = "Measure how much power is drawn over a given amount of time." |
8 CRITERIA = "This test is a benchmark." | 8 CRITERIA = "This test is a benchmark." |
9 TIME = "MEDIUM" | 9 TIME = "MEDIUM" |
10 TEST_CATEGORY = "Functional" | 10 TEST_CATEGORY = "Functional" |
11 TEST_CLASS = "power" | 11 TEST_CLASS = "power" |
12 TEST_TYPE = "client" | 12 TEST_TYPE = "client" |
13 | 13 |
14 DOC = """ | 14 DOC = """ |
15 This test will run for 200 seconds. | 15 This test will run for 200 seconds. |
16 | 16 |
17 This test depends upon site_power_status.py from AutoTest to provide battery | 17 This test depends upon power_status.py from AutoTest to provide battery |
18 state updates. This test requires that AC power is off. | 18 state updates. This test requires that AC power is off. |
19 """ | 19 """ |
20 | 20 |
21 from autotest_lib.client.common_lib import site_power_status | |
22 | |
23 | |
24 tag = 'PowerDraw' | 21 tag = 'PowerDraw' |
25 seconds = 200 | 22 seconds = 200 |
26 | 23 |
27 | 24 |
28 def run_power_draw(): | 25 def run_power_draw(): |
29 job.run_test('power_Draw', seconds=seconds, tag=tag) | 26 job.run_test('power_Draw', seconds=seconds, tag=tag) |
30 | 27 |
31 | 28 |
32 def run_sat(): | 29 def run_sat(): |
33 job.run_test('hardware_SAT', seconds=seconds, tag=tag) | 30 job.run_test('hardware_SAT', seconds=seconds, tag=tag) |
34 | 31 |
35 | 32 |
36 def run_gpu(): | 33 def run_gpu(): |
37 job.run_test('graphics_GLBench', | 34 job.run_test('graphics_GLBench', |
38 options='-tests fill:triangle -duration %d' % seconds, | 35 options='-tests fill:triangle -duration %d' % seconds, |
39 tag=tag) | 36 tag=tag) |
40 | 37 |
41 | 38 |
42 job.parallel([run_power_draw], [run_sat], [run_gpu]) | 39 job.parallel([run_power_draw], [run_sat], [run_gpu]) |
OLD | NEW |