Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: extensions/common/api/PRESUBMIT.py

Issue 1718243003: [Extern Generation] Add a presubmit script to check externs not being updated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """Chromium presubmit script for src/extensions/common.
6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details on the presubmit API built into depot_tools.
9 """
10
11 import sys
12
13
14 def _CheckExterns(input_api, output_api):
15 original_sys_path = sys.path
16
17 try:
18 sys.path.append(input_api.PresubmitLocalPath())
19 from externs_checker import ExternsChecker
20 finally:
21 sys.path = original_sys_path
22
23 join = input_api.os_path.join
24 api_root = input_api.PresubmitLocalPath()
25 externs_root = join(api_root, '..', '..', '..', 'ui', 'externs')
26
27 api_pairs = {
28 join(api_root, 'bluetooth.idl'): join(externs_root, 'bluetooth.js'),
29 # TODO(rdevlin.cronin): Add more!
30 }
31
32 return ExternsChecker(input_api, output_api, api_pairs).RunChecks()
33
34
35 def CheckChangeOnUpload(input_api, output_api):
36 return _CheckExterns(input_api, output_api)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698