blob: 66692d2d3f8c75164b2350db702acc4f81efca2e [file] [log] [blame]
maruel@chromium.org3d235242009-05-15 12:40:48 +00001#!/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
12
13def CheckChangeOnUpload(input_api, output_api):
14 return RunUnitTests(input_api, output_api)
15
16
17def CheckChangeOnCommit(input_api, output_api):
maruel@chromium.org7b305e82009-05-19 18:24:20 +000018 unit_tests = [
19 'tests.gcl_unittest',
20 'tests.gclient_test',
21 'tests.presubmit_unittest',
22 'tests.revert_unittest',
23 'tests.trychange_unittest',
24 ]
25 output = []
26 output.extend(input_api.canned_checks.RunPythonUnitTests(input_api,
27 output_api,
28 unit_tests))
29 output.extend(input_api.canned_checks.CheckDoNotSubmit(input_api,
30 output_api))
31 return output