| # Copyright 2020 The Dart project authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| def CommonChecks(input_api, output_api): |
| results = [] |
| results.extend( |
| input_api.canned_checks.CheckPatchFormatted(input_api, output_api)) |
| results += input_api.RunTests([ |
| input_api.Command( |
| name='recipes test', |
| cmd=[input_api.python_executable, 'recipes.py', 'test', 'run'], |
| kwargs={}, |
| message=output_api.PresubmitError, |
| ) |
| ]) |
| return results |
| |
| |
| CheckChangeOnUpload = CommonChecks |
| CheckChangeOnCommit = CommonChecks |