aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2018-02-20 12:05:46 -0600
committerTao Bao2018-02-20 12:12:15 -0600
commitde1d479aceb56d3b2565c67b55089b10caa55a4d (patch)
treebf3c5ba4994903a0b3362beb460bc6f119bd2bde /tools/releasetools/sign_target_files_apks.py
parent17e4e6169166fd2eaf61f01b1dffa71aeecfa29a (diff)
downloadplatform-build-de1d479aceb56d3b2565c67b55089b10caa55a4d.tar.gz
platform-build-de1d479aceb56d3b2565c67b55089b10caa55a4d.tar.xz
platform-build-de1d479aceb56d3b2565c67b55089b10caa55a4d.zip
releasetools: Clean up test_sign_target_files_apks.py.
Since we have been carrying test certificates in testdata/ for other tests, do the same for test_sign_target_files_apks.py. Copy verity.x509.pem from build/target/product/security/ to testdata/ for that purpose. Also capture the stderr output in ReplaceVerityKeyId(). Test: python -m unittest test_sign_target_files_apks Change-Id: Ie11e042086952e8a4a5a63950cb0b16cc436b7e6
Diffstat (limited to 'tools/releasetools/sign_target_files_apks.py')
-rwxr-xr-xtools/releasetools/sign_target_files_apks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 1f9a3cadb..c96e61658 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -597,7 +597,7 @@ def ReplaceVerityKeyId(input_zip, output_zip, key_path):
597 597
598 # Extract keyid using openssl command. 598 # Extract keyid using openssl command.
599 p = common.Run(["openssl", "x509", "-in", key_path, "-text"], 599 p = common.Run(["openssl", "x509", "-in", key_path, "-text"],
600 stdout=subprocess.PIPE) 600 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
601 keyid, stderr = p.communicate() 601 keyid, stderr = p.communicate()
602 assert p.returncode == 0, "Failed to dump certificate: {}".format(stderr) 602 assert p.returncode == 0, "Failed to dump certificate: {}".format(stderr)
603 keyid = re.search( 603 keyid = re.search(