Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1015)

Unified Diff: content/test/gpu/generate_buildbot_json.py

Issue 2675153002: Clean up generate_buildbot_json.py. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/generate_buildbot_json.py
diff --git a/content/test/gpu/generate_buildbot_json.py b/content/test/gpu/generate_buildbot_json.py
index 76ae1efe21a77090849fa7afe55e34876c3b908e..be08340b21d52903e4d6cd8a057b625f46025845 100755
--- a/content/test/gpu/generate_buildbot_json.py
+++ b/content/test/gpu/generate_buildbot_json.py
@@ -17,7 +17,49 @@ import sys
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(THIS_DIR)))
+# "Types" of waterfalls and bots. A bot's type is the union of its own
+# type and the type of its waterfall. Predicates can apply to these
+# sets in order to run tests only on a certain subset of the bots.
+class Types(object):
+ GPU = 'gpu'
+ GPU_FYI = 'gpu_fyi'
+ OPTIONAL = 'optional'
+ V8_FYI = 'v8_fyi'
+
+# The predicate functions receive a list of types as input and
+# determine whether the test should run on the given bot.
+class Predicates(object):
+ @staticmethod
+ def DEFAULT(x):
+ # By default, tests run on the chromium.gpu and chromium.gpu.fyi
+ # waterfalls, but not on the optional tryservers or on the
+ # client.v8.fyi waterfall.
+ return Types.OPTIONAL not in x and Types.V8_FYI not in x
+
+ @staticmethod
+ def FYI_ONLY(x):
+ # This predicate is more complex than desired because the optional
+ # tryservers are considered to be on the chromium.gpu.fyi
+ # waterfall.
+ return Types.GPU_FYI in x and Types.OPTIONAL not in x
+
+ @staticmethod
+ def FYI_AND_OPTIONAL(x):
+ return Predicates.FYI_ONLY(x) or Types.OPTIONAL in x
+
+ @staticmethod
+ def FYI_OPTIONAL_AND_V8(x):
+ return Predicates.FYI_AND_OPTIONAL(x) or Types.V8_FYI in x
+
+ @staticmethod
+ def DEFAULT_PLUS_V8(x):
+ return Predicates.DEFAULT(x) or Types.V8_FYI in x
+
+
WATERFALL = {
+ 'name': 'chromium.gpu',
+ 'type': Types.GPU,
+
'builders': {
'GPU Win Builder' : {},
'GPU Win Builder (dbg)' : {},
@@ -122,6 +164,9 @@ WATERFALL = {
}
FYI_WATERFALL = {
+ 'name': 'chromium.gpu.fyi',
+ 'type': Types.GPU_FYI,
+
'builders': {
'GPU Win Builder' : {},
'GPU Win Builder (dbg)' : {},
@@ -649,6 +694,7 @@ FYI_WATERFALL = {
'build_config': 'Release',
'swarming': True,
'os_type': 'win',
+ 'type': Types.OPTIONAL,
},
'Optional Win7 Release (AMD)': {
'swarming_dimensions': [
@@ -660,6 +706,7 @@ FYI_WATERFALL = {
'build_config': 'Release',
'swarming': True,
'os_type': 'win',
+ 'type': Types.OPTIONAL,
},
'Optional Mac 10.10 Release (Intel)': {
'swarming_dimensions': [
@@ -671,6 +718,7 @@ FYI_WATERFALL = {
'build_config': 'Release',
'swarming': True,
'os_type': 'mac',
+ 'type': Types.OPTIONAL,
},
'Optional Mac Retina Release': {
'swarming_dimensions': [
@@ -683,6 +731,7 @@ FYI_WATERFALL = {
'build_config': 'Release',
'swarming': True,
'os_type': 'mac',
+ 'type': Types.OPTIONAL,
},
'Optional Mac 10.10 Retina Release (AMD)': {
'swarming_dimensions': [
@@ -695,6 +744,7 @@ FYI_WATERFALL = {
'build_config': 'Release',
'swarming': True,
'os_type': 'mac',
+ 'type': Types.OPTIONAL,
},
'Optional Linux Release (NVIDIA)': {
'swarming_dimensions': [
@@ -706,11 +756,15 @@ FYI_WATERFALL = {
'build_config': 'Release',
'swarming': True,
'os_type': 'linux',
+ 'type': Types.OPTIONAL,
},
}
}
V8_FYI_WATERFALL = {
+ 'name': 'client.v8.fyi',
+ 'type': Types.V8_FYI,
+
'prologue': {
"V8 Android GN (dbg)": {
"additional_compile_targets": [
@@ -815,9 +869,8 @@ COMMON_GTESTS = {
'angle_deqp_egl_tests': {
'tester_configs': [
{
- 'fyi_only': True,
- # Run this on the optional tryservers.
- 'run_on_optional': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
# Run only on the Win7 Release NVIDIA 32- and 64-bit bots
# (and trybots) for the time being, at least until more capacity is
# added.
@@ -839,9 +892,8 @@ COMMON_GTESTS = {
'angle_deqp_gles2_d3d11_tests': {
'tester_configs': [
{
- 'fyi_only': True,
- # Run this on the optional tryservers.
- 'run_on_optional': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
# Run only on the Win7 NVIDIA/AMD R7 240 32- and 64-bit bots (and
# trybots) for the time being, at least until more capacity is
# added.
@@ -873,9 +925,8 @@ COMMON_GTESTS = {
'angle_deqp_gles2_gl_tests': {
'tester_configs': [
{
- 'fyi_only': True,
- # Run this on the optional tryservers.
- 'run_on_optional': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
# Run only on the Linux Release NVIDIA 32- and 64-bit bots (and
# trybots) for the time being, at least until more capacity is added.
'build_configs': ['Release', 'Release_x64'],
@@ -901,10 +952,8 @@ COMMON_GTESTS = {
'angle_deqp_gles2_gles_tests': {
'tester_configs': [
{
- 'allow_on_android': True,
- 'fyi_only': True,
- # Run this on the optional tryservers.
- 'run_on_optional': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
# Run on Nexus 5X swarmed bots.
'build_configs': ['android-chromium'],
'swarming_dimension_sets': [
@@ -931,9 +980,8 @@ COMMON_GTESTS = {
'angle_deqp_gles3_d3d11_tests': {
'tester_configs': [
{
- 'fyi_only': True,
# TODO(jmadill): Run this on ANGLE roll tryservers.
- 'run_on_optional': False,
+ 'predicate': Predicates.FYI_ONLY,
# Run only on the NVIDIA and AMD Win7 bots (and trybots) for the time
# being, at least until more capacity is added.
'build_configs': ['Release'],
@@ -964,9 +1012,8 @@ COMMON_GTESTS = {
'angle_deqp_gles3_gl_tests': {
'tester_configs': [
{
- 'fyi_only': True,
# TODO(jmadill): Run this on ANGLE roll tryservers.
- 'run_on_optional': False,
+ 'predicate': Predicates.FYI_ONLY,
# Run only on the Linux Release NVIDIA 32-bit bots (and trybots) for
# the time being, at least until more capacity is added.
'build_configs': ['Release'],
@@ -992,8 +1039,7 @@ COMMON_GTESTS = {
'angle_deqp_gles31_d3d11_tests': {
'tester_configs': [
{
- 'fyi_only': True,
- 'run_on_optional': False,
+ 'predicate': Predicates.FYI_ONLY,
# Run on the Win Release NVIDIA bots.
'build_configs': ['Release'],
'swarming_dimension_sets': [
@@ -1019,9 +1065,8 @@ COMMON_GTESTS = {
'angle_deqp_gles31_gl_tests': {
'tester_configs': [
{
- 'fyi_only': True,
- 'run_on_optional': False,
- # Run on the Win/Linux Release NVIDIA bots.
+ 'predicate': Predicates.FYI_ONLY,
+ # Run on the Win Release NVIDIA bots.
'build_configs': ['Release'],
'swarming_dimension_sets': [
{
@@ -1053,9 +1098,7 @@ COMMON_GTESTS = {
'angle_end2end_tests': {
'tester_configs': [
{
- 'allow_on_android': True,
- 'fyi_only': True,
- 'run_on_optional': True,
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
},
],
'disabled_tester_configs': [
@@ -1080,11 +1123,6 @@ COMMON_GTESTS = {
]
},
'angle_unittests': {
- 'tester_configs': [
- {
- 'allow_on_android': True,
- }
- ],
'desktop_args': [
'--use-gpu-in-tests',
# ANGLE test retries deliberately disabled to prevent flakiness.
@@ -1103,9 +1141,15 @@ COMMON_GTESTS = {
'audio_unittests': {
'tester_configs': [
{
- 'fyi_only': True,
+ 'predicate': Predicates.FYI_ONLY,
}
],
+ # Don't run these tests on Android.
+ 'disabled_tester_configs': [
+ {
+ 'os_types': ['android'],
+ },
+ ],
'args': ['--use-gpu-in-tests']
},
# TODO(kbr): content_unittests is killing the Linux GPU swarming
@@ -1114,11 +1158,6 @@ COMMON_GTESTS = {
# everywhere.
# 'content_unittests': {},
'gl_tests': {
- 'tester_configs': [
- {
- 'allow_on_android': True,
- }
- ],
'disabled_tester_configs': [
{
'names': [
@@ -1131,11 +1170,6 @@ COMMON_GTESTS = {
'desktop_args': ['--use-gpu-in-tests']
},
'gl_unittests': {
- 'tester_configs': [
- {
- 'allow_on_android': True,
- }
- ],
'desktop_args': ['--use-gpu-in-tests']
},
# The gles2_conform_tests are closed-source and deliberately only run
@@ -1143,20 +1177,24 @@ COMMON_GTESTS = {
'gles2_conform_test': {
'tester_configs': [
{
- 'fyi_only': True,
- # Run this on the optional tryservers.
- 'run_on_optional': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
}
],
+ # Don't run these tests on Android.
+ 'disabled_tester_configs': [
+ {
+ 'os_types': ['android'],
+ },
+ ],
'args': ['--use-gpu-in-tests']
},
'gles2_conform_d3d9_test': {
'tester_configs': [
{
- 'fyi_only': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
'os_types': ['win'],
- # Run this on the optional tryservers.
- 'run_on_optional': True,
}
],
'args': [
@@ -1168,10 +1206,9 @@ COMMON_GTESTS = {
'gles2_conform_gl_test': {
'tester_configs': [
{
- 'fyi_only': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
'os_types': ['win'],
- # Run this on the optional tryservers.
- 'run_on_optional': True,
}
],
'args': [
@@ -1184,9 +1221,8 @@ COMMON_GTESTS = {
'swiftshader_unittests': {
'tester_configs': [
{
- 'fyi_only': True,
- # Run this on the optional tryservers.
- 'run_on_optional': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
'os_types': ['win', 'linux'],
},
],
@@ -1197,6 +1233,12 @@ COMMON_GTESTS = {
'build_configs': ['Release', 'Release_x64'],
}
],
+ # Don't run these tests on Android.
+ 'disabled_tester_configs': [
+ {
+ 'os_types': ['android'],
+ },
+ ],
'override_compile_targets': [
'tab_capture_end2end_tests_run',
],
@@ -1220,19 +1262,25 @@ COMMON_GTESTS = {
NON_SWARMED_GTESTS = {
'tab_capture_end2end_tests': {
- 'swarming': {
- 'can_use_on_swarming_builders': False
- },
- 'test': 'browser_tests',
- 'args': [
- '--enable-gpu',
- '--test-launcher-jobs=1',
- '--gtest_filter=CastStreamingApiTestWithPixelOutput.EndToEnd*:' + \
- 'TabCaptureApiPixelTest.EndToEnd*'
- ],
- 'swarming': {
- 'can_use_on_swarming_builders': False,
- },
+ 'swarming': {
+ 'can_use_on_swarming_builders': False
+ },
+ # Don't run these tests on Android.
+ 'disabled_tester_configs': [
+ {
+ 'os_types': ['android'],
+ },
+ ],
+ 'test': 'browser_tests',
+ 'args': [
+ '--enable-gpu',
+ '--test-launcher-jobs=1',
+ '--gtest_filter=CastStreamingApiTestWithPixelOutput.EndToEnd*:' + \
+ 'TabCaptureApiPixelTest.EndToEnd*'
+ ],
+ 'swarming': {
+ 'can_use_on_swarming_builders': False,
+ },
}
}
@@ -1242,16 +1290,14 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
'context_lost': {
'tester_configs': [
{
- 'allow_on_android': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.DEFAULT_PLUS_V8,
},
]
},
'depth_capture': {
'tester_configs': [
{
- 'allow_on_android': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.DEFAULT_PLUS_V8,
},
]
},
@@ -1259,16 +1305,14 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
'target_name': 'gpu_process',
'tester_configs': [
{
- 'allow_on_android': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.DEFAULT_PLUS_V8,
}
],
},
'hardware_accelerated_feature': {
'tester_configs': [
{
- 'allow_on_android': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.DEFAULT_PLUS_V8,
},
],
},
@@ -1284,8 +1328,7 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
],
'tester_configs': [
{
- 'allow_on_android': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.DEFAULT_PLUS_V8,
},
],
},
@@ -1309,32 +1352,28 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
],
'tester_configs': [
{
- 'allow_on_android': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.DEFAULT_PLUS_V8,
},
],
},
'screenshot_sync': {
'tester_configs': [
{
- 'allow_on_android': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.DEFAULT_PLUS_V8,
},
],
},
'trace_test': {
'tester_configs': [
{
- 'allow_on_android': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.DEFAULT_PLUS_V8,
},
],
},
'webgl_conformance': {
'tester_configs': [
{
- 'allow_on_android': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.DEFAULT_PLUS_V8,
},
],
'asan_args': ['--is-asan'],
@@ -1342,9 +1381,9 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
'webgl_conformance_d3d9_tests': {
'tester_configs': [
{
- 'fyi_only': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
'os_types': ['win'],
- 'run_on_optional': True,
}
],
'target_name': 'webgl_conformance',
@@ -1356,9 +1395,9 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
'webgl_conformance_gl_tests': {
'tester_configs': [
{
- 'fyi_only': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
'os_types': ['win'],
- 'run_on_optional': True,
}
],
'disabled_tester_configs': [
@@ -1398,9 +1437,9 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
'webgl_conformance_angle_tests': {
'tester_configs': [
{
- 'fyi_only': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
'os_types': ['linux'],
- 'run_on_optional': True,
}
],
'target_name': 'webgl_conformance',
@@ -1412,9 +1451,9 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
'webgl_conformance_d3d11_passthrough': {
'tester_configs': [
{
- 'fyi_only': True,
+ # Run this on the FYI waterfall and optional tryservers.
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
'os_types': ['win'],
- 'run_on_optional': True,
}
],
'target_name': 'webgl_conformance',
@@ -1436,9 +1475,7 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
# The WebGL 2.0 conformance tests take over an hour to run on
# the Debug bots, which is too long.
'build_configs': ['Release', 'Release_x64'],
- 'fyi_only': True,
- 'run_on_optional': True,
- 'run_on_v8': True,
+ 'predicate': Predicates.FYI_OPTIONAL_AND_V8,
},
],
'disabled_tester_configs': [
@@ -1448,6 +1485,8 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
# to run on x64 in Debug mode. Need to shard the tests.
'Win7 x64 Debug (NVIDIA)',
],
+ # Don't run these tests on Android yet.
+ 'os_types': ['android'],
},
],
'target_name': 'webgl_conformance',
@@ -1472,9 +1511,8 @@ TELEMETRY_GPU_INTEGRATION_TESTS = {
# The WebGL 2.0 conformance tests take over an hour to run on
# the Debug bots, which is too long.
'build_configs': ['Release'],
- 'fyi_only': True,
- 'run_on_optional': False,
- # Only run on the NVIDIA Release and Intel Release Linux bots
+ 'predicate': Predicates.FYI_ONLY,
+ # Only run on the NVIDIA Release and Intel Release Linux bots.
'swarming_dimension_sets': [
{
'gpu': '10de:104a',
@@ -1519,8 +1557,7 @@ NON_TELEMETRY_ISOLATED_SCRIPT_TESTS = {
'angle_perftests': {
'tester_configs': [
{
- 'fyi_only': True,
- 'run_on_optional': True,
+ 'predicate': Predicates.FYI_AND_OPTIONAL,
# Run on the Win/Linux Release NVIDIA bots.
'build_configs': ['Release'],
'swarming_dimension_sets': [
@@ -1560,20 +1597,21 @@ def is_android(tester_config):
def is_asan(tester_config):
return tester_config.get('is_asan', False)
-def tester_config_matches_tester(tester_name, tester_config, tc, is_fyi, is_v8,
- check_waterfall):
- if check_waterfall:
- if tc.get('fyi_only', False) and not is_fyi:
- return False
- # Handle the optional tryservers with the 'run_on_optional' flag.
- # Only a subset of the tests run on these tryservers.
- if tester_name.startswith('Optional') and not tc.get(
- 'run_on_optional', False):
- return False
+# Returns a list describing the type of this tester. It may include
+# both the type of the bot as well as the waterfall.
+def get_tester_type(tester_config):
+ result = []
+ if 'type' in tester_config:
+ result.append(tester_config['type'])
+ result.append(tester_config['parent']['type'])
+ return result
- # Handle the client.v8.fyi GPU bots with the 'run_on_v8' flag.
- if (is_v8 and not tc.get('run_on_v8', False)):
+def tester_config_matches_tester(tester_name, tester_config, tc,
+ check_waterfall):
+ if check_waterfall:
+ if not tc.get('predicate', Predicates.DEFAULT)(
+ get_tester_type(tester_config)):
return False
if 'names' in tc:
@@ -1592,44 +1630,37 @@ def tester_config_matches_tester(tester_name, tester_config, tc, is_fyi, is_v8,
if not matches_swarming_dimensions(tester_config,
tc['swarming_dimension_sets']):
return False
- if is_android(tester_config):
- if not tc.get('allow_on_android', False):
- return False
return True
-def should_run_on_tester(tester_name, tester_config, test_config,
- is_fyi, is_v8):
+def should_run_on_tester(tester_name, tester_config, test_config):
# Check if this config is disabled on this tester
if 'disabled_tester_configs' in test_config:
for dtc in test_config['disabled_tester_configs']:
- if tester_config_matches_tester(tester_name, tester_config, dtc,
- is_fyi, is_v8, False):
+ if tester_config_matches_tester(tester_name, tester_config, dtc, False):
return False
if 'tester_configs' in test_config:
for tc in test_config['tester_configs']:
- if tester_config_matches_tester(tester_name, tester_config, tc,
- is_fyi, is_v8, True):
+ if tester_config_matches_tester(tester_name, tester_config, tc, True):
return True
return False
else:
# If tester_configs is unspecified, run nearly all tests by default,
# but let tester_config_matches_tester filter out any undesired
# tests, such as ones that should only run on the Optional bots.
- return tester_config_matches_tester(tester_name, tester_config, {},
- is_fyi, is_v8, True)
+ return tester_config_matches_tester(tester_name, tester_config, {}, True)
-def generate_gtest(tester_name, tester_config, test, test_config,
- is_fyi, is_v8):
- if not should_run_on_tester(tester_name, tester_config, test_config,
- is_fyi, is_v8):
- return None
- result = copy.deepcopy(test_config)
+def remove_tester_configs_from_result(result):
if 'tester_configs' in result:
# Don't print the tester_configs in the JSON.
result.pop('tester_configs')
if 'disabled_tester_configs' in result:
# Don't print the disabled_tester_configs in the JSON.
result.pop('disabled_tester_configs')
+
+def generate_gtest(tester_name, tester_config, test, test_config):
+ if not should_run_on_tester(tester_name, tester_config, test_config):
+ return None
+ result = copy.deepcopy(test_config)
if 'test' in result:
result['name'] = test
else:
@@ -1691,6 +1722,9 @@ def generate_gtest(tester_name, tester_config, test, test_config,
result['swarming'].update(result['desktop_swarming'])
# Don't put the desktop_swarming in the JSON.
result.pop('desktop_swarming')
+ # Remove the tester_configs and disabled_tester_configs, if present,
+ # from the result.
+ remove_tester_configs_from_result(result)
# This flag only has an effect on the Linux bots that run tests
# locally (as opposed to via Swarming), which are only those couple
@@ -1699,7 +1733,7 @@ def generate_gtest(tester_name, tester_config, test, test_config,
result['use_xvfb'] = False
return result
-def generate_gtests(tester_name, tester_config, test_dictionary, is_fyi, is_v8):
+def generate_gtests(tester_name, tester_config, test_dictionary):
# The relative ordering of some of the tests is important to
# minimize differences compared to the handwritten JSON files, since
# Python's sorts are stable and there are some tests with the same
@@ -1708,17 +1742,16 @@ def generate_gtests(tester_name, tester_config, test_dictionary, is_fyi, is_v8):
gtests = []
for test_name, test_config in sorted(test_dictionary.iteritems()):
test = generate_gtest(tester_name, tester_config,
- test_name, test_config, is_fyi, is_v8)
+ test_name, test_config)
if test:
# generate_gtest may veto the test generation on this platform.
gtests.append(test)
return gtests
def generate_isolated_test(tester_name, tester_config, test, test_config,
- is_fyi, is_v8, extra_browser_args, isolate_name,
+ extra_browser_args, isolate_name,
override_compile_targets, prefix_args):
- if not should_run_on_tester(tester_name, tester_config, test_config,
- is_fyi, is_v8):
+ if not should_run_on_tester(tester_name, tester_config, test_config):
return None
test_args = ['-v']
extra_browser_args_string = ""
@@ -1769,7 +1802,7 @@ def generate_isolated_test(tester_name, tester_config, test, test_config,
return result
def generate_telemetry_test(tester_name, tester_config,
- test, test_config, is_fyi, is_v8):
+ test, test_config):
extra_browser_args = ['--enable-logging=stderr', '--js-flags=--expose-gc']
benchmark_name = test_config.get('target_name') or test
prefix_args = [
@@ -1778,50 +1811,57 @@ def generate_telemetry_test(tester_name, tester_config,
'--browser=%s' % tester_config['build_config'].lower()
]
return generate_isolated_test(tester_name, tester_config, test,
- test_config, is_fyi, is_v8, extra_browser_args,
+ test_config, extra_browser_args,
'telemetry_gpu_integration_test',
['telemetry_gpu_integration_test_run'],
prefix_args)
def generate_telemetry_tests(tester_name, tester_config,
- test_dictionary, is_fyi, is_v8):
+ test_dictionary):
isolated_scripts = []
for test_name, test_config in sorted(test_dictionary.iteritems()):
test = generate_telemetry_test(
- tester_name, tester_config, test_name, test_config, is_fyi, is_v8)
+ tester_name, tester_config, test_name, test_config)
if test:
isolated_scripts.append(test)
return isolated_scripts
def generate_non_telemetry_isolated_test(tester_name, tester_config,
- test, test_config, is_fyi, is_v8):
+ test, test_config):
return generate_isolated_test(tester_name, tester_config, test,
- test_config, is_fyi, is_v8,
+ test_config,
None, test, None, [])
def generate_non_telemetry_isolated_tests(tester_name, tester_config,
- test_dictionary, is_fyi, is_v8):
+ test_dictionary):
isolated_scripts = []
for test_name, test_config in sorted(test_dictionary.iteritems()):
test = generate_non_telemetry_isolated_test(
- tester_name, tester_config, test_name, test_config, is_fyi, is_v8)
+ tester_name, tester_config, test_name, test_config)
if test:
isolated_scripts.append(test)
return isolated_scripts
-def generate_all_tests(waterfall, filename, is_fyi, is_v8):
+def install_parent_links(waterfall):
+ # Make the testers point back to the top-level waterfall so that we
+ # can ask about its properties when determining whether a given test
+ # should run on a given waterfall.
+ for name, config in waterfall.get('testers', {}).iteritems():
+ config['parent'] = waterfall
+
+def generate_all_tests(waterfall, filename):
tests = {}
for builder, config in waterfall.get('prologue', {}).iteritems():
tests[builder] = config
for builder, config in waterfall.get('builders', {}).iteritems():
tests[builder] = config
for name, config in waterfall['testers'].iteritems():
- gtests = generate_gtests(name, config, COMMON_GTESTS, is_fyi, is_v8)
+ gtests = generate_gtests(name, config, COMMON_GTESTS)
isolated_scripts = \
generate_telemetry_tests(
- name, config, TELEMETRY_GPU_INTEGRATION_TESTS, is_fyi, is_v8) + \
+ name, config, TELEMETRY_GPU_INTEGRATION_TESTS) + \
generate_non_telemetry_isolated_tests(name, config,
- NON_TELEMETRY_ISOLATED_SCRIPT_TESTS, is_fyi, is_v8)
+ NON_TELEMETRY_ISOLATED_SCRIPT_TESTS)
tests[name] = {
'gtest_tests': sorted(gtests, key=lambda x: x['test']),
'isolated_scripts': sorted(isolated_scripts, key=lambda x: x['name'])
@@ -1833,9 +1873,13 @@ def generate_all_tests(waterfall, filename, is_fyi, is_v8):
fp.write('\n')
def main():
- generate_all_tests(FYI_WATERFALL, 'chromium.gpu.fyi.json', True, False)
- generate_all_tests(WATERFALL, 'chromium.gpu.json', False, False)
- generate_all_tests(V8_FYI_WATERFALL, 'client.v8.fyi.json', True, True)
+ install_parent_links(FYI_WATERFALL)
+ install_parent_links(WATERFALL)
+ install_parent_links(V8_FYI_WATERFALL)
+
+ generate_all_tests(FYI_WATERFALL, 'chromium.gpu.fyi.json')
+ generate_all_tests(WATERFALL, 'chromium.gpu.json')
+ generate_all_tests(V8_FYI_WATERFALL, 'client.v8.fyi.json')
return 0
if __name__ == "__main__":
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698