summaryrefslogtreecommitdiff
path: root/chromium/v8/PRESUBMIT.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-04 14:17:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-05 10:05:06 +0000
commit39d357e3248f80abea0159765ff39554affb40db (patch)
treeaba0e6bfb76de0244bba0f5fdbd64b830dd6e621 /chromium/v8/PRESUBMIT.py
parent87778abf5a1f89266f37d1321b92a21851d8244d (diff)
downloadqtwebengine-chromium-39d357e3248f80abea0159765ff39554affb40db.tar.gz
BASELINE: Update Chromium to 55.0.2883.105
And updates ninja to 1.7.2 Change-Id: I20d43c737f82764d857ada9a55586901b18b9243 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/v8/PRESUBMIT.py')
-rw-r--r--chromium/v8/PRESUBMIT.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/chromium/v8/PRESUBMIT.py b/chromium/v8/PRESUBMIT.py
index 5255ca11fa2..78e7482efba 100644
--- a/chromium/v8/PRESUBMIT.py
+++ b/chromium/v8/PRESUBMIT.py
@@ -216,6 +216,38 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api):
return []
+def _CheckMissingFiles(input_api, output_api):
+ """Runs verify_source_deps.py to ensure no files were added that are not in
+ GN.
+ """
+ # We need to wait until we have an input_api object and use this
+ # roundabout construct to import checkdeps because this file is
+ # eval-ed and thus doesn't have __file__.
+ original_sys_path = sys.path
+ try:
+ sys.path = sys.path + [input_api.os_path.join(
+ input_api.PresubmitLocalPath(), 'tools')]
+ from verify_source_deps import missing_gn_files, missing_gyp_files
+ finally:
+ # Restore sys.path to what it was before.
+ sys.path = original_sys_path
+
+ gn_files = missing_gn_files()
+ gyp_files = missing_gyp_files()
+ results = []
+ if gn_files:
+ results.append(output_api.PresubmitError(
+ "You added one or more source files but didn't update the\n"
+ "corresponding BUILD.gn files:\n",
+ gn_files))
+ if gyp_files:
+ results.append(output_api.PresubmitError(
+ "You added one or more source files but didn't update the\n"
+ "corresponding gyp files:\n",
+ gyp_files))
+ return results
+
+
def _CommonChecks(input_api, output_api):
"""Checks common to both upload and commit."""
results = []
@@ -231,6 +263,7 @@ def _CommonChecks(input_api, output_api):
_CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api))
results.extend(
_CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api))
+ results.extend(_CheckMissingFiles(input_api, output_api))
return results