Use common.RunAndCheckOutput() in add_img_to_target_files.py.

Test: `m dist` with aosp_marlin-userdebug
Test: python -m unittest test_add_img_to_target_files.py
Change-Id: Icff60a44e5c189c2443fbaba3fc6a2b106b409ea
This commit is contained in:
Tao Bao
2018-11-21 11:02:48 -08:00
parent 12fa690ff6
commit 2764aee664
2 changed files with 9 additions and 34 deletions

View File

@@ -40,11 +40,7 @@ class AddImagesToTargetFilesTest(test_utils.ReleaseToolsTestCase):
# Calls an external binary to convert the proto message.
cmd = ["care_map_generator", "--parse_proto", file_name, text_file]
proc = common.Run(cmd)
output, _ = proc.communicate()
self.assertEqual(
0, proc.returncode,
"Failed to run care_map_generator:\n{}".format(output))
common.RunAndCheckOutput(cmd)
with open(text_file, 'r') as verify_fp:
plain_text = verify_fp.read()