diff options
author | rdevlin.cronin <rdevlin.cronin@chromium.org> | 2016-02-26 15:17:13 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-26 23:18:40 +0000 |
commit | 9ab806c3e9213b95a7a4ab1342c9b4d5ff49830f (patch) | |
tree | 764114ac867a8dc4039cc0385bdd2f2c1f1994f7 /PRESUBMIT_test_mocks.py | |
parent | 655e7621595620fe75a4ab7d21ecd797729a097a (diff) | |
download | chromium_src-9ab806c3e9213b95a7a4ab1342c9b4d5ff49830f.zip chromium_src-9ab806c3e9213b95a7a4ab1342c9b4d5ff49830f.tar.gz chromium_src-9ab806c3e9213b95a7a4ab1342c9b4d5ff49830f.tar.bz2 |
[Extern Generation] Add a presubmit script to check externs not being updated
Add a presubmit script that checks for when extension api files are touched, but
the corresponding extern file is not. Right now, this is very simple - it only
checks that the extern is modified in some way (doesn't validate that it's the
*right* way), and is only a warning (because sometimes api file changes don't
cause extern changes). As an improvement, we would validate that the extern
files contain the proper content - let's do that later.
This will also be rolled out piecemeal, since many APIs don't currently have a
dedicated extern file. This change only imposes the check on bluetooth (because
it was handy) - if all goes well, we'll roll this out to all api files.
Also establish a dedicated extern folder, since it's silly for chrome-generated
externs to live in third_party/.
BUG=469920
Review URL: https://codereview.chromium.org/1718243003
Cr-Commit-Position: refs/heads/master@{#378018}
Diffstat (limited to 'PRESUBMIT_test_mocks.py')
-rw-r--r-- | PRESUBMIT_test_mocks.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/PRESUBMIT_test_mocks.py b/PRESUBMIT_test_mocks.py index f68c134..5230c87 100644 --- a/PRESUBMIT_test_mocks.py +++ b/PRESUBMIT_test_mocks.py @@ -109,6 +109,9 @@ class MockFile(object): def LocalPath(self): return self._local_path + def AbsoluteLocalPath(self): + return self._local_path + def rfind(self, p): """os.path.basename is called on MockFile so we need an rfind method.""" return self._local_path.rfind(p) |