summaryrefslogtreecommitdiff
path: root/tools/releasetools/test_apex_utils.py
diff options
context:
space:
mode:
author Baligh Uddin <baligh@google.com> 2020-01-31 13:51:20 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-01-31 13:51:20 +0000
commit0a6022e7815043d508fcd2f93c9dd22af0225d30 (patch)
tree80caba476d9a847ec82b036ee21750cbf2db91ac /tools/releasetools/test_apex_utils.py
parenta4d2d6578e52e9d7506c4279daa9069239811426 (diff)
parentcea6ad1fb022a6c2cc43d2666720807d5f4720c4 (diff)
Merge "Pass signing_args to apexer to repack apex"
Diffstat (limited to 'tools/releasetools/test_apex_utils.py')
-rw-r--r--tools/releasetools/test_apex_utils.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/releasetools/test_apex_utils.py b/tools/releasetools/test_apex_utils.py
index cc28f3f199..b9f2de5574 100644
--- a/tools/releasetools/test_apex_utils.py
+++ b/tools/releasetools/test_apex_utils.py
@@ -176,3 +176,20 @@ class ApexUtilsTest(test_utils.ReleaseToolsTestCase):
payload_pubkey = common.ExtractAvbPublicKey('avbtool',
self.payload_key)
signer.ProcessApexFile(apk_keys, self.payload_key, payload_pubkey)
+
+ @test_utils.SkipIfExternalToolsUnavailable()
+ def test_ApexApkSigner_withSignerHelper(self):
+ apex_path = os.path.join(self.testdata_dir, 'has_apk.apex')
+ signer = apex_utils.ApexApkSigner(apex_path, None, None)
+ apk_keys = {'wifi-service-resources.apk': os.path.join(
+ self.testdata_dir, 'testkey')}
+
+ self.payload_key = os.path.join(self.testdata_dir, 'testkey_RSA4096.key')
+ payload_pubkey = common.ExtractAvbPublicKey('avbtool', self.payload_key)
+
+ signing_helper = os.path.join(self.testdata_dir, 'signing_helper.sh')
+ os.chmod(signing_helper, 0o700)
+ payload_signer_args = '--signing_helper_with_files {}'.format(
+ signing_helper)
+ signer.ProcessApexFile(apk_keys, self.payload_key, payload_pubkey,
+ payload_signer_args)