Chromium Code Reviews| Index: tools/json_schema_compiler/PRESUBMIT.py |
| diff --git a/tools/json_schema_compiler/PRESUBMIT.py b/tools/json_schema_compiler/PRESUBMIT.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f53e6756831db3cd19969e1382f404fa2753c7ba |
| --- /dev/null |
| +++ b/tools/json_schema_compiler/PRESUBMIT.py |
| @@ -0,0 +1,20 @@ |
| +# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +"""Presubmit script for changes affecting tools/json_schema_compiler/ |
| + |
| +See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| +for more details about the presubmit API built into gcl. |
| +""" |
| + |
| +UNIT_TESTS = [ './code_test.py', './cpp_type_generator_test.py', |
| + './cpp_util_test.py', './model_test.py' ] |
| + |
| +def CheckChangeOnUpload(input_api, output_api): |
|
M-A Ruel
2012/03/27 00:42:05
Idea: you could use RunUnitTestsInDirectory with a
|
| + return input_api.canned_checks.RunUnitTests(input_api, output_api, |
| + UNIT_TESTS) |
| + |
| +def CheckChangeOnCommit(input_api, output_api): |
| + return input_api.canned_checks.RunUnitTests(input_api, output_api, |
| + UNIT_TESTS) |