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

Side by Side Diff: content/test/gpu/generate_buildbot_json.py

Issue 2840953002: Make tab_capture_end2end_tests work as a regular windowed_test_launcher. (Closed)
Patch Set: remove dependent CL Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Script to generate chromium.gpu.json and chromium.gpu.fyi.json in 6 """Script to generate chromium.gpu.json and chromium.gpu.fyi.json in
7 the src/testing/buildbot directory. Maintaining these files by hand is 7 the src/testing/buildbot directory. Maintaining these files by hand is
8 too unwieldy. 8 too unwieldy.
9 """ 9 """
10 10
(...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 ], 1463 ],
1464 # Don't run these tests on Android. 1464 # Don't run these tests on Android.
1465 'disabled_tester_configs': [ 1465 'disabled_tester_configs': [
1466 { 1466 {
1467 'names': [ 1467 'names': [
1468 'Linux ChromiumOS Ozone (Intel)', 1468 'Linux ChromiumOS Ozone (Intel)',
1469 ], 1469 ],
1470 'os_types': ['android'], 1470 'os_types': ['android'],
1471 }, 1471 },
1472 ], 1472 ],
1473 'args': [
1474 '--enable-gpu',
1475 '--test-launcher-bot-mode',
1476 '--test-launcher-jobs=1',
1477 '--gtest_filter=CastStreamingApiTestWithPixelOutput.EndToEnd*:' + \
1478 'TabCaptureApiPixelTest.EndToEnd*'
1479 ],
1480 'linux_args': [ '--no-xvfb' ],
1481 'test': 'browser_tests',
1473 }, 1482 },
1474 'video_decode_accelerator_d3d11_unittest': { 1483 'video_decode_accelerator_d3d11_unittest': {
1475 'tester_configs': [ 1484 'tester_configs': [
1476 { 1485 {
1477 'os_types': ['win'] 1486 'os_types': ['win']
1478 }, 1487 },
1479 ], 1488 ],
1480 'args': [ 1489 'args': [
1481 '--use-angle=d3d11', 1490 '--use-angle=d3d11',
1482 '--use-test-data-path', 1491 '--use-test-data-path',
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 { 1549 {
1541 'names': [ 1550 'names': [
1542 'Linux ChromiumOS Ozone (Intel)', 1551 'Linux ChromiumOS Ozone (Intel)',
1543 ], 1552 ],
1544 'os_types': ['android'], 1553 'os_types': ['android'],
1545 }, 1554 },
1546 ], 1555 ],
1547 'test': 'browser_tests', 1556 'test': 'browser_tests',
1548 'args': [ 1557 'args': [
1549 '--enable-gpu', 1558 '--enable-gpu',
1559 '--no-xvfb',
1550 '--test-launcher-jobs=1', 1560 '--test-launcher-jobs=1',
1551 '--gtest_filter=CastStreamingApiTestWithPixelOutput.EndToEnd*:' + \ 1561 '--gtest_filter=CastStreamingApiTestWithPixelOutput.EndToEnd*:' + \
1552 'TabCaptureApiPixelTest.EndToEnd*' 1562 'TabCaptureApiPixelTest.EndToEnd*'
1553 ], 1563 ],
1554 'swarming': { 1564 'swarming': {
1555 'can_use_on_swarming_builders': False, 1565 'can_use_on_swarming_builders': False,
1556 }, 1566 },
1557 } 1567 }
1558 } 1568 }
1559 1569
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
2079 def matches_swarming_dimensions(tester_config, dimension_sets): 2089 def matches_swarming_dimensions(tester_config, dimension_sets):
2080 for dimensions in dimension_sets: 2090 for dimensions in dimension_sets:
2081 for cur_dims in tester_config['swarming_dimensions']: 2091 for cur_dims in tester_config['swarming_dimensions']:
2082 if set(dimensions.items()).issubset(cur_dims.items()): 2092 if set(dimensions.items()).issubset(cur_dims.items()):
2083 return True 2093 return True
2084 return False 2094 return False
2085 2095
2086 def is_android(tester_config): 2096 def is_android(tester_config):
2087 return tester_config['os_type'] == 'android' 2097 return tester_config['os_type'] == 'android'
2088 2098
2099 def is_linux(tester_config):
2100 return tester_config['os_type'] == 'linux'
2101
2089 def is_asan(tester_config): 2102 def is_asan(tester_config):
2090 return tester_config.get('is_asan', False) 2103 return tester_config.get('is_asan', False)
2091 2104
2092 2105
2093 # Returns a list describing the type of this tester. It may include 2106 # Returns a list describing the type of this tester. It may include
2094 # both the type of the bot as well as the waterfall. 2107 # both the type of the bot as well as the waterfall.
2095 def get_tester_type(tester_config): 2108 def get_tester_type(tester_config):
2096 result = [] 2109 result = []
2097 if 'type' in tester_config: 2110 if 'type' in tester_config:
2098 result.append(tester_config['type']) 2111 result.append(tester_config['type'])
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 { 2206 {
2194 'link': [ 2207 'link': [
2195 'https://luci-logdog.appspot.com/v/?s', 2208 'https://luci-logdog.appspot.com/v/?s',
2196 '=android%2Fswarming%2Flogcats%2F', 2209 '=android%2Fswarming%2Flogcats%2F',
2197 '${TASK_ID}%2F%2B%2Funified_logcats' 2210 '${TASK_ID}%2F%2B%2Funified_logcats'
2198 ], 2211 ],
2199 'name': 'shard #${SHARD_INDEX} logcats' 2212 'name': 'shard #${SHARD_INDEX} logcats'
2200 } 2213 }
2201 ] 2214 ]
2202 }) 2215 })
2203 if 'desktop_args' in result: 2216
2204 if not is_android(tester_config): 2217 def add_conditional_args(key, fn):
2205 if not 'args' in result: 2218 if key in result:
2206 result['args'] = [] 2219 if fn(tester_config):
2207 result['args'] += result['desktop_args'] 2220 if not 'args' in result:
2208 # Don't put the desktop args in the JSON. 2221 result['args'] = []
2209 result.pop('desktop_args') 2222 result['args'] += result[key]
2210 if 'android_args' in result: 2223 # Don't put the conditional args in the JSON.
2211 if is_android(tester_config): 2224 result.pop(key)
Ken Russell (switch to Gerrit) 2017/04/26 00:55:44 Nice cleanup. Thanks.
2212 if not 'args' in result: 2225
2213 result['args'] = [] 2226 add_conditional_args('desktop_args', lambda cfg: not is_android(cfg))
2214 result['args'] += result['android_args'] 2227 add_conditional_args('linux_args', is_linux)
2215 # Don't put the android args in the JSON. 2228 add_conditional_args('android_args', is_android)
2216 result.pop('android_args') 2229
2217 if 'desktop_swarming' in result: 2230 if 'desktop_swarming' in result:
2218 if not is_android(tester_config): 2231 if not is_android(tester_config):
2219 result['swarming'].update(result['desktop_swarming']) 2232 result['swarming'].update(result['desktop_swarming'])
2220 # Don't put the desktop_swarming in the JSON. 2233 # Don't put the desktop_swarming in the JSON.
2221 result.pop('desktop_swarming') 2234 result.pop('desktop_swarming')
2222 # Remove the tester_configs and disabled_tester_configs, if present, 2235 # Remove the tester_configs and disabled_tester_configs, if present,
2223 # from the result. 2236 # from the result.
2224 remove_tester_configs_from_result(result) 2237 remove_tester_configs_from_result(result)
2225 2238
2226 # This flag only has an effect on the Linux bots that run tests 2239 # This flag only has an effect on the Linux bots that run tests
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 install_parent_links(WATERFALL) 2391 install_parent_links(WATERFALL)
2379 install_parent_links(V8_FYI_WATERFALL) 2392 install_parent_links(V8_FYI_WATERFALL)
2380 2393
2381 generate_all_tests(FYI_WATERFALL, 'chromium.gpu.fyi.json') 2394 generate_all_tests(FYI_WATERFALL, 'chromium.gpu.fyi.json')
2382 generate_all_tests(WATERFALL, 'chromium.gpu.json') 2395 generate_all_tests(WATERFALL, 'chromium.gpu.json')
2383 generate_all_tests(V8_FYI_WATERFALL, 'client.v8.fyi.json') 2396 generate_all_tests(V8_FYI_WATERFALL, 'client.v8.fyi.json')
2384 return 0 2397 return 0
2385 2398
2386 if __name__ == "__main__": 2399 if __name__ == "__main__":
2387 sys.exit(main()) 2400 sys.exit(main())
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | testing/buildbot/chromium.gpu.json » ('j') | tools/mb/mb.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698