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

Unified Diff: PRESUBMIT.py

Issue 10535106: Fix presubmit check to account for e.g. fooblat_unittest_android.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 71342f19ff02ecc752e401ebc6f1d5071e33df65..d4d00ed9796ec373399757dc0fe0929ef0a248c8 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -61,12 +61,14 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api):
# We only scan .cc files and the like, as the declaration of
# for-testing functions in header files are hard to distinguish from
# calls to such functions without a proper C++ parser.
+ platform_specifiers = r'(_(android|chromeos|gtk|mac|posix|win))?'
source_extensions = r'\.(cc|cpp|cxx|mm)$'
file_inclusion_pattern = r'.+%s' % source_extensions
file_exclusion_patterns = (
r'.*[/\\](test_|mock_).+%s' % source_extensions,
r'.+_test_(base|support|util)%s' % source_extensions,
- r'.+_(api|browser|perf|unit|ui)?test%s' % source_extensions,
+ r'.+_(api|browser|perf|unit|ui)?test%s%s' % (platform_specifiers,
+ source_extensions),
r'.+profile_sync_service_harness%s' % source_extensions,
)
path_exclusion_patterns = (
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698