Skip to content

Commit 4006f27

Browse files
authored
For --time'd failed gn_run_binary.py runs repeat failed command (#910)
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
1 parent 7736521 commit 4006f27

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

build/gn_run_binary.py

+11
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,15 @@
3636
print("Command failed: " + ' '.join(args))
3737
print("exitCode: " + str(ex.returncode))
3838
print(ex.output.decode('utf-8', errors='replace'))
39+
40+
# For --time'd executions do another control run to confirm failures.
41+
# This is to help troubleshoot https://github.com/flutter/flutter/issues/154437.
42+
if sys.argv[1] == "--time":
43+
try:
44+
subprocess.check_output(args, stderr=subprocess.STDOUT)
45+
except subprocess.CalledProcessError as ex:
46+
print("2nd coming Command failed: " + ' '.join(args))
47+
print("2nd coming exitCode: " + str(ex.returncode))
48+
print(ex.output.decode('utf-8', errors='replace'))
49+
3950
sys.exit(ex.returncode)

0 commit comments

Comments
 (0)