| OLD | NEW |
| 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 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 ], | 1481 ], |
| 1482 # Don't run these tests on Android. | 1482 # Don't run these tests on Android. |
| 1483 'disabled_tester_configs': [ | 1483 'disabled_tester_configs': [ |
| 1484 { | 1484 { |
| 1485 'names': [ | 1485 'names': [ |
| 1486 'Linux ChromiumOS Ozone (Intel)', | 1486 'Linux ChromiumOS Ozone (Intel)', |
| 1487 ], | 1487 ], |
| 1488 'os_types': ['android'], | 1488 'os_types': ['android'], |
| 1489 }, | 1489 }, |
| 1490 ], | 1490 ], |
| 1491 'args': [ |
| 1492 '--enable-gpu', |
| 1493 '--test-launcher-bot-mode', |
| 1494 '--test-launcher-jobs=1', |
| 1495 '--gtest_filter=CastStreamingApiTestWithPixelOutput.EndToEnd*:' + \ |
| 1496 'TabCaptureApiPixelTest.EndToEnd*' |
| 1497 ], |
| 1498 'linux_args': [ '--no-xvfb' ], |
| 1499 'test': 'browser_tests', |
| 1491 }, | 1500 }, |
| 1492 'video_decode_accelerator_d3d11_unittest': { | 1501 'video_decode_accelerator_d3d11_unittest': { |
| 1493 'tester_configs': [ | 1502 'tester_configs': [ |
| 1494 { | 1503 { |
| 1495 'os_types': ['win'] | 1504 'os_types': ['win'] |
| 1496 }, | 1505 }, |
| 1497 ], | 1506 ], |
| 1498 'args': [ | 1507 'args': [ |
| 1499 '--use-angle=d3d11', | 1508 '--use-angle=d3d11', |
| 1500 '--use-test-data-path', | 1509 '--use-test-data-path', |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 { | 1567 { |
| 1559 'names': [ | 1568 'names': [ |
| 1560 'Linux ChromiumOS Ozone (Intel)', | 1569 'Linux ChromiumOS Ozone (Intel)', |
| 1561 ], | 1570 ], |
| 1562 'os_types': ['android'], | 1571 'os_types': ['android'], |
| 1563 }, | 1572 }, |
| 1564 ], | 1573 ], |
| 1565 'test': 'browser_tests', | 1574 'test': 'browser_tests', |
| 1566 'args': [ | 1575 'args': [ |
| 1567 '--enable-gpu', | 1576 '--enable-gpu', |
| 1577 '--no-xvfb', |
| 1568 '--test-launcher-jobs=1', | 1578 '--test-launcher-jobs=1', |
| 1569 '--gtest_filter=CastStreamingApiTestWithPixelOutput.EndToEnd*:' + \ | 1579 '--gtest_filter=CastStreamingApiTestWithPixelOutput.EndToEnd*:' + \ |
| 1570 'TabCaptureApiPixelTest.EndToEnd*' | 1580 'TabCaptureApiPixelTest.EndToEnd*' |
| 1571 ], | 1581 ], |
| 1572 'swarming': { | 1582 'swarming': { |
| 1573 'can_use_on_swarming_builders': False, | 1583 'can_use_on_swarming_builders': False, |
| 1574 }, | 1584 }, |
| 1575 } | 1585 } |
| 1576 } | 1586 } |
| 1577 | 1587 |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2097 def matches_swarming_dimensions(tester_config, dimension_sets): | 2107 def matches_swarming_dimensions(tester_config, dimension_sets): |
| 2098 for dimensions in dimension_sets: | 2108 for dimensions in dimension_sets: |
| 2099 for cur_dims in tester_config['swarming_dimensions']: | 2109 for cur_dims in tester_config['swarming_dimensions']: |
| 2100 if set(dimensions.items()).issubset(cur_dims.items()): | 2110 if set(dimensions.items()).issubset(cur_dims.items()): |
| 2101 return True | 2111 return True |
| 2102 return False | 2112 return False |
| 2103 | 2113 |
| 2104 def is_android(tester_config): | 2114 def is_android(tester_config): |
| 2105 return tester_config['os_type'] == 'android' | 2115 return tester_config['os_type'] == 'android' |
| 2106 | 2116 |
| 2117 def is_linux(tester_config): |
| 2118 return tester_config['os_type'] == 'linux' |
| 2119 |
| 2107 def is_asan(tester_config): | 2120 def is_asan(tester_config): |
| 2108 return tester_config.get('is_asan', False) | 2121 return tester_config.get('is_asan', False) |
| 2109 | 2122 |
| 2110 | 2123 |
| 2111 # Returns a list describing the type of this tester. It may include | 2124 # Returns a list describing the type of this tester. It may include |
| 2112 # both the type of the bot as well as the waterfall. | 2125 # both the type of the bot as well as the waterfall. |
| 2113 def get_tester_type(tester_config): | 2126 def get_tester_type(tester_config): |
| 2114 result = [] | 2127 result = [] |
| 2115 if 'type' in tester_config: | 2128 if 'type' in tester_config: |
| 2116 result.append(tester_config['type']) | 2129 result.append(tester_config['type']) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2211 { | 2224 { |
| 2212 'link': [ | 2225 'link': [ |
| 2213 'https://luci-logdog.appspot.com/v/?s', | 2226 'https://luci-logdog.appspot.com/v/?s', |
| 2214 '=android%2Fswarming%2Flogcats%2F', | 2227 '=android%2Fswarming%2Flogcats%2F', |
| 2215 '${TASK_ID}%2F%2B%2Funified_logcats' | 2228 '${TASK_ID}%2F%2B%2Funified_logcats' |
| 2216 ], | 2229 ], |
| 2217 'name': 'shard #${SHARD_INDEX} logcats' | 2230 'name': 'shard #${SHARD_INDEX} logcats' |
| 2218 } | 2231 } |
| 2219 ] | 2232 ] |
| 2220 }) | 2233 }) |
| 2221 if 'desktop_args' in result: | 2234 |
| 2222 if not is_android(tester_config): | 2235 def add_conditional_args(key, fn): |
| 2223 if not 'args' in result: | 2236 if key in result: |
| 2224 result['args'] = [] | 2237 if fn(tester_config): |
| 2225 result['args'] += result['desktop_args'] | 2238 if not 'args' in result: |
| 2226 # Don't put the desktop args in the JSON. | 2239 result['args'] = [] |
| 2227 result.pop('desktop_args') | 2240 result['args'] += result[key] |
| 2228 if 'android_args' in result: | 2241 # Don't put the conditional args in the JSON. |
| 2229 if is_android(tester_config): | 2242 result.pop(key) |
| 2230 if not 'args' in result: | 2243 |
| 2231 result['args'] = [] | 2244 add_conditional_args('desktop_args', lambda cfg: not is_android(cfg)) |
| 2232 result['args'] += result['android_args'] | 2245 add_conditional_args('linux_args', is_linux) |
| 2233 # Don't put the android args in the JSON. | 2246 add_conditional_args('android_args', is_android) |
| 2234 result.pop('android_args') | 2247 |
| 2235 if 'desktop_swarming' in result: | 2248 if 'desktop_swarming' in result: |
| 2236 if not is_android(tester_config): | 2249 if not is_android(tester_config): |
| 2237 result['swarming'].update(result['desktop_swarming']) | 2250 result['swarming'].update(result['desktop_swarming']) |
| 2238 # Don't put the desktop_swarming in the JSON. | 2251 # Don't put the desktop_swarming in the JSON. |
| 2239 result.pop('desktop_swarming') | 2252 result.pop('desktop_swarming') |
| 2240 # Remove the tester_configs and disabled_tester_configs, if present, | 2253 # Remove the tester_configs and disabled_tester_configs, if present, |
| 2241 # from the result. | 2254 # from the result. |
| 2242 remove_tester_configs_from_result(result) | 2255 remove_tester_configs_from_result(result) |
| 2243 | 2256 |
| 2244 # This flag only has an effect on the Linux bots that run tests | 2257 # 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 Loading... |
| 2396 install_parent_links(WATERFALL) | 2409 install_parent_links(WATERFALL) |
| 2397 install_parent_links(V8_FYI_WATERFALL) | 2410 install_parent_links(V8_FYI_WATERFALL) |
| 2398 | 2411 |
| 2399 generate_all_tests(FYI_WATERFALL, 'chromium.gpu.fyi.json') | 2412 generate_all_tests(FYI_WATERFALL, 'chromium.gpu.fyi.json') |
| 2400 generate_all_tests(WATERFALL, 'chromium.gpu.json') | 2413 generate_all_tests(WATERFALL, 'chromium.gpu.json') |
| 2401 generate_all_tests(V8_FYI_WATERFALL, 'client.v8.fyi.json') | 2414 generate_all_tests(V8_FYI_WATERFALL, 'client.v8.fyi.json') |
| 2402 return 0 | 2415 return 0 |
| 2403 | 2416 |
| 2404 if __name__ == "__main__": | 2417 if __name__ == "__main__": |
| 2405 sys.exit(main()) | 2418 sys.exit(main()) |
| OLD | NEW |