| 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 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 'mac_chromium_compile_dbg': ['defaulttests'], | 1483 'mac_chromium_compile_dbg': ['defaulttests'], |
| 1484 'mac_chromium_rel_swarming': ['defaulttests'], | 1484 'mac_chromium_rel_swarming': ['defaulttests'], |
| 1485 'mac_gpu': ['defaulttests'], | 1485 'mac_gpu': ['defaulttests'], |
| 1486 'mac_nacl_sdk_build': ['compile'], | 1486 'mac_nacl_sdk_build': ['compile'], |
| 1487 'win_chromium_compile_dbg': ['defaulttests'], | 1487 'win_chromium_compile_dbg': ['defaulttests'], |
| 1488 'win_chromium_dbg': ['defaulttests'], | 1488 'win_chromium_dbg': ['defaulttests'], |
| 1489 'win_chromium_rel_swarming': ['defaulttests'], | 1489 'win_chromium_rel_swarming': ['defaulttests'], |
| 1490 'win_chromium_x64_rel_swarming': ['defaulttests'], | 1490 'win_chromium_x64_rel_swarming': ['defaulttests'], |
| 1491 'win_gpu': ['defaulttests'], | 1491 'win_gpu': ['defaulttests'], |
| 1492 'win_nacl_sdk_build': ['compile'], | 1492 'win_nacl_sdk_build': ['compile'], |
| 1493 'win8_chromium_rel': ['defaulttests'], |
| 1493 } | 1494 } |
| 1494 | 1495 |
| 1495 if bots: | 1496 if bots: |
| 1496 filtered_builders_and_tests = dict((bot, set(builders_and_tests[bot])) | 1497 filtered_builders_and_tests = dict((bot, set(builders_and_tests[bot])) |
| 1497 for bot in bots) | 1498 for bot in bots) |
| 1498 else: | 1499 else: |
| 1499 filtered_builders_and_tests = dict( | 1500 filtered_builders_and_tests = dict( |
| 1500 (bot, set(tests)) | 1501 (bot, set(tests)) |
| 1501 for bot, tests in builders_and_tests.iteritems()) | 1502 for bot, tests in builders_and_tests.iteritems()) |
| 1502 | 1503 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1534 | 1535 |
| 1535 if all(re.search(r'\.(m|mm)$|(^|[\\\/_])mac[\\\/_.]', f) for f in files): | 1536 if all(re.search(r'\.(m|mm)$|(^|[\\\/_])mac[\\\/_.]', f) for f in files): |
| 1536 return GetDefaultTryConfigs([ | 1537 return GetDefaultTryConfigs([ |
| 1537 'mac_chromium_compile_dbg', | 1538 'mac_chromium_compile_dbg', |
| 1538 'mac_chromium_rel_swarming', | 1539 'mac_chromium_rel_swarming', |
| 1539 ]) | 1540 ]) |
| 1540 if all(re.search('(^|[/_])win[/_.]', f) for f in files): | 1541 if all(re.search('(^|[/_])win[/_.]', f) for f in files): |
| 1541 return GetDefaultTryConfigs([ | 1542 return GetDefaultTryConfigs([ |
| 1542 'win_chromium_dbg', | 1543 'win_chromium_dbg', |
| 1543 'win_chromium_rel_swarming', | 1544 'win_chromium_rel_swarming', |
| 1545 'win8_chromium_rel', |
| 1544 ]) | 1546 ]) |
| 1545 if all(re.search(r'(^|[\\\/_])android[\\\/_.]', f) for f in files): | 1547 if all(re.search(r'(^|[\\\/_])android[\\\/_.]', f) for f in files): |
| 1546 return GetDefaultTryConfigs([ | 1548 return GetDefaultTryConfigs([ |
| 1547 'android_aosp', | 1549 'android_aosp', |
| 1548 'android_clang_dbg', | 1550 'android_clang_dbg', |
| 1549 'android_dbg_tests_recipe', | 1551 'android_dbg_tests_recipe', |
| 1550 ]) | 1552 ]) |
| 1551 if all(re.search(r'[\\\/_]ios[\\\/_.]', f) for f in files): | 1553 if all(re.search(r'[\\\/_]ios[\\\/_.]', f) for f in files): |
| 1552 return GetDefaultTryConfigs(['ios_rel_device', 'ios_dbg_simulator']) | 1554 return GetDefaultTryConfigs(['ios_rel_device', 'ios_dbg_simulator']) |
| 1553 | 1555 |
| 1554 builders = [ | 1556 builders = [ |
| 1555 'android_chromium_gn_compile_rel', | 1557 'android_chromium_gn_compile_rel', |
| 1556 'android_clang_dbg', | 1558 'android_clang_dbg', |
| 1557 'android_dbg_tests_recipe', | 1559 'android_dbg_tests_recipe', |
| 1558 'ios_dbg_simulator', | 1560 'ios_dbg_simulator', |
| 1559 'ios_rel_device', | 1561 'ios_rel_device', |
| 1560 'linux_chromium_chromeos_rel_swarming', | 1562 'linux_chromium_chromeos_rel_swarming', |
| 1561 'linux_chromium_clang_dbg', | 1563 'linux_chromium_clang_dbg', |
| 1562 'linux_chromium_gn_rel', | 1564 'linux_chromium_gn_rel', |
| 1563 'linux_chromium_rel_swarming', | 1565 'linux_chromium_rel_swarming', |
| 1564 'linux_gpu', | 1566 'linux_gpu', |
| 1565 'mac_chromium_compile_dbg', | 1567 'mac_chromium_compile_dbg', |
| 1566 'mac_chromium_rel_swarming', | 1568 'mac_chromium_rel_swarming', |
| 1567 'mac_gpu', | 1569 'mac_gpu', |
| 1568 'win_chromium_compile_dbg', | 1570 'win_chromium_compile_dbg', |
| 1569 'win_chromium_rel_swarming', | 1571 'win_chromium_rel_swarming', |
| 1570 'win_chromium_x64_rel_swarming', | 1572 'win_chromium_x64_rel_swarming', |
| 1571 'win_gpu', | 1573 'win_gpu', |
| 1574 'win8_chromium_rel', |
| 1572 ] | 1575 ] |
| 1573 | 1576 |
| 1574 # Match things like path/aura/file.cc and path/file_aura.cc. | 1577 # Match things like path/aura/file.cc and path/file_aura.cc. |
| 1575 # Same for chromeos. | 1578 # Same for chromeos. |
| 1576 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): | 1579 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): |
| 1577 builders.extend([ | 1580 builders.extend([ |
| 1578 'linux_chromeos_asan', | 1581 'linux_chromeos_asan', |
| 1579 'linux_chromium_chromeos_clang_dbg' | 1582 'linux_chromium_chromeos_clang_dbg' |
| 1580 ]) | 1583 ]) |
| 1581 | 1584 |
| 1582 # If there are gyp changes to base, build, or chromeos, run a full cros build | 1585 # If there are gyp changes to base, build, or chromeos, run a full cros build |
| 1583 # in addition to the shorter linux_chromeos build. Changes to high level gyp | 1586 # in addition to the shorter linux_chromeos build. Changes to high level gyp |
| 1584 # files have a much higher chance of breaking the cros build, which is | 1587 # files have a much higher chance of breaking the cros build, which is |
| 1585 # differnt from the linux_chromeos build that most chrome developers test | 1588 # differnt from the linux_chromeos build that most chrome developers test |
| 1586 # with. | 1589 # with. |
| 1587 if any(re.search('^(base|build|chromeos).*\.gypi?$', f) for f in files): | 1590 if any(re.search('^(base|build|chromeos).*\.gypi?$', f) for f in files): |
| 1588 builders.extend(['cros_x86']) | 1591 builders.extend(['cros_x86']) |
| 1589 | 1592 |
| 1590 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it | 1593 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it |
| 1591 # unless they're .gyp(i) files as changes to those files can break the gyp | 1594 # unless they're .gyp(i) files as changes to those files can break the gyp |
| 1592 # step on that bot. | 1595 # step on that bot. |
| 1593 if (not all(re.search('^chrome', f) for f in files) or | 1596 if (not all(re.search('^chrome', f) for f in files) or |
| 1594 any(re.search('\.gypi?$', f) for f in files)): | 1597 any(re.search('\.gypi?$', f) for f in files)): |
| 1595 builders.extend(['android_aosp']) | 1598 builders.extend(['android_aosp']) |
| 1596 | 1599 |
| 1597 return GetDefaultTryConfigs(builders) | 1600 return GetDefaultTryConfigs(builders) |
| OLD | NEW |