diff options
author | Ben Murdoch <benm@google.com> | 2014-04-24 10:50:13 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2014-04-24 10:50:13 +0100 |
commit | 0529e5d033099cbfc42635f6f6183833b09dff6e (patch) | |
tree | badea60062e611382d8a37e3b0bfda8d69760c2b /PRESUBMIT.py | |
parent | 8346740f6fb555ccbb9b4148ab63402ae8f6e4ca (diff) | |
download | chromium_org-0529e5d033099cbfc42635f6f6183833b09dff6e.tar.gz |
Merge from Chromium at DEPS revision 265802
This commit was generated by merge_to_master.py.
Change-Id: I6fac2dbbce472b18ca943b6e6f247835b0bd6281
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r-- | PRESUBMIT.py | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 1260528a06..67d5578437 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -79,7 +79,7 @@ _BANNED_OBJC_FUNCTIONS = ( False, ), ( - 'NSTrackingArea', + r'/NSTrackingArea\W', ( 'The use of NSTrackingAreas is prohibited. Please use CrTrackingArea', 'instead.', @@ -396,7 +396,14 @@ def _CheckNoBannedFunctions(input_api, output_api): for f in input_api.AffectedFiles(file_filter=file_filter): for line_num, line in f.ChangedContents(): for func_name, message, error in _BANNED_OBJC_FUNCTIONS: - if func_name in line: + matched = False + if func_name[0:1] == '/': + regex = func_name[1:] + if input_api.re.search(regex, line): + matched = True + elif func_name in line: + matched = True + if matched: problems = warnings; if error: problems = errors; @@ -911,8 +918,7 @@ def _CheckSpamLogging(input_api, output_api): r"^chrome[\\\/]browser[\\\/]ui[\\\/]startup[\\\/]" r"startup_browser_creator\.cc$", r"^chrome[\\\/]installer[\\\/]setup[\\\/].*", - r"^chrome[\\\/]renderer[\\\/]extensions[\\\/]" - r"logging_native_handler\.cc$", + r"^extensions[\\\/]renderer[\\\/]logging_native_handler\.cc$", r"^content[\\\/]common[\\\/]gpu[\\\/]client[\\\/]" r"gl_helper_benchmark\.cc$", r"^native_client_sdk[\\\/]", @@ -1255,6 +1261,16 @@ def CheckChangeOnUpload(input_api, output_api): return results +def GetTryServerMasterForBot(bot): + """Returns the Try Server master for the given bot. + + Assumes that most Try Servers are on the tryserver.chromium master.""" + non_default_master_map = { + 'linux_gpu': 'tryserver.chromium.gpu', + } + return non_default_master_map.get(bot, 'tryserver.chromium') + + def GetDefaultTryConfigs(bots=None): """Returns a list of ('bot', set(['tests']), optionally filtered by [bots]. @@ -1323,6 +1339,7 @@ def GetDefaultTryConfigs(bots=None): 'linux_chromium_compile_dbg': ['defaulttests'], 'linux_chromium_rel': ['defaulttests'], 'linux_chromium_clang_dbg': ['defaulttests'], + 'linux_gpu': ['defaulttests'], 'linux_nacl_sdk_build': ['compile'], 'linux_rel': [ 'telemetry_perf_unittests', @@ -1388,16 +1405,18 @@ def GetDefaultTryConfigs(bots=None): for x in builders_and_tests[bot]] if bots: - return { - 'tryserver.chromium': dict((bot, set(builders_and_tests[bot])) - for bot in bots) - } + filtered_builders_and_tests = dict((bot, set(builders_and_tests[bot])) + for bot in bots) else: - return { - 'tryserver.chromium': dict( - (bot, set(tests)) - for bot, tests in builders_and_tests.iteritems()) - } + filtered_builders_and_tests = dict( + (bot, set(tests)) + for bot, tests in builders_and_tests.iteritems()) + + # Build up the mapping from tryserver master to bot/test. + out = dict() + for bot, tests in filtered_builders_and_tests.iteritems(): + out.setdefault(GetTryServerMasterForBot(bot), {})[bot] = tests + return out def CheckChangeOnCommit(input_api, output_api): @@ -1450,6 +1469,7 @@ def GetPreferredTryMasters(project, change): 'linux_chromium_chromeos_rel', 'linux_chromium_clang_dbg', 'linux_chromium_rel', + 'linux_gpu', 'mac_chromium_compile_dbg', 'mac_chromium_rel', 'win_chromium_compile_dbg', |