mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
tests: conditionally disable tests that can't work with apksigner
apksigner treats MD5 signatures as valid, fdroid does not.
This commit is contained in:
parent
6b013d01ac
commit
dff47beb01
1 changed files with 97 additions and 90 deletions
|
|
@ -305,12 +305,17 @@ cp $WORKSPACE/tests/urzip.apk \
|
||||||
$sed -i.tmp 's,archive_older = [0-9],archive_older = 3,' config.py
|
$sed -i.tmp 's,archive_older = [0-9],archive_older = 3,' config.py
|
||||||
|
|
||||||
$fdroid update --pretty --nosign
|
$fdroid update --pretty --nosign
|
||||||
|
if which apksigner; then
|
||||||
|
test `grep '<package>' archive/index.xml | wc -l` -eq 2
|
||||||
|
test `grep '<package>' repo/index.xml | wc -l` -eq 10
|
||||||
|
else
|
||||||
echo "This will fail when jarsigner allows MD5 for APK signatures"
|
echo "This will fail when jarsigner allows MD5 for APK signatures"
|
||||||
test `grep '<package>' archive/index.xml | wc -l` -eq 5
|
test `grep '<package>' archive/index.xml | wc -l` -eq 5
|
||||||
test `grep '<package>' repo/index.xml | wc -l` -eq 7
|
test `grep '<package>' repo/index.xml | wc -l` -eq 7
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
|
if ! which apksigner; then
|
||||||
echo_header 'test per-app "Archive Policy"'
|
echo_header 'test per-app "Archive Policy"'
|
||||||
|
|
||||||
REPOROOT=`create_test_dir`
|
REPOROOT=`create_test_dir`
|
||||||
|
|
@ -378,7 +383,7 @@ test -e archive/com.politedroid_4.apk
|
||||||
test -e archive/com.politedroid_5.apk
|
test -e archive/com.politedroid_5.apk
|
||||||
! test -e archive/com.politedroid_6.apk
|
! test -e archive/com.politedroid_6.apk
|
||||||
test -e repo/com.politedroid_6.apk
|
test -e repo/com.politedroid_6.apk
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
|
|
@ -505,6 +510,7 @@ test -e repo/org.bitbucket.tickytacky.mirrormirror_3.apk
|
||||||
test -e repo/org.bitbucket.tickytacky.mirrormirror_4.apk
|
test -e repo/org.bitbucket.tickytacky.mirrormirror_4.apk
|
||||||
test -e archive/urzip-badsig.apk
|
test -e archive/urzip-badsig.apk
|
||||||
|
|
||||||
|
if ! which apksigner; then
|
||||||
$sed -i.tmp '/allow_disabled_algorithms/d' config.py
|
$sed -i.tmp '/allow_disabled_algorithms/d' config.py
|
||||||
$fdroid update --pretty --nosign
|
$fdroid update --pretty --nosign
|
||||||
test `grep '<package>' archive/index.xml | wc -l` -eq 5
|
test `grep '<package>' archive/index.xml | wc -l` -eq 5
|
||||||
|
|
@ -528,6 +534,7 @@ test -e archive/urzip-badsig.apk
|
||||||
test -e repo/com.politedroid_4.apk
|
test -e repo/com.politedroid_4.apk
|
||||||
test -e repo/com.politedroid_5.apk
|
test -e repo/com.politedroid_5.apk
|
||||||
test -e repo/com.politedroid_6.apk
|
test -e repo/com.politedroid_6.apk
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue