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

Side by Side Diff: net/tools/tld_cleanup/PRESUBMIT.py

Issue 291893005: Fix an error in net/tools/tld_cleanup/PRESUBMIT.py. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 5
6 """Chromium presubmit script for src/net/tools/tld_cleanup.""" 6 """Chromium presubmit script for src/net/tools/tld_cleanup."""
7 7
8 8
9 def _RunMakeDafsaTests(input_api, output_api): 9 def _RunMakeDafsaTests(input_api, output_api):
10 """Runs unittest for make_dafsa if any related file has been modified.""" 10 """Runs unittest for make_dafsa if any related file has been modified."""
11 files = ('net/tools/tld_cleanup/make_dafsa.py', 11 files = ('net/tools/tld_cleanup/make_dafsa.py',
12 'net/tools/tld_cleanup/make_dafsa_unittest.py') 12 'net/tools/tld_cleanup/make_dafsa_unittest.py')
13 if not any(f in input_api.LocalPaths() for f in files): 13 if not any(f in input_api.LocalPaths() for f in files):
14 return 14 return []
15 test_path = input_api.os_path.join(input_api.PresubmitLocalPath(), 15 test_path = input_api.os_path.join(input_api.PresubmitLocalPath(),
16 'make_dafsa_unittest.py') 16 'make_dafsa_unittest.py')
17 cmd_name = 'make_dafsa_unittest' 17 cmd_name = 'make_dafsa_unittest'
18 cmd = [input_api.python_executable, test_path] 18 cmd = [input_api.python_executable, test_path]
19 test_cmd = input_api.Command( 19 test_cmd = input_api.Command(
20 name=cmd_name, 20 name=cmd_name,
21 cmd=cmd, 21 cmd=cmd,
22 kwargs={}, 22 kwargs={},
23 message=output_api.PresubmitPromptWarning) 23 message=output_api.PresubmitPromptWarning)
24 return input_api.RunTests([test_cmd]) 24 return input_api.RunTests([test_cmd])
25 25
26 26
27 def CheckChangeOnUpload(input_api, output_api): 27 def CheckChangeOnUpload(input_api, output_api):
28 return _RunMakeDafsaTests(input_api, output_api) 28 return _RunMakeDafsaTests(input_api, output_api)
29 29
30 30
31 def CheckChangeOnCommit(input_api, output_api): 31 def CheckChangeOnCommit(input_api, output_api):
32 return _RunMakeDafsaTests(input_api, output_api) 32 return _RunMakeDafsaTests(input_api, output_api)
OLDNEW
« 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