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