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

Unified Diff: tools/verify_source_deps.py

Issue 1217483002: Fix missing source dependencies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: gn Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gyp/v8.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/verify_source_deps.py
diff --git a/tools/verify_source_deps.py b/tools/verify_source_deps.py
index f395d4b87ca80fcd5745ae8d55c5b04cdfe0c603..50caace79c8e71903379441e504001243e281755 100755
--- a/tools/verify_source_deps.py
+++ b/tools/verify_source_deps.py
@@ -7,6 +7,10 @@
Script to print potentially missing source dependencies based on the actual
.h and .cc files in the source tree and which files are included in the gyp
and gn files. The latter inclusion is overapproximated.
+
+TODO(machenbach): Gyp files in src will point to source files in src without a
+src/ prefix. For simplicity, all paths relative to src are stripped. But this
+tool won't be accurate for other sources in other directories (e.g. cctest).
"""
import itertools
@@ -31,6 +35,8 @@ GYP_FILES = [
def path_no_prefix(path):
if path.startswith('../'):
return path_no_prefix(path[3:])
+ elif path.startswith('src/'):
+ return path_no_prefix(path[4:])
else:
return path
@@ -40,7 +46,7 @@ def isources(directory):
for f in files:
if not (f.endswith('.h') or f.endswith('.cc')):
continue
- yield os.path.relpath(os.path.join(root, f), V8_BASE)
+ yield path_no_prefix(os.path.relpath(os.path.join(root, f), V8_BASE))
def iflatten(obj):
@@ -74,7 +80,7 @@ def iflatten_gn_file(gn_file):
for line in f.read().splitlines():
match = re.match(r'.*"([^"]*)".*', line)
if match:
- yield match.group(1)
+ yield path_no_prefix(match.group(1))
def icheck_values(values, *source_dirs):
« no previous file with comments | « tools/gyp/v8.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698