OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Top-level presubmit script for Chromium. | 5 """Top-level presubmit script for Chromium. |
6 | 6 |
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
8 for more details about the presubmit API built into gcl. | 8 for more details about the presubmit API built into gcl. |
9 """ | 9 """ |
10 | 10 |
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1411 def CheckChangeOnUpload(input_api, output_api): | 1411 def CheckChangeOnUpload(input_api, output_api): |
1412 results = [] | 1412 results = [] |
1413 results.extend(_CommonChecks(input_api, output_api)) | 1413 results.extend(_CommonChecks(input_api, output_api)) |
1414 results.extend(_CheckJavaStyle(input_api, output_api)) | 1414 results.extend(_CheckJavaStyle(input_api, output_api)) |
1415 return results | 1415 return results |
1416 | 1416 |
1417 | 1417 |
1418 def GetTryServerMasterForBot(bot): | 1418 def GetTryServerMasterForBot(bot): |
1419 """Returns the Try Server master for the given bot. | 1419 """Returns the Try Server master for the given bot. |
1420 | 1420 |
1421 Assumes that most Try Servers are on the tryserver.chromium master.""" | 1421 It tries to guess the master from the bot name, but may still fail |
1422 non_default_master_map = { | 1422 and return None. There is no longer a default master. |
1423 """ | |
1424 # Potentially ambiguous bot names are listed explicitly. | |
1425 master_map = { | |
1423 'linux_gpu': 'tryserver.chromium.gpu', | 1426 'linux_gpu': 'tryserver.chromium.gpu', |
1424 'mac_gpu': 'tryserver.chromium.gpu', | 1427 'mac_gpu': 'tryserver.chromium.gpu', |
1425 'win_gpu': 'tryserver.chromium.gpu', | 1428 'win_gpu': 'tryserver.chromium.gpu', |
1429 'chromium_presubmit': 'tryserver.chromium.linux', | |
1430 'blink_presubmit': 'tryserver.chromium.linux', | |
1431 'tools_build_presubmit': 'tryserver.chromium.linux', | |
1426 } | 1432 } |
1427 return non_default_master_map.get(bot, 'tryserver.chromium') | 1433 master = master_map.get(bot) |
1434 if not master: | |
1435 if 'gpu' in bot: | |
1436 master = 'tryserver.chromium.gpu' | |
1437 elif 'linux' in bot or 'android' in bot or 'presubmit' in bot: | |
1438 master = 'tryserver.chromium.linux' | |
1439 elif 'win' in bot: | |
1440 master = 'tryserver.chromium.win' | |
1441 elif 'mac' in bot or 'ios' in bot: | |
1442 master = 'tryserver.chromium.mac' | |
1443 return master | |
1428 | 1444 |
1429 | 1445 |
1430 def GetDefaultTryConfigs(bots=None): | 1446 def GetDefaultTryConfigs(bots=None): |
1431 """Returns a list of ('bot', set(['tests']), optionally filtered by [bots]. | 1447 """Returns a list of ('bot', set(['tests']), optionally filtered by [bots]. |
1432 | 1448 |
1433 To add tests to this list, they MUST be in the the corresponding master's | 1449 To add tests to this list, they MUST be in the the corresponding master's |
1434 gatekeeper config. For example, anything on master.chromium would be closed by | 1450 gatekeeper config. For example, anything on master.chromium would be closed by |
1435 tools/build/masters/master.chromium/master_gatekeeper_cfg.py. | 1451 tools/build/masters/master.chromium/master_gatekeeper_cfg.py. |
1436 | 1452 |
1437 If 'bots' is specified, will only return configurations for bots in that list. | 1453 If 'bots' is specified, will only return configurations for bots in that list. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1488 'ios_rel_device': ['compile'], | 1504 'ios_rel_device': ['compile'], |
1489 'linux_asan': ['compile'], | 1505 'linux_asan': ['compile'], |
1490 'mac_asan': ['compile'], | 1506 'mac_asan': ['compile'], |
1491 #TODO(stip): Change the name of this builder to reflect that it's release. | 1507 #TODO(stip): Change the name of this builder to reflect that it's release. |
1492 'linux_gtk': standard_tests, | 1508 'linux_gtk': standard_tests, |
1493 'linux_chromeos_asan': ['compile'], | 1509 'linux_chromeos_asan': ['compile'], |
1494 'linux_chromium_chromeos_clang_dbg': ['defaulttests'], | 1510 'linux_chromium_chromeos_clang_dbg': ['defaulttests'], |
1495 'linux_chromium_chromeos_rel': ['defaulttests'], | 1511 'linux_chromium_chromeos_rel': ['defaulttests'], |
1496 'linux_chromium_compile_dbg': ['defaulttests'], | 1512 'linux_chromium_compile_dbg': ['defaulttests'], |
1497 'linux_chromium_gn_rel': ['defaulttests'], | 1513 'linux_chromium_gn_rel': ['defaulttests'], |
1498 'linux_chromium_rel': ['defaulttests'], | 1514 'linux_chromium_rel_swarming': ['defaulttests'], |
agable
2014/07/24 23:58:02
Why is this part of this CL? Seems like it should
Sergey Berezin
2014/07/25 00:55:45
I think you're right. But now I'd have to spend ti
Sergiy Byelozyorov
2014/07/25 09:40:01
If you decide to keep it, please mention this chan
Sergey Berezin
2014/07/25 15:46:54
Done.
| |
1499 'linux_chromium_clang_dbg': ['defaulttests'], | 1515 'linux_chromium_clang_dbg': ['defaulttests'], |
1500 'linux_gpu': ['defaulttests'], | 1516 'linux_gpu': ['defaulttests'], |
1501 'linux_nacl_sdk_build': ['compile'], | 1517 'linux_nacl_sdk_build': ['compile'], |
1502 'mac_chromium_compile_dbg': ['defaulttests'], | 1518 'mac_chromium_compile_dbg': ['defaulttests'], |
1503 'mac_chromium_rel': ['defaulttests'], | 1519 'mac_chromium_rel': ['defaulttests'], |
1504 'mac_gpu': ['defaulttests'], | 1520 'mac_gpu': ['defaulttests'], |
1505 'mac_nacl_sdk_build': ['compile'], | 1521 'mac_nacl_sdk_build': ['compile'], |
1506 'win_chromium_compile_dbg': ['defaulttests'], | 1522 'win_chromium_compile_dbg': ['defaulttests'], |
1507 'win_chromium_dbg': ['defaulttests'], | 1523 'win_chromium_dbg': ['defaulttests'], |
1508 'win_chromium_rel': ['defaulttests'], | 1524 'win_chromium_rel': ['defaulttests'], |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1570 | 1586 |
1571 builders = [ | 1587 builders = [ |
1572 'android_chromium_gn_compile_rel', | 1588 'android_chromium_gn_compile_rel', |
1573 'android_clang_dbg', | 1589 'android_clang_dbg', |
1574 'android_dbg', | 1590 'android_dbg', |
1575 'ios_dbg_simulator', | 1591 'ios_dbg_simulator', |
1576 'ios_rel_device', | 1592 'ios_rel_device', |
1577 'linux_chromium_chromeos_rel', | 1593 'linux_chromium_chromeos_rel', |
1578 'linux_chromium_clang_dbg', | 1594 'linux_chromium_clang_dbg', |
1579 'linux_chromium_gn_rel', | 1595 'linux_chromium_gn_rel', |
1580 'linux_chromium_rel', | 1596 'linux_chromium_rel_swarming', |
1581 'linux_gpu', | 1597 'linux_gpu', |
1582 'mac_chromium_compile_dbg', | 1598 'mac_chromium_compile_dbg', |
1583 'mac_chromium_rel', | 1599 'mac_chromium_rel', |
1584 'mac_gpu', | 1600 'mac_gpu', |
1585 'win_chromium_compile_dbg', | 1601 'win_chromium_compile_dbg', |
1586 'win_chromium_rel', | 1602 'win_chromium_rel', |
1587 'win_chromium_x64_rel', | 1603 'win_chromium_x64_rel', |
1588 'win_gpu', | 1604 'win_gpu', |
1589 ] | 1605 ] |
1590 | 1606 |
(...skipping 14 matching lines...) Expand all Loading... | |
1605 builders.extend(['cros_x86']) | 1621 builders.extend(['cros_x86']) |
1606 | 1622 |
1607 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it | 1623 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it |
1608 # unless they're .gyp(i) files as changes to those files can break the gyp | 1624 # unless they're .gyp(i) files as changes to those files can break the gyp |
1609 # step on that bot. | 1625 # step on that bot. |
1610 if (not all(re.search('^chrome', f) for f in files) or | 1626 if (not all(re.search('^chrome', f) for f in files) or |
1611 any(re.search('\.gypi?$', f) for f in files)): | 1627 any(re.search('\.gypi?$', f) for f in files)): |
1612 builders.extend(['android_aosp']) | 1628 builders.extend(['android_aosp']) |
1613 | 1629 |
1614 return GetDefaultTryConfigs(builders) | 1630 return GetDefaultTryConfigs(builders) |
OLD | NEW |