mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
verify: exit with error code if any APK fails to verify
This commit is contained in:
parent
a3a0b8dcf0
commit
5ff1b5ef37
@ -104,9 +104,11 @@ def main():
|
||||
logging.info("...NOT verified - {0}".format(e))
|
||||
notverified += 1
|
||||
|
||||
logging.info(_("Finished"))
|
||||
logging.info("{0} successfully verified".format(verified))
|
||||
logging.info("{0} NOT verified".format(notverified))
|
||||
if verified > 0:
|
||||
logging.info("{0} successfully verified".format(verified))
|
||||
if notverified > 0:
|
||||
logging.info("{0} NOT verified".format(notverified))
|
||||
sys.exit(notverified)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -447,6 +447,21 @@ test -e repo/com.politedroid_5.apk
|
||||
! test -e repo/com.politedroid_6.apk
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
echo_header 'test that verify can succeed and fail'
|
||||
|
||||
REPOROOT=`create_test_dir`
|
||||
cd $REPOROOT
|
||||
test -d tmp || mkdir tmp
|
||||
test -d unsigned || mkdir unsigned
|
||||
cp $WORKSPACE/tests/repo/com.politedroid_6.apk tmp/
|
||||
cp $WORKSPACE/tests/repo/com.politedroid_6.apk unsigned/
|
||||
$fdroid verify --reuse-remote-apk --verbose com.politedroid
|
||||
# force a fail
|
||||
cp $WORKSPACE/tests/repo/com.politedroid_5.apk unsigned/com.politedroid_6.apk
|
||||
! $fdroid verify --reuse-remote-apk --verbose com.politedroid
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
echo_header 'test allowing disabled signatures in repo and archive'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user