-
Samuel Huang authored
For SuperSize in general: * Improve abstraction for Run(), which exists for modes {archive, html_report, start_server, console, diff, save_diff}: Change the |parser| param to a callback |on_config_error()|, since |parser| is used exclusively for |parser.error()|. For archive.py: * _RunInternal(): Move logic to assign |knobs| member variables based on |args| into SectionSizeKnobs.modifyWithArgs(). * Not using __init__() since SectionSizeKnobs is used in test, which does not have |args|. * Inject "deduced arguments" into |args| via setattr(), to reduce function param footprint. List of deduced arguments: * extracted_minimal_apk_path: Was passed as function param. * Cannot just replace |apk_file|: It's written into metadata. * any_path_within_output_directory: Was deduced as |any_path| from {apk_file, minimal_apks_file, elf_file, map_file}. * is_bundle: Was deduced by the presence of |minimal_apks_file|, and passed as function param. * Simplify _DeduceMainPaths() by extracting _DeduceNativeInfo(). * Use |knobs.analyze_native| instead of |args.java_only| as the decision variable, to be more precise. Change-Id: Iffccd6b3072d95372eacb7091fe80cc172495334 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2121742 Commit-Queue: Samuel Huang <huangs@chromium.org> Reviewed-by:
Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#753626}
b132568a