handle jarsigner/apksigner output cleanly for rational logging

These were both spamming the output with lots of confusing messages, even
when --verbose was not used.  Jarsigner especially has confusing messages,
since it has warnings that do not pertain to APK signatures at all, like
the ones about timestamps and missing Certificate Authority.

closes #405
This commit is contained in:
Hans-Christoph Steiner 2017-12-07 17:32:14 +01:00
parent 7f4d84684e
commit 6228162cbd
5 changed files with 88 additions and 20 deletions

View file

@ -45,18 +45,6 @@ class IndexTest(unittest.TestCase):
fdroidserver.common.config = config
fdroidserver.signindex.config = config
def test_verify_jar_signature_succeeds(self):
source_dir = os.path.join(self.basedir, 'signindex')
for f in ('testy.jar', 'guardianproject.jar'):
testfile = os.path.join(source_dir, f)
fdroidserver.common.verify_jar_signature(testfile)
def test_verify_jar_signature_fails(self):
source_dir = os.path.join(self.basedir, 'signindex')
testfile = os.path.join(source_dir, 'unsigned.jar')
with self.assertRaises(fdroidserver.index.VerificationException):
fdroidserver.common.verify_jar_signature(testfile)
def test_get_public_key_from_jar_succeeds(self):
source_dir = os.path.join(self.basedir, 'signindex')
for f in ('testy.jar', 'guardianproject.jar'):