blob: 1821dc219d9c763b5fc02da6be1a3723e9593046 [file] [log] [blame]
Lann Martin46361ee2019-03-14 15:30:47 -06001# Copyright 2019 The Chromium OS Authors. All rights reserved.
David Burgerc0effc22020-03-04 08:27:07 -07002# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
Lann Martin46361ee2019-03-14 15:30:47 -06004
5
6def 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
LaMont Jones3cdba5c2020-06-02 17:10:56 -060019 # Python formatting issues are errors.
Andrew Lamb9b2d0862019-04-03 16:38:52 -060020 results += input_api.canned_checks.CheckPatchFormatted(
LaMont Jonesddba3162020-06-10 15:52:09 -060021 input_api, output_api, check_python=True, check_clang_format=False,
LaMont Jones3cdba5c2020-06-02 17:10:56 -060022 result_factory=output_api.PresubmitError)
Andrew Lamb9b2d0862019-04-03 16:38:52 -060023
Lann Martin46361ee2019-03-14 15:30:47 -060024 return results
25
26
27CheckChangeOnUpload = CommonChecks
28CheckChangeOnCommit = CommonChecks