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 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
6 for more details on the presubmit API built into gcl.
10 def CheckChange(input_api, output_api):
11 """Checks the DrMemory suppression files for bad suppressions."""
13 # TODO(timurrrr): find out how to do relative imports
14 # and remove this ugly hack. Also, the CheckChange function won't be needed.
15 tools_vg_path = input_api.os_path.join(input_api.PresubmitLocalPath(), '..')
19 sys.path = sys.path + [tools_vg_path]
21 return suppressions.PresubmitCheck(input_api, output_api)
26 def CheckChangeOnUpload(input_api, output_api):
27 return CheckChange(input_api, output_api)
30 def CheckChangeOnCommit(input_api, output_api):
31 return CheckChange(input_api, output_api)
34 def GetPreferredTrySlaves():
35 return ['win_drmemory']