Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: tools/valgrind/tsan/PRESUBMIT.py

Issue 8951011: Add presubmit checks for TSan suppressions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/valgrind/tsan/PRESUBMIT.py
===================================================================
--- tools/valgrind/tsan/PRESUBMIT.py (revision 114626)
+++ tools/valgrind/tsan/PRESUBMIT.py (working copy)
@@ -2,10 +2,31 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import os
+import re
+import sys
+
"""
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on the presubmit API built into gcl.
"""
+def CheckChange(input_api, output_api):
+ """Checks the TSan suppressions files for bad suppressions."""
+
+ # TODO(timurrrr): find out how to do relative imports
+ # and remove this ugly hack. Also, the CheckChange function won't be needed.
+ tools_vg_path = os.path.join(input_api.PresubmitLocalPath(), '..')
+ sys.path.append(tools_vg_path)
+ import suppressions
+
Timur Iskhodzhanov 2011/12/15 13:17:27 moved the rest of the code to tools/valgrind/suppr
+ return suppressions.PresubmitCheck(input_api, output_api)
+
+def CheckChangeOnUpload(input_api, output_api):
+ return CheckChange(input_api, output_api)
+
+def CheckChangeOnCommit(input_api, output_api):
+ return CheckChange(input_api, output_api)
+
def GetPreferredTrySlaves():
return ['linux_tsan']

Powered by Google App Engine
This is Rietveld 408576698