check `siso summary`

This is to make sure that the command runs as intended and make more
verbose if it has some error.

Bug: b/312632221
Change-Id: I44b372452b37b744f6c02c5a2e34fafe3717e351
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5051585
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
changes/85/5051585/4
Takuto Ikuta 2 years ago committed by LUCI CQ
parent 38b8de056e
commit 8efb05d3d4

@ -371,17 +371,18 @@ def main():
cmd.extend(["--step_types", args.step_types]) cmd.extend(["--step_types", args.step_types])
if args.elapsed_time_sorting: if args.elapsed_time_sorting:
cmd.append("--elapsed_time_sorting") cmd.append("--elapsed_time_sorting")
subprocess.run(cmd) subprocess.run(cmd, check=True)
else: return 0
try:
with open(log_file, "r") as log: try:
entries = ReadTargets(log, False) with open(log_file, "r") as log:
if entries: entries = ReadTargets(log, False)
SummarizeEntries(entries, args.step_types, if entries:
args.elapsed_time_sorting) SummarizeEntries(entries, args.step_types,
except IOError: args.elapsed_time_sorting)
print("Log file %r not found, no build summary created." % log_file) except IOError:
return errno.ENOENT print("Log file %r not found, no build summary created." % log_file)
return errno.ENOENT
if __name__ == "__main__": if __name__ == "__main__":

Loading…
Cancel
Save