1 #!/usr/bin/env python 2 3 """ 4 This file generates all telemetry_GpuTest control files from a master list. 5 """ 6 7 # This test list can be obtained by executing 8 # /build/${BOARD}/usr/local/telemetry/src/content/test/gpu/run_gpu_test.py 9 10 TESTS = [ 11 'context_lost', 12 'gpu_process', 13 'gpu_rasterization', 14 'hardware_accelerated_feature', 15 'maps', 16 'memory_test', 17 'pixel', 18 'screenshot_sync', 19 'trace_test', 20 'webgl_conformance' 21 # TODO(ihf): Reevaluate robustness once crbug.com/379397 is fixed. 22 # 'webgl_robustness' 23 ] 24 25 CONTROLFILE_TEMPLATE = """\ 26 # Copyright 2014 The Chromium OS Authors. All rights reserved. 27 # Use of this source code is governed by a BSD-style license that can be 28 # found in the LICENSE file. 29 30 # Do not edit this file! It was created by generate_controlfiles.py. 31 32 AUTHOR = 'chromeos-gfx' 33 NAME = 'telemetry_GpuTests.{0}' 34 SUITE = 'graphics_per-day, graphics, graphics_browser' 35 TIME = 'LONG' 36 TEST_CATEGORY = 'Functional' 37 TEST_CLASS = 'gl' 38 TEST_TYPE = 'server' 39 40 DOC = ''' 41 This server control file executes the GPU telemetry test: {0}. 42 43 Pass local=True to run with local telemetry and no AFE server. 44 ''' 45 46 from autotest_lib.client.common_lib import utils 47 48 def run_test(machine): 49 host = hosts.create_host(machine) 50 job.run_test('telemetry_GpuTests', 51 host=host, 52 test='{0}', 53 args=utils.args_to_dict(args)) 54 55 56 parallel_simple(run_test, machines)\ 57 """ 58 59 60 for test in TESTS: 61 filename = 'control.%s' % test 62 with open(filename, 'w+') as f: 63 content = CONTROLFILE_TEMPLATE.format(test) 64 f.write(content) 65