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

Side by Side Diff: PRESUBMIT.py

Issue 110533009: Import TestRunner library into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | android_webview/tools/webview_licenses.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 10 matching lines...) Expand all
21 r"^native_client_sdk[\\\/]src[\\\/]tools[\\\/].*.mk", 21 r"^native_client_sdk[\\\/]src[\\\/]tools[\\\/].*.mk",
22 r"^net[\\\/]tools[\\\/]spdyshark[\\\/].*", 22 r"^net[\\\/]tools[\\\/]spdyshark[\\\/].*",
23 r"^skia[\\\/].*", 23 r"^skia[\\\/].*",
24 r"^v8[\\\/].*", 24 r"^v8[\\\/].*",
25 r".*MakeFile$", 25 r".*MakeFile$",
26 r".+_autogen\.h$", 26 r".+_autogen\.h$",
27 r".+[\\\/]pnacl_shim\.c$", 27 r".+[\\\/]pnacl_shim\.c$",
28 r"^gpu[\\\/]config[\\\/].*_list_json\.cc$", 28 r"^gpu[\\\/]config[\\\/].*_list_json\.cc$",
29 ) 29 )
30 30
31 # TestRunner library is temporarily excluded from pan-project checks until
32 # it's transitioned to chromium coding style.
33 _TESTRUNNER_PATHS = (
34 r"^content[\\\/]shell[\\\/]renderer[\\\/]test_runner[\\\/].*",
35 r"^content[\\\/]shell[\\\/]common[\\\/]test_runner[\\\/].*",
36 )
37
31 # Fragment of a regular expression that matches C++ and Objective-C++ 38 # Fragment of a regular expression that matches C++ and Objective-C++
32 # implementation files. 39 # implementation files.
33 _IMPLEMENTATION_EXTENSIONS = r'\.(cc|cpp|cxx|mm)$' 40 _IMPLEMENTATION_EXTENSIONS = r'\.(cc|cpp|cxx|mm)$'
34 41
35 # Regular expression that matches code only used for test binaries 42 # Regular expression that matches code only used for test binaries
36 # (best effort). 43 # (best effort).
37 _TEST_CODE_EXCLUDED_PATHS = ( 44 _TEST_CODE_EXCLUDED_PATHS = (
38 r'.*[/\\](fake_|test_|mock_).+%s' % _IMPLEMENTATION_EXTENSIONS, 45 r'.*[/\\](fake_|test_|mock_).+%s' % _IMPLEMENTATION_EXTENSIONS,
39 r'.+_test_(base|support|util)%s' % _IMPLEMENTATION_EXTENSIONS, 46 r'.+_test_(base|support|util)%s' % _IMPLEMENTATION_EXTENSIONS,
40 r'.+_(api|browser|perf|pixel|unit|ui)?test(_[a-z]+)?%s' % 47 r'.+_(api|browser|perf|pixel|unit|ui)?test(_[a-z]+)?%s' %
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 sys.path = original_sys_path 999 sys.path = original_sys_path
993 1000
994 return checkstyle.RunCheckstyle( 1001 return checkstyle.RunCheckstyle(
995 input_api, output_api, 'tools/android/checkstyle/chromium-style-5.0.xml') 1002 input_api, output_api, 'tools/android/checkstyle/chromium-style-5.0.xml')
996 1003
997 1004
998 def _CommonChecks(input_api, output_api): 1005 def _CommonChecks(input_api, output_api):
999 """Checks common to both upload and commit.""" 1006 """Checks common to both upload and commit."""
1000 results = [] 1007 results = []
1001 results.extend(input_api.canned_checks.PanProjectChecks( 1008 results.extend(input_api.canned_checks.PanProjectChecks(
1002 input_api, output_api, excluded_paths=_EXCLUDED_PATHS)) 1009 input_api, output_api,
1010 excluded_paths=_EXCLUDED_PATHS + _TESTRUNNER_PATHS))
1003 results.extend(_CheckAuthorizedAuthor(input_api, output_api)) 1011 results.extend(_CheckAuthorizedAuthor(input_api, output_api))
1004 results.extend( 1012 results.extend(
1005 _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api)) 1013 _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api))
1006 results.extend(_CheckNoIOStreamInHeaders(input_api, output_api)) 1014 results.extend(_CheckNoIOStreamInHeaders(input_api, output_api))
1007 results.extend(_CheckNoUNIT_TESTInSourceFiles(input_api, output_api)) 1015 results.extend(_CheckNoUNIT_TESTInSourceFiles(input_api, output_api))
1008 results.extend(_CheckNoNewWStrings(input_api, output_api)) 1016 results.extend(_CheckNoNewWStrings(input_api, output_api))
1009 results.extend(_CheckNoDEPSGIT(input_api, output_api)) 1017 results.extend(_CheckNoDEPSGIT(input_api, output_api))
1010 results.extend(_CheckNoBannedFunctions(input_api, output_api)) 1018 results.extend(_CheckNoBannedFunctions(input_api, output_api))
1011 results.extend(_CheckNoPragmaOnce(input_api, output_api)) 1019 results.extend(_CheckNoPragmaOnce(input_api, output_api))
1012 results.extend(_CheckNoTrinaryTrueFalse(input_api, output_api)) 1020 results.extend(_CheckNoTrinaryTrueFalse(input_api, output_api))
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 trybots.extend(GetDefaultTryConfigs(['cros_x86'])) 1475 trybots.extend(GetDefaultTryConfigs(['cros_x86']))
1468 1476
1469 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it 1477 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it
1470 # unless they're .gyp(i) files as changes to those files can break the gyp 1478 # unless they're .gyp(i) files as changes to those files can break the gyp
1471 # step on that bot. 1479 # step on that bot.
1472 if (not all(re.search('^chrome', f) for f in files) or 1480 if (not all(re.search('^chrome', f) for f in files) or
1473 any(re.search('\.gypi?$', f) for f in files)): 1481 any(re.search('\.gypi?$', f) for f in files)):
1474 trybots.extend(GetDefaultTryConfigs(['android_aosp'])) 1482 trybots.extend(GetDefaultTryConfigs(['android_aosp']))
1475 1483
1476 return trybots 1484 return trybots
OLDNEW
« no previous file with comments | « no previous file | android_webview/tools/webview_licenses.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698