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

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

Issue 1303973009: [DO NOT COMMIT] Re-use the dafsa code for s-w-r histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to fix patch errors on try bots. Created 5 years, 1 month 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
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/dafsa."""
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/dafsa/make_dafsa.py',
12 'net/tools/tld_cleanup/make_dafsa_unittest.py') 12 'net/tools/dafsa/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
« net/net.gypi ('K') | « net/net.gypi ('k') | net/tools/dafsa/make_dafsa.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698