• Bruce Dawson's avatar
    Miscellaneous fixes to post_build_ninja_summary.py · 0081a128
    Bruce Dawson authored
    In Python 3 dict.values() is not a sortable type so it must be converted
    to a list prior to returning targets data from the ReadTargets function.
    
    In Python 3 you cannot compare arbitrary objects. This could happen when
    sorting task_start_stop_times if the time and types were identical. This
    is fixed by using the first two entries in the tuple as the sorting key.
    
    When a .ninja_log file is corrupt it triggers a diagnostic message which
    has only caused confusion. This changes that message to suggest the most
    likely root cause (corruption) since that is the only cause I have seen.
    
    If a build step generates multiple targets with long names then wrapping
    of lines may occur. To avoid that the target description size is capped.
    
    Bug: 941669
    Change-Id: I2a808d2629a639e231ce2dbf2dab41251110b156
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2432409
    Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
    Commit-Queue: Dirk Pranke <dpranke@google.com>
    Reviewed-by: 's avatarDirk Pranke <dpranke@google.com>
    0081a128
post_build_ninja_summary.py 14.5 KB