Skip to content

Commit

Permalink
For --time'd failed gn_run_binary.py runs repeat failed command (#910)
Browse files Browse the repository at this point in the history
This is to help troubleshoot flutter/flutter#154437 theory being that gen_snapshot binary might be in transient broken state that copying was not able to capture.

BUG=flutter/flutter#154437
  • Loading branch information
aam authored Oct 9, 2024
1 parent 7736521 commit 4006f27
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build/gn_run_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,15 @@
print("Command failed: " + ' '.join(args))
print("exitCode: " + str(ex.returncode))
print(ex.output.decode('utf-8', errors='replace'))

# For --time'd executions do another control run to confirm failures.
# This is to help troubleshoot https://github.com/flutter/flutter/issues/154437.
if sys.argv[1] == "--time":
try:
subprocess.check_output(args, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as ex:
print("2nd coming Command failed: " + ' '.join(args))
print("2nd coming exitCode: " + str(ex.returncode))
print(ex.output.decode('utf-8', errors='replace'))

sys.exit(ex.returncode)

0 comments on commit 4006f27

Please sign in to comment.