1#!/usr/bin/env python 2 3""" 4This 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 10TESTS = [ 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 25CONTROLFILE_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 32AUTHOR = 'chromeos-gfx' 33NAME = 'telemetry_GpuTests.{0}' 34ATTRIBUTES = 'suite:graphics_per-day, suite:graphics_browser' 35TIME = 'LONG' 36TEST_CATEGORY = 'Functional' 37TEST_CLASS = 'gl' 38TEST_TYPE = 'server' 39 40DOC = ''' 41This server control file executes the GPU telemetry test: {0}. 42 43Pass local=True to run with local telemetry and no AFE server. 44''' 45 46from autotest_lib.client.common_lib import utils 47 48def 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 56parallel_simple(run_test, machines)\ 57""" 58 59 60for 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