blob: be1dc1aaeba38234557e2715952634c7fe4c6603 [file] [log] [blame]
kbre85ee562016-02-09 04:37:351# Copyright (c) 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5"""Top-level presubmit script for gpu.
6
7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8for more details about the presubmit API built into depot_tools.
9"""
10
Jonathan Backer16cd5362018-01-17 17:00:1011def CommonChecks(input_api, output_api):
12 import sys
13
14 output = []
15 sys_path_backup = sys.path
16 try:
17 sys.path = [
18 input_api.PresubmitLocalPath()
19 ] + sys.path
Kai Ninomiyaa388f4a12020-06-15 18:31:5120 output.extend(input_api.canned_checks.RunPylint(input_api, output_api))
Jonathan Backer16cd5362018-01-17 17:00:1021 finally:
22 sys.path = sys_path_backup
23
24 return output
25
26
27def CheckChangeOnUpload(input_api, output_api):
28 return CommonChecks(input_api, output_api)
29
30
31def CheckChangeOnCommit(input_api, output_api):
32 return CommonChecks(input_api, output_api)