blob: 59b25bd45a039aaa7942fe96175c7ee38c2033f5 [file] [log] [blame]
[email protected]3d235242009-05-15 12:40:481# Copyright (c) 2009 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 depot tools.
6
7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
8details on the presubmit API built into gcl.
9"""
10
[email protected]ce30ef72009-05-25 15:20:4211UNIT_TESTS = [
12 'tests.gcl_unittest',
[email protected]e28e4982009-09-25 20:51:4513 'tests.gclient_scm_test',
[email protected]d5800f12009-11-12 20:03:4314 'tests.gclient_utils_test',
[email protected]ce30ef72009-05-25 15:20:4215 'tests.presubmit_unittest',
[email protected]d5800f12009-11-12 20:03:4316 'tests.scm_unittest',
[email protected]ce30ef72009-05-25 15:20:4217 'tests.trychange_unittest',
[email protected]b82e4092009-06-18 14:24:0818 'tests.watchlists_unittest',
[email protected]ce30ef72009-05-25 15:20:4219]
[email protected]3d235242009-05-15 12:40:4820
21def CheckChangeOnUpload(input_api, output_api):
[email protected]7b305e82009-05-19 18:24:2022 output = []
23 output.extend(input_api.canned_checks.RunPythonUnitTests(input_api,
24 output_api,
[email protected]ce30ef72009-05-25 15:20:4225 UNIT_TESTS))
26 return output
27
28
29def CheckChangeOnCommit(input_api, output_api):
30 output = []
31 output.extend(input_api.canned_checks.RunPythonUnitTests(input_api,
32 output_api,
33 UNIT_TESTS))
[email protected]7b305e82009-05-19 18:24:2034 output.extend(input_api.canned_checks.CheckDoNotSubmit(input_api,
35 output_api))
36 return output