From 8efb05d3d47993d37b5139eb8832167ae7d0b09d Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Wed, 22 Nov 2023 07:39:31 +0000 Subject: [PATCH] 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 Auto-Submit: Takuto Ikuta Reviewed-by: Junji Watanabe Commit-Queue: Junji Watanabe --- post_build_ninja_summary.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/post_build_ninja_summary.py b/post_build_ninja_summary.py index fe7219d22..b118c118f 100755 --- a/post_build_ninja_summary.py +++ b/post_build_ninja_summary.py @@ -371,17 +371,18 @@ def main(): cmd.extend(["--step_types", args.step_types]) if args.elapsed_time_sorting: cmd.append("--elapsed_time_sorting") - subprocess.run(cmd) - else: - try: - with open(log_file, "r") as log: - entries = ReadTargets(log, False) - if entries: - SummarizeEntries(entries, args.step_types, - args.elapsed_time_sorting) - except IOError: - print("Log file %r not found, no build summary created." % log_file) - return errno.ENOENT + subprocess.run(cmd, check=True) + return 0 + + try: + with open(log_file, "r") as log: + entries = ReadTargets(log, False) + if entries: + SummarizeEntries(entries, args.step_types, + args.elapsed_time_sorting) + except IOError: + print("Log file %r not found, no build summary created." % log_file) + return errno.ENOENT if __name__ == "__main__":