kjellander@webrtc.org | b6e4cc7 | 2012-05-27 20:59:35 +0000 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 | # |
| 4 | # Use of this source code is governed by a BSD-style license |
| 5 | # that can be found in the LICENSE file in the root of the source |
| 6 | # tree. An additional intellectual property rights grant can be found |
| 7 | # in the file PATENTS. All contributing project authors may |
| 8 | # be found in the AUTHORS file in the root of the source tree. |
| 9 | |
| 10 | import os |
| 11 | import re |
| 12 | import sys |
| 13 | |
| 14 | """ |
| 15 | Copied from Chrome's src/tools/valgrind/tsan/PRESUBMIT.py |
| 16 | |
| 17 | See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 18 | for more details on the presubmit API built into gcl. |
| 19 | """ |
| 20 | |
| 21 | def CheckChange(input_api, output_api): |
| 22 | """Checks the TSan suppressions files for bad suppressions.""" |
| 23 | |
| 24 | # Add the path to the Chrome valgrind dir to the import path: |
| 25 | tools_vg_path = os.path.join(input_api.PresubmitLocalPath(), '..', '..', |
| 26 | 'valgrind') |
| 27 | sys.path.append(tools_vg_path) |
| 28 | import suppressions |
| 29 | |
| 30 | return suppressions.PresubmitCheck(input_api, output_api) |
| 31 | |
kjellander@webrtc.org | 5aedb29 | 2013-09-02 11:50:46 +0000 | [diff] [blame] | 32 | |
kjellander@webrtc.org | b6e4cc7 | 2012-05-27 20:59:35 +0000 | [diff] [blame] | 33 | def CheckChangeOnUpload(input_api, output_api): |
| 34 | return CheckChange(input_api, output_api) |
| 35 | |
kjellander@webrtc.org | 5aedb29 | 2013-09-02 11:50:46 +0000 | [diff] [blame] | 36 | |
kjellander@webrtc.org | b6e4cc7 | 2012-05-27 20:59:35 +0000 | [diff] [blame] | 37 | def CheckChangeOnCommit(input_api, output_api): |
| 38 | return CheckChange(input_api, output_api) |
| 39 | |
kjellander@webrtc.org | 5aedb29 | 2013-09-02 11:50:46 +0000 | [diff] [blame] | 40 | |
kjellander@webrtc.org | b6e4cc7 | 2012-05-27 20:59:35 +0000 | [diff] [blame] | 41 | def GetPreferredTrySlaves(): |
kjellander@webrtc.org | 5aedb29 | 2013-09-02 11:50:46 +0000 | [diff] [blame] | 42 | return ['linux_tsan'] |