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

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

Issue 7551030: Valgrind/Heapchecker: Only run presubmit check on suppression files. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 5 months 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
« no previous file with comments | « tools/heapcheck/PRESUBMIT.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/valgrind/memcheck/PRESUBMIT.py
===================================================================
--- tools/valgrind/memcheck/PRESUBMIT.py (revision 94938)
+++ tools/valgrind/memcheck/PRESUBMIT.py (working copy)
@@ -7,8 +7,11 @@
for more details on the presubmit API built into gcl.
"""
+import re
+
def CheckChange(input_api, output_api):
"""Checks the memcheck suppressions files for bad data."""
+ sup_regex = re.compile('suppressions.*\.txt$')
suppressions = {}
errors = []
check_for_memcheck = False
@@ -17,7 +20,7 @@
# - 'skip_suppression_name': the next line is a suppression name, skip.
# - 'skip_param': the next line is a system call parameter error, skip.
skip_next_line = False
- for f in filter(lambda x: x.LocalPath().endswith('.txt'),
+ for f in filter(lambda x: sup_regex.search(x.LocalPath()),
input_api.AffectedFiles()):
for line, line_num in zip(f.NewContents(),
xrange(1, len(f.NewContents()) + 1)):
« no previous file with comments | « tools/heapcheck/PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698