[refactor] More post-NSS WebCrypto cleanups (utility functions).
[chromium-blink-merge.git] / tools / valgrind / drmemory / PRESUBMIT.py
blob2e56b63d4642ce07049a9a813b65064db588618a
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.
4 """
5 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
6 for more details on the presubmit API built into depot_tools.
7 """
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(), '..')
16 import sys
17 old_path = sys.path
18 try:
19 sys.path = sys.path + [tools_vg_path]
20 import suppressions
21 return suppressions.PresubmitCheck(input_api, output_api)
22 finally:
23 sys.path = old_path
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 GetPreferredTryMasters(project, change):
35 return {
36 'tryserver.chromium.win': {
37 'win_drmemory': set(['defaulttests']),