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

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

Issue 1578793002: Add experimental framework token generation tool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a header to satisfy licencecheck.pl, which can't check the LICENCE file. Created 4 years, 9 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 | « tools/origin_trials/OWNERS ('k') | tools/origin_trials/eftest.key » ('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 2016 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 def _CommonChecks(input_api, output_api): 6 def _CommonChecks(input_api, output_api):
7 results = [] 7 results = []
8 8
9 # Run Pylint over the files in the directory. 9 # Run Pylint over the files in the directory.
10 pylint_checks = input_api.canned_checks.GetPylint(input_api, output_api) 10 pylint_checks = input_api.canned_checks.GetPylint(input_api, output_api)
11 results.extend(input_api.RunTests(pylint_checks)) 11 results.extend(input_api.RunTests(pylint_checks))
12 12
13 # Run the MB unittests. 13 # Run the generate_token unittests.
14 results.extend(input_api.canned_checks.RunUnitTestsInDirectory( 14 results.extend(input_api.canned_checks.RunUnitTestsInDirectory(
15 input_api, output_api, '.', [ r'^.+_unittest\.py$'])) 15 input_api, output_api, '.', [ r'^.+_unittest\.py$']))
16 16
17 # Validate the format of the mb_config.pyl file.
18 cmd = [input_api.python_executable, 'mb.py', 'validate']
19 kwargs = {'cwd': input_api.PresubmitLocalPath()}
20 results.extend(input_api.RunTests([
21 input_api.Command(name='mb_validate',
22 cmd=cmd, kwargs=kwargs,
23 message=output_api.PresubmitError)]))
24
25 return results 17 return results
26 18
27 19
28 def CheckChangeOnUpload(input_api, output_api): 20 def CheckChangeOnUpload(input_api, output_api):
29 return _CommonChecks(input_api, output_api) 21 return _CommonChecks(input_api, output_api)
30 22
31 23
32 def CheckChangeOnCommit(input_api, output_api): 24 def CheckChangeOnCommit(input_api, output_api):
33 return _CommonChecks(input_api, output_api) 25 return _CommonChecks(input_api, output_api)
OLDNEW
« no previous file with comments | « tools/origin_trials/OWNERS ('k') | tools/origin_trials/eftest.key » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698