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

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

Issue 2299953002: [mb] Copy MB from Chromium repo (Closed)
Patch Set: Pin to V8's config and delete obsolete validation code Created 4 years, 3 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/mb/OWNERS ('k') | tools/mb/README.md » ('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 # Copyright 2016 the V8 project authors. All rights reserved.
2 # Copyright 2015 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 def _CommonChecks(input_api, output_api):
8 results = []
9
10 # Run Pylint over the files in the directory.
11 pylint_checks = input_api.canned_checks.GetPylint(input_api, output_api)
12 results.extend(input_api.RunTests(pylint_checks))
13
14 # Run the MB unittests.
15 results.extend(input_api.canned_checks.RunUnitTestsInDirectory(
16 input_api, output_api, '.', [ r'^.+_unittest\.py$']))
17
18 # Validate the format of the mb_config.pyl file.
19 cmd = [input_api.python_executable, 'mb.py', 'validate']
20 kwargs = {'cwd': input_api.PresubmitLocalPath()}
21 results.extend(input_api.RunTests([
22 input_api.Command(name='mb_validate',
23 cmd=cmd, kwargs=kwargs,
24 message=output_api.PresubmitError)]))
25
26 results.extend(
27 input_api.canned_checks.CheckLongLines(
28 input_api,
29 output_api,
30 maxlen=80,
31 source_file_filter=lambda x: 'mb_config.pyl' in x.LocalPath()))
32
33 return results
34
35
36 def CheckChangeOnUpload(input_api, output_api):
37 return _CommonChecks(input_api, output_api)
38
39
40 def CheckChangeOnCommit(input_api, output_api):
41 return _CommonChecks(input_api, output_api)
OLDNEW
« no previous file with comments | « tools/mb/OWNERS ('k') | tools/mb/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698