• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    'depth_capture',
13    'gpu_process',
14    'hardware_accelerated_feature',
15    'info_collection',
16    'maps',
17    'noop_sleep',
18    'pixel',
19    'screenshot_sync',
20    'trace_test',
21    'webgl_conformance'
22]
23
24CONTROLFILE_TEMPLATE = """\
25# Copyright 2014 The Chromium OS Authors. All rights reserved.
26# Use of this source code is governed by a BSD-style license that can be
27# found in the LICENSE file.
28
29# Do not edit this file! It was created by generate_controlfiles.py.
30
31AUTHOR = 'chromeos-gfx'
32NAME = 'telemetry_GpuTests.{0}'
33ATTRIBUTES = 'suite:graphics_per-day, suite:graphics_browser'
34TIME = 'LONG'
35TEST_CATEGORY = 'Functional'
36TEST_CLASS = 'gl'
37TEST_TYPE = 'server'
38
39DOC = '''
40This server control file executes the GPU telemetry test: {0}.
41
42Pass local=True to run with local telemetry and no AFE server.
43'''
44
45from autotest_lib.client.common_lib import utils
46
47def run_test(machine):
48    host = hosts.create_host(machine)
49    job.run_test('telemetry_GpuTests',
50                 host=host,
51                 test='{0}',
52                 args=utils.args_to_dict(args))
53
54
55parallel_simple(run_test, machines)\
56"""
57
58
59for test in TESTS:
60    filename = 'control.%s' % test
61    with open(filename, 'w+') as f:
62        content = CONTROLFILE_TEMPLATE.format(test)
63        f.write(content)
64