allow arbitrary build products, not only APKs

This makes it so that the final build product can be specified in output=
and it'll work no matter if its an APK or not.  This was developed around
the case of building the OTA update.zip for the Privileged Extension. It
should work for any build process in theory but it has not yet been tested.

https://gitlab.com/fdroid/privileged-extension/issues/9
This commit is contained in:
Hans-Christoph Steiner 2016-10-31 19:53:55 +01:00
parent 8ecff5bd61
commit 84e09cd2a2
4 changed files with 66 additions and 54 deletions

View file

@ -74,7 +74,7 @@ class CommonTest(unittest.TestCase):
testfiles.append(os.path.join(os.path.dirname(__file__), 'urzip-badsig.apk'))
testfiles.append(os.path.join(os.path.dirname(__file__), 'urzip-badcert.apk'))
for apkfile in testfiles:
debuggable = fdroidserver.common.isApkDebuggable(apkfile, config)
debuggable = fdroidserver.common.isApkAndDebuggable(apkfile, config)
self.assertTrue(debuggable,
"debuggable APK state was not properly parsed!")
# these are set NOT debuggable
@ -82,7 +82,7 @@ class CommonTest(unittest.TestCase):
testfiles.append(os.path.join(os.path.dirname(__file__), 'urzip-release.apk'))
testfiles.append(os.path.join(os.path.dirname(__file__), 'urzip-release-unsigned.apk'))
for apkfile in testfiles:
debuggable = fdroidserver.common.isApkDebuggable(apkfile, config)
debuggable = fdroidserver.common.isApkAndDebuggable(apkfile, config)
self.assertFalse(debuggable,
"debuggable APK state was not properly parsed!")