Commit bb6843b1 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Stop listing .isolated files in deterministic build whitelist.

Unused after https://chromium-review.googlesource.com/c/chromium/tools/build/+/1347346

Also remove code that's been unused since that change related to .isolated
files from compare_build_artifacts.py

Bug: 899438,876915
Change-Id: Ie572c2a27924b72a2ffb86165afca37fcbd667d6
Reviewed-on: https://chromium-review.googlesource.com/c/1351378Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610906}
parent 9aa0ccdf
......@@ -82,35 +82,10 @@ def get_files_to_compare_using_isolate(build_dir):
for inner_file in files:
ret_files.add(os.path.join(root, inner_file))
# Also add any .isolated files that exist.
for isolated in glob.glob(os.path.join(build_dir, '*.isolated')):
ret_files.add(isolated)
# Convert back to a relpath since that's what the caller is expecting.
return set(os.path.relpath(f, build_dir) for f in ret_files)
def diff_dict(a, b):
"""Returns a yaml-like textural diff of two dict.
It is currently optimized for the .isolated format.
"""
out = ''
for key in set(a) | set(b):
va = a.get(key)
vb = b.get(key)
if va.__class__ != vb.__class__:
out += '- %s: %r != %r\n' % (key, va, vb)
elif isinstance(va, dict):
c = diff_dict(va, vb)
if c:
out += '- %s:\n%s\n' % (
key, '\n'.join(' ' + l for l in c.splitlines()))
elif va != vb:
out += '- %s: %s != %s\n' % (key, va, vb)
return out.rstrip()
def diff_binary(first_filepath, second_filepath, file_len):
"""Returns a compact binary diff if the diff is small enough."""
BLOCK_SIZE = 8192
......@@ -208,25 +183,6 @@ def compare_files(first_filepath, second_filepath):
if not os.path.exists(second_filepath):
return 'file does not exist %s' % second_filepath
if first_filepath.endswith('.isolated'):
with open(first_filepath, 'rb') as f:
lhs = json.load(f)
with open(second_filepath, 'rb') as f:
rhs = json.load(f)
# The isolated files contain the name of the build dir. Until that's
# fixed (https://crbug.com/907488), change the rhs to use the lhs's
# build dir -- we care more about the hash differences than about
# the name of the build dir.
with open(second_filepath, 'rb') as f:
lhs_cwd = lhs['relative_cwd'].replace('\\', '\\\\')
rhs_cwd = rhs['relative_cwd'].replace('\\', '\\\\')
rhs = json.loads(f.read().replace(rhs_cwd, lhs_cwd))
diff = diff_dict(lhs, rhs)
if diff:
return '\n' + '\n'.join(' ' + line for line in diff.splitlines())
# else, falls through binary comparison, it must be binary equal too.
ret = None
file_len = os.stat(first_filepath).st_size
if file_len != os.stat(second_filepath).st_size:
......
......@@ -38,7 +38,6 @@
'linux_component': [
# https://crbug.com/900696
'browser_tests.isolated',
'remoting-webapp.v2.zip',
# https://crbug.com/908474
......@@ -225,17 +224,6 @@
'viz_benchmark',
'webkit_unit_tests',
'wtf_unittests',
# TODO(thakis): Given we list most executables above, we should probably
# also list most isolated files here.
'angle_unittests.isolated',
'angle_white_box_tests.isolated',
'browser_tests.isolated',
'chrome_app_unittests.isolated',
'content_unittests.isolated',
'headless_browsertests',
'headless_browsertests.isolated',
'interactive_ui_tests.isolated',
],
# https://crbug.com/330260
......@@ -244,7 +232,6 @@
'mini_installer.exe',
'mini_installer.exe.pdb',
'previous_version_mini_installer.exe',
'mini_installer_tests.isolated',
# These probably have mtimes in the zip headers and the scripts creating
# them probably should use build_utils.ZipDir() instead.
......
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