blob: 00f8fc5481edefdec51c57d1d0cd35721373a545 [file] [log] [blame]
Jack Neuse130b5a2019-07-02 15:33:56 -06001# Copyright 2019 The Chromium OS 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
5def CheckGolangRunTests(input_api, output_api):
6 try:
7 test_output = input_api.subprocess.check_output(['./run_tests.sh'])
8 except Exception as error:
9 return [
10 output_api.PresubmitError(
11 'run_tests.sh failed.\noutput:%s\n' % error.output)
12 ]
13 return []
14
15
16def CommonChecks(input_api, output_api):
17 results = []
18
19 # ./run_tests.sh
20 results.extend(CheckGolangRunTests(input_api, output_api))
21
22 return results
23
24
25#TODO verbose flag
26CheckChangeOnUpload = CommonChecks
27CheckChangeOnCommit = CommonChecks