diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-28 20:45:38 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-28 20:45:38 +0000 |
commit | 8577ed986842fab769f56dd4b85a8c201b05680d (patch) | |
tree | 2b87351aab1a164e28347e57556161c4f7d6bbc9 /tools/json_schema_compiler | |
parent | 40429f0f1c24d8be2997376c324f15ddc8e398bd (diff) | |
download | chromium_src-8577ed986842fab769f56dd4b85a8c201b05680d.zip chromium_src-8577ed986842fab769f56dd4b85a8c201b05680d.tar.gz chromium_src-8577ed986842fab769f56dd4b85a8c201b05680d.tar.bz2 |
Run json_schema_compiler unit tests via a PRESUBMIT check.
As I noted in the bug, these unit tests had gotten broken by some recent changes because they weren't being run automatically.
BUG=120308
TEST=(this is adding a presubmit test)
Review URL: https://chromiumcodereview.appspot.com/9865009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129484 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/json_schema_compiler')
-rw-r--r-- | tools/json_schema_compiler/PRESUBMIT.py | 20 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/json_schema_compiler/code_test.py | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/json_schema_compiler/cpp_type_generator_test.py | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/json_schema_compiler/cpp_util_test.py | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/json_schema_compiler/model_test.py | 1 |
5 files changed, 24 insertions, 0 deletions
diff --git a/tools/json_schema_compiler/PRESUBMIT.py b/tools/json_schema_compiler/PRESUBMIT.py new file mode 100644 index 0000000..b98649b --- /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. +""" + +WHITELIST = [ r'.+_test.py$' ] + +def CheckChangeOnUpload(input_api, output_api): + return input_api.canned_checks.RunUnitTestsInDirectory( + input_api, output_api, '.', whitelist=WHITELIST) + + +def CheckChangeOnCommit(input_api, output_api): + return input_api.canned_checks.RunUnitTestsInDirectory( + input_api, output_api, '.', whitelist=WHITELIST) diff --git a/tools/json_schema_compiler/code_test.py b/tools/json_schema_compiler/code_test.py index a089f7fb..ca36524 100644..100755 --- a/tools/json_schema_compiler/code_test.py +++ b/tools/json_schema_compiler/code_test.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # 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. diff --git a/tools/json_schema_compiler/cpp_type_generator_test.py b/tools/json_schema_compiler/cpp_type_generator_test.py index bc1144d..46d5034 100644..100755 --- a/tools/json_schema_compiler/cpp_type_generator_test.py +++ b/tools/json_schema_compiler/cpp_type_generator_test.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # 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. diff --git a/tools/json_schema_compiler/cpp_util_test.py b/tools/json_schema_compiler/cpp_util_test.py index e22d23d..def85d9 100644..100755 --- a/tools/json_schema_compiler/cpp_util_test.py +++ b/tools/json_schema_compiler/cpp_util_test.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # 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. diff --git a/tools/json_schema_compiler/model_test.py b/tools/json_schema_compiler/model_test.py index 0590ddd..69062bd 100644..100755 --- a/tools/json_schema_compiler/model_test.py +++ b/tools/json_schema_compiler/model_test.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # 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. |