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

Side by Side Diff: tools/vim/PRESUBMIT.py

Issue 1469023002: YouCompleteMe Ninja integration should accept dirs named out_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed regression, add test, include ninja_output.py in PRESUBMIT Created 5 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
« no previous file with comments | « no previous file | tools/vim/ninja_output.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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 """Presubmit tests for /tools/vim. 5 """Presubmit tests for /tools/vim.
6 6
7 Runs Python unit tests in /tools/vim/tests on upload. 7 Runs Python unit tests in /tools/vim/tests on upload.
8 """ 8 """
9 9
10 def CheckChangeOnUpload(input_api, output_api): 10 def CheckChangeOnUpload(input_api, output_api):
11 results = [] 11 results = []
12 12
13 # affected_files is list of files affected by this change. The paths are 13 # affected_files is list of files affected by this change. The paths are
14 # relative to the directory containing PRESUBMIT.py. 14 # relative to the directory containing PRESUBMIT.py.
15 affected_files = [ 15 affected_files = [
16 input_api.os_path.relpath(f, input_api.PresubmitLocalPath()) 16 input_api.os_path.relpath(f, input_api.PresubmitLocalPath())
17 for f in input_api.AbsoluteLocalPaths()] 17 for f in input_api.AbsoluteLocalPaths()]
18 18
19 # Run the chromium.ycm_extra_conf_unittest test if the YCM config file is 19 # Run the chromium.ycm_extra_conf_unittest test if the YCM config file is
20 # changed or if any change is affecting the tests directory. This specific 20 # changed or if any change is affecting the tests directory. This specific
21 # test requires access to 'ninja' and hasn't been tested on platforms other 21 # test requires access to 'ninja' and hasn't been tested on platforms other
22 # than Linux. 22 # than Linux.
23 if 'chromium.ycm_extra_conf.py' in affected_files or \ 23 if 'chromium.ycm_extra_conf.py' in affected_files or \
24 'ninja_output.py' in affected_files or \
24 any([input_api.re.match(r'tests(/|\\)',f) for f in affected_files]): 25 any([input_api.re.match(r'tests(/|\\)',f) for f in affected_files]):
25 results += input_api.RunTests( 26 results += input_api.RunTests(
26 input_api.canned_checks.GetUnitTests( 27 input_api.canned_checks.GetUnitTests(
27 input_api, output_api, 28 input_api, output_api,
28 ['tests/chromium.ycm_extra_conf_unittest.py'])) 29 ['tests/chromium.ycm_extra_conf_unittest.py']))
29 30
30 return results 31 return results
OLDNEW
« no previous file with comments | « no previous file | tools/vim/ninja_output.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698