summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgfeher@chromium.org <gfeher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 16:12:00 +0000
committergfeher@chromium.org <gfeher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 16:12:00 +0000
commit9d0bc41806fd2534b87b61cc09fb80f9b03ca99f (patch)
tree8cd2820a718f314928f9b86496c75493f4266c99
parent9222e04b2fbb8ea8d995e94b232d27f7742456e4 (diff)
downloadchromium_src-9d0bc41806fd2534b87b61cc09fb80f9b03ca99f.zip
chromium_src-9d0bc41806fd2534b87b61cc09fb80f9b03ca99f.tar.gz
chromium_src-9d0bc41806fd2534b87b61cc09fb80f9b03ca99f.tar.bz2
Wire the template generator's unit tests into a presubmit script
BUG=none TEST=add a failure into the tests and try 'git cl presubmit' Review URL: http://codereview.chromium.org/5725002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69003 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--tools/grit/grit/format/policy_templates/PRESUBMIT.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/grit/grit/format/policy_templates/PRESUBMIT.py b/tools/grit/grit/format/policy_templates/PRESUBMIT.py
new file mode 100644
index 0000000..d949a0e
--- /dev/null
+++ b/tools/grit/grit/format/policy_templates/PRESUBMIT.py
@@ -0,0 +1,26 @@
+# Copyright (c) 2010 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.
+
+UNIT_TESTS = [
+ 'policy_template_generator_unittest',
+ 'writers.adm_writer_unittest',
+ 'writers.adml_writer_unittest',
+ 'writers.admx_writer_unittest',
+ 'writers.doc_writer_unittest',
+ 'writers.json_writer_unittest',
+ 'writers.plist_strings_writer_unittest',
+ 'writers.plist_writer_unittest',
+ 'writers.reg_writer_unittest'
+]
+
+def CheckChangeOnUpload(input_api, output_api):
+ return input_api.canned_checks.RunPythonUnitTests(input_api,
+ output_api,
+ UNIT_TESTS)
+
+
+def CheckChangeOnCommit(input_api, output_api):
+ return input_api.canned_checks.RunPythonUnitTests(input_api,
+ output_api,
+ UNIT_TESTS)