1# Copyright 2020 The ChromiumOS Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import sys 6 7# TODO(https://crbug.com/1046543): is there a better way to do this cross 8# repo import? 9sys.path.insert(1, 'config/presubmit') 10import presubmits 11 12USE_PYTHON3 = True 13 14def CheckChangeOnUpload(input_api, output_api): 15 results = [] 16 results.extend(presubmits.CheckGenConfig(input_api, output_api)) 17 # Note that we only run this on upload. On the commit side in CQ there is a 18 # separate builder that executes this check. 19 results.extend(presubmits.CheckChecker(input_api, output_api)) 20 return results 21 22def CheckChangeOnCommit(input_api, output_api): 23 return presubmits.CheckGenConfig(input_api, output_api) 24