blob: dffc680e5002e7c9c45cc212345a4fafa924043b [file] [log] [blame]
[email protected]3d235242009-05-15 12:40:481#!/usr/bin/python
2# Copyright (c) 2009 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6"""Top-level presubmit script for depot tools.
7
8See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
9details on the presubmit API built into gcl.
10"""
11
[email protected]ce30ef72009-05-25 15:20:4212UNIT_TESTS = [
13 'tests.gcl_unittest',
14 'tests.gclient_test',
[email protected]e28e4982009-09-25 20:51:4515 'tests.gclient_scm_test',
[email protected]ce30ef72009-05-25 15:20:4216 'tests.presubmit_unittest',
17 'tests.revert_unittest',
18 'tests.trychange_unittest',
[email protected]b82e4092009-06-18 14:24:0819 'tests.watchlists_unittest',
[email protected]ce30ef72009-05-25 15:20:4220]
[email protected]3d235242009-05-15 12:40:4821
22def CheckChangeOnUpload(input_api, output_api):
[email protected]7b305e82009-05-19 18:24:2023 output = []
24 output.extend(input_api.canned_checks.RunPythonUnitTests(input_api,
25 output_api,
[email protected]ce30ef72009-05-25 15:20:4226 UNIT_TESTS))
27 return output
28
29
30def CheckChangeOnCommit(input_api, output_api):
31 output = []
32 output.extend(input_api.canned_checks.RunPythonUnitTests(input_api,
33 output_api,
34 UNIT_TESTS))
[email protected]7b305e82009-05-19 18:24:2035 output.extend(input_api.canned_checks.CheckDoNotSubmit(input_api,
36 output_api))
37 return output