Lann Martin | 46361ee | 2019-03-14 15:30:47 -0600 | [diff] [blame] | 1 | # Copyright 2019 The Chromium OS Authors. All rights reserved. |
| 2 | # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 | # that can be found in the LICENSE file. |
| 4 | |
| 5 | |
| 6 | def CommonChecks(input_api, output_api): |
| 7 | results = [] |
| 8 | |
| 9 | # recipes.py test run |
| 10 | results += input_api.RunTests([ |
| 11 | input_api.Command( |
| 12 | name='recipes test', |
| 13 | cmd=[input_api.python_executable, 'recipes.py', 'test', 'run'], |
| 14 | kwargs={}, |
| 15 | message=output_api.PresubmitError, |
| 16 | ) |
| 17 | ]) |
| 18 | |
Andrew Lamb | 9b2d086 | 2019-04-03 16:38:52 -0600 | [diff] [blame] | 19 | results += input_api.canned_checks.CheckPatchFormatted( |
| 20 | input_api, output_api, check_python=True) |
| 21 | |
Lann Martin | 46361ee | 2019-03-14 15:30:47 -0600 | [diff] [blame] | 22 | return results |
| 23 | |
| 24 | |
| 25 | CheckChangeOnUpload = CommonChecks |
| 26 | CheckChangeOnCommit = CommonChecks |