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

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

Issue 197183002: Reduce footprint of registry controlled domain table (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implemented requested changes 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
« no previous file with comments | « net/net.gyp ('k') | net/tools/tld_cleanup/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
M-A Ruel 2014/05/05 16:54:51 Technically, this file is not executable, so pleas
Olle Liljenzin 2014/05/05 17:32:05 Done.
2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6
7 """Chromium presubmit script for src/net/tools/tld_cleanup."""
8
9
10 def _RunMakeDafsaTests(input_api, output_api):
11 """Runs unittest for make_dafsa if any related file has been modified."""
12 files = ('net/tools/tld_cleanup/make_dafsa.py',
13 'net/tools/tld_cleanup/make_dafsa_unittest.py')
14 if not any(f in input_api.LocalPaths() for f in files):
15 return
16 test_path = input_api.os_path.join(input_api.PresubmitLocalPath(),
17 'make_dafsa_unittest.py')
18 cmd_name = 'make_dafsa_unittest'
19 if input_api.platform == 'win32':
20 # Windows needs some help.
21 cmd = [input_api.python_executable, test_path]
M-A Ruel 2014/05/05 16:54:51 Do it on all platform for consistency.
Olle Liljenzin 2014/05/05 17:32:05 Note that I just copied the code from the document
22 else:
23 cmd = [test_path]
24 test_cmd = input_api.Command(
25 name=cmd_name,
26 cmd=cmd,
27 kwargs={},
28 message=output_api.PresubmitPromptWarning)
29 return input_api.RunTests([test_cmd])
30
31
32 def CheckChangeOnUpload(input_api, output_api):
33 return _RunMakeDafsaTests(input_api, output_api)
34
35
36 def CheckChangeOnCommit(input_api, output_api):
37 return _RunMakeDafsaTests(input_api, output_api)
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/tools/tld_cleanup/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698