OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 import os |
| 6 import re |
| 7 import sys |
| 8 |
5 """ | 9 """ |
6 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 10 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
7 for more details on the presubmit API built into gcl. | 11 for more details on the presubmit API built into gcl. |
8 """ | 12 """ |
9 | 13 |
| 14 def CheckChange(input_api, output_api): |
| 15 """Checks the TSan suppressions files for bad suppressions.""" |
| 16 |
| 17 # TODO(timurrrr): find out how to do relative imports |
| 18 # and remove this ugly hack. Also, the CheckChange function won't be needed. |
| 19 tools_vg_path = os.path.join(input_api.PresubmitLocalPath(), '..') |
| 20 sys.path.append(tools_vg_path) |
| 21 import suppressions |
| 22 |
| 23 return suppressions.PresubmitCheck(input_api, output_api) |
| 24 |
| 25 def CheckChangeOnUpload(input_api, output_api): |
| 26 return CheckChange(input_api, output_api) |
| 27 |
| 28 def CheckChangeOnCommit(input_api, output_api): |
| 29 return CheckChange(input_api, output_api) |
| 30 |
10 def GetPreferredTrySlaves(): | 31 def GetPreferredTrySlaves(): |
11 return ['linux_tsan'] | 32 return ['linux_tsan'] |
OLD | NEW |