From a248a696921ba65e9ef54a44e47a0732bbdd82f1 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 4 Jul 2019 00:13:41 +0200 Subject: [PATCH] tests: skip disabled_algorithms test when apksigner is present apksigner doesn't treat MD5 signatures as deprecated, so that portion of the tests would always fail. --- tests/update.TestCase | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/update.TestCase b/tests/update.TestCase index bce7e41c..f9a46d88 100755 --- a/tests/update.TestCase +++ b/tests/update.TestCase @@ -625,6 +625,10 @@ class UpdateTest(unittest.TestCase): self.assertFalse(os.path.exists(os.path.join('archive', apkName))) self.assertTrue(os.path.exists(os.path.join('repo', apkName))) + if os.path.exists('/usr/bin/apksigner') or 'apksigner' in config: + print('SKIPPING: apksigner installed and it allows MD5 signatures') + return + javac = config['jarsigner'].replace('jarsigner', 'javac') v = subprocess.check_output([javac, '-version'], stderr=subprocess.STDOUT)[6:-1].decode('utf-8') if LooseVersion(v) < LooseVersion('1.8.0_132'):