From 975cebb327e8bdeb96b1af68d575d8ba1c1c32b4 Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Tue, 18 Apr 2017 12:14:07 -0700 Subject: [PATCH] Print gen_snapshot invocation on failure. (flutter/engine#3603) Makes it much easier to get it running under gdb. --- engine/src/flutter/build/aot_snapshot.py | 2 ++ engine/src/flutter/build/script_snapshot.py | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/build/aot_snapshot.py b/engine/src/flutter/build/aot_snapshot.py index 4078d834a4..3b5dad6c0f 100755 --- a/engine/src/flutter/build/aot_snapshot.py +++ b/engine/src/flutter/build/aot_snapshot.py @@ -51,6 +51,8 @@ def main(): cmd.append(args.main_dart) result = subprocess.call(cmd, cwd=args.root_build_dir) + if result != 0: + print("Command failed: '%s'" % (" ".join(cmd))) return result diff --git a/engine/src/flutter/build/script_snapshot.py b/engine/src/flutter/build/script_snapshot.py index 30601090eb..57df10f213 100755 --- a/engine/src/flutter/build/script_snapshot.py +++ b/engine/src/flutter/build/script_snapshot.py @@ -31,7 +31,7 @@ def main(): args = parser.parse_args() - result = subprocess.call([ + cmd = [ args.snapshotter_path, '--snapshot_kind=script', '--vm_snapshot_data=%s' % args.vm_snapshot_data, @@ -40,7 +40,11 @@ def main(): '--script_snapshot=%s' % args.snapshot, '--dependencies=%s' % args.depfile, args.main_dart, - ], cwd=args.root_build_dir) + ] + + result = subprocess.call(cmd, cwd=args.root_build_dir) + if result != 0: + print("Command failed: '%s'" % (" ".join(cmd))) return result