From 69d3feb23a7da56d4548298b7775fb4619d37b01 Mon Sep 17 00:00:00 2001 From: Bryan Henry Date: Sat, 14 Apr 2018 23:07:46 -0700 Subject: [PATCH] Don't suppress stderr for 'avbtool make_vbmeta_image' Output is useful for debugging. Bug: 72837107 Test: Local sign_target_files_apks run of locally built target-files Change-Id: I5c27fcc86fa3a51080e0502eb8f5f01a40b033c3 --- tools/releasetools/add_img_to_target_files.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py index c6460ca705..82d5f14338 100755 --- a/tools/releasetools/add_img_to_target_files.py +++ b/tools/releasetools/add_img_to_target_files.py @@ -415,9 +415,10 @@ def AddVBMeta(output_zip, partitions): assert found, 'failed to find %s' % (image_path,) cmd.extend(split_args) - p = common.Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - p.communicate() - assert p.returncode == 0, "avbtool make_vbmeta_image failed" + p = common.Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + stdoutdata, _ = p.communicate() + assert p.returncode == 0, \ + "avbtool make_vbmeta_image failed:\n{}".format(stdoutdata) img.Write() @@ -444,9 +445,10 @@ def AddPartitionTable(output_zip): if args: cmd.extend(shlex.split(args)) - p = common.Run(cmd, stdout=subprocess.PIPE) - p.communicate() - assert p.returncode == 0, "bpttool make_table failed" + p = common.Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + stdoutdata, _ = p.communicate() + assert p.returncode == 0, \ + "bpttool make_table failed:\n{}".format(stdoutdata) img.Write() bpt.Write()