| #!/usr/bin/env python |
| |
| """ |
| This file generates all telemetry_Benchmarks control files from a master list. |
| """ |
| |
| # This test list is a subset of telemetry benchmark tests. The full list can be |
| # obtained by executing |
| # /build/${BOARD}/usr/local/telemetry/src/tools/perf/list_benchmarks |
| |
| TESTS = [ |
| 'dromaeo.domcoreattr', |
| 'dromaeo.domcoremodify', |
| 'dromaeo.domcorequery', |
| 'dromaeo.domcoretraverse', |
| 'jetstream', |
| 'kraken', |
| 'media.chromeOS4kOnly.tough_video_cases', |
| 'media.chromeOS.tough_video_cases', |
| 'memory.top_7_stress', |
| 'octane', |
| 'page_cycler.typical_25', |
| 'robohornet_pro', |
| 'session_restore.cold.typical_25', |
| 'smoothness.top_25_smooth', |
| 'smoothness.tough_animation_cases', |
| 'smoothness.tough_canvas_cases', |
| 'smoothness.tough_filters_cases', |
| 'smoothness.tough_pinch_zoom_cases', |
| 'smoothness.tough_scrolling_cases', |
| 'smoothness.tough_webgl_cases', |
| 'speedometer', |
| 'startup.cold.blank_page', |
| 'sunspider', |
| 'tab_switching.top_10', |
| 'webrtc.webrtc_cases', |
| ] |
| |
| CONTROLFILE_TEMPLATE =( |
| """# Copyright 2014 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # Do not edit this file! It was created by generate_controlfiles.py. |
| |
| from autotest_lib.client.common_lib import utils |
| |
| AUTHOR = 'sbasi, achuith, rohitbm' |
| NAME = 'telemetry_Benchmarks.{0}' |
| SUITE = 'performance' |
| TIME = 'LONG' |
| TEST_CATEGORY = 'Benchmark' |
| TEST_CLASS = 'performance' |
| TEST_TYPE = 'server' |
| |
| DOC = ''' |
| This server side test suite executes the Telemetry Benchmark: |
| {0} |
| This is part of Chrome for Chrome OS performance testing. |
| |
| Pass local=True to run with local telemetry and no AFE server. |
| ''' |
| |
| def run_benchmark(machine): |
| host = hosts.create_host(machine) |
| job.run_test('telemetry_Benchmarks', host=host, |
| benchmark='{0}', |
| tag='{0}', |
| args=utils.args_to_dict(args)) |
| |
| parallel_simple(run_benchmark, machines)""") |
| |
| for test in TESTS: |
| filename = 'control.%s' % test |
| with open(filename, 'w+') as f: |
| content = CONTROLFILE_TEMPLATE.format(test) |
| f.write(content) |