| 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_LoadTest" | 6 NAME = "power_LoadTest" |
| 7 PURPOSE = "Measure power draw when system is under load." | 7 PURPOSE = "Measure power draw when system is under load." |
| 8 CRITERIA = "This test is a benchmark." | 8 CRITERIA = "This test is a benchmark." |
| 9 TIME = "LONG" | 9 TIME = "LONG" |
| 10 TEST_CATEGORY = "Benchmark" | 10 TEST_CATEGORY = "Benchmark" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 # perf test account. | 29 # perf test account. |
| 30 # TODO (bleung): Seconds variable is used here, but is not in power_LoadTest | 30 # TODO (bleung): Seconds variable is used here, but is not in power_LoadTest |
| 31 # because of the change to packed external extension. Change ext to take arg. | 31 # because of the change to packed external extension. Change ext to take arg. |
| 32 | 32 |
| 33 | 33 |
| 34 import time | 34 import time |
| 35 | 35 |
| 36 loop_time = 3600 | 36 loop_time = 3600 |
| 37 loop_count = 9 | 37 loop_count = 9 |
| 38 | 38 |
| 39 def run_audiovideo_V4L2(): | 39 job.run_test('power_LoadTest', loop_time=loop_time, loop_count=loop_count, |
| 40 # TODO (snanda): Exit out of run_audiovideo_V4L2 earlier if | 40 low_battery_threshold=3) |
| 41 # run_power_load_test completes earlier than loop_time * loop_count | |
| 42 for i in range(loop_count): | |
| 43 # enable webcam for 5% of the test time, 90% into the test | |
| 44 run_time = loop_time * 0.05 | |
| 45 time.sleep(loop_time * 0.90) | |
| 46 job.run_test('audiovideo_V4L2', time=run_time, run_capture_tests=False, | |
| 47 run_default_capture_test=True, assert_mandatory_controls=False, | |
| 48 tag=i) | |
| 49 | |
| 50 | |
| 51 def run_power_load_test(): | |
| 52 job.run_test('power_LoadTest', loop_time=loop_time, loop_count=loop_count, | |
| 53 low_battery_threshold=3) | |
| 54 | |
| 55 | |
| 56 job.parallel([run_audiovideo_V4L2], [run_power_load_test]) | |
| OLD | NEW |