Commit 916ac566 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Revert "compare_build_artifacts.py use *.runtime_deps"

This reverts commit 0f71cedd.

Reason for revert: .runtime_deps currently aren't always in
the root build dir, see
https://chromium-review.googlesource.com/c/chromium/tools/build/+/2127067/1#message-9a3c93e50651dc80dfbfefb762db5841ef159b13
(Also, https://crbug.com/1065750)

Original change's description:
> compare_build_artifacts.py use *.runtime_deps
>
> *.isolate file is deprecated.
> use *.runtime_deps file, generated by gn, instead.
>
> Bug: 972075
> Change-Id: I5bc47cbe058c1550fdca4d1d89928c3daf4bc0e5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2061575
> Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> Commit-Queue: Fumitoshi Ukai <ukai@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#745827}

TBR=maruel@chromium.org,thakis@chromium.org,ukai@chromium.org,tikuta@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1065750,972075
Change-Id: I49426f0a40d013f6ffacc9524120b1b58db2f03b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128186
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#754587}
parent c74e8578
......@@ -63,19 +63,22 @@ def get_files_to_compare(build_dir, recursive=False):
def get_files_to_compare_using_isolate(build_dir):
# First, find all .runtime_deps files in build_dir.
runtime_deps_files = glob.glob(os.path.join(build_dir, '*.runtime_deps'))
# First, find all .isolate files in build_dir.
# TODO(maruel): https://crbug.com/972075 Extract targets from mb.
isolates = glob.glob(os.path.join(build_dir, '*.isolate'))
# Then, extract their contents.
ret_files = set()
for runtime_deps_file in runtime_deps_files:
with open(runtime_deps_file) as f:
for runtime_dep in f:
runtime_dep = runtime_dep.rstrip()
normalized_path = os.path.normpath(os.path.join(build_dir, runtime_dep))
for isolate in isolates:
with open(isolate) as f:
isolate_contents = ast.literal_eval(f.read())
isolate_files = isolate_contents['variables']['files']
for isolate_file in isolate_files:
normalized_path = os.path.normpath(
os.path.join(build_dir, isolate_file))
# Ignore runtime dep files that are not in the build dir ... for now.
# Ignore isolate files that are not in the build dir ... for now.
# If we ever move to comparing determinism of artifacts built from two
# repositories, we'll want to get rid of this check.
if os.path.commonprefix((normalized_path, build_dir)) != build_dir:
......@@ -386,11 +389,9 @@ def main():
parser.add_option('-r', '--recursive', action='store_true', default=False,
help='Indicates if the comparison should be recursive.')
parser.add_option(
'--use-isolate-files',
action='store_true',
default=False,
help='Use .runtime_deps files in each directory to determine which '
'artifacts to compare.')
'--use-isolate-files', action='store_true', default=False,
help='Use .isolate files in each directory to determine which artifacts '
'to compare.')
parser.add_option('--json-output', help='JSON file to output differences')
parser.add_option('--ninja-path', help='path to ninja command.',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment