Copy ldb files in ChromiumEnv for the purpose of backups.
[chromium-blink-merge.git] / native_client_sdk / PRESUBMIT.py
blob93e7ad710ee0692e5c0992c3e201b2458ea57cfe
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
3 # found in the LICENSE file.
5 """Top-level presubmit script for isolate.
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
8 details on the presubmit API built into gcl.
9 """
12 def CommonChecks(input_api, output_api):
13 output = []
14 disabled_warnings = [
15 'F0401', # Unable to import module
16 'R0401', # Cyclic import
17 'W0613', # Unused argument
18 'E1103', # subprocess.communicate() generates these :(
19 'R0201', # method could be function (doesn't reference self)
21 black_list = [
22 r'src[\\\/]build_tools[\\\/]tests[\\\/].*',
23 r'src[\\\/]build_tools[\\\/]sdk_tools[\\\/]third_party[\\\/].*',
24 r'src[\\\/]doc[\\\/]*',
26 canned = input_api.canned_checks
27 output.extend(canned.RunPylint(input_api, output_api, black_list=black_list,
28 disabled_warnings=disabled_warnings))
29 return output
32 def CheckChangeOnUpload(input_api, output_api):
33 return CommonChecks(input_api, output_api)
36 def CheckChangeOnCommit(input_api, output_api):
37 return CommonChecks(input_api, output_api)
40 def GetPreferredTrySlaves(project, change):
41 return [
42 'linux_nacl_sdk',
43 'linux_nacl_sdk_build',
44 'win_nacl_sdk',
45 'win_nacl_sdk_build',
46 'mac_nacl_sdk',
47 'mac_nacl_sdk_build'