Merge branch 'fix-tests' into 'master'

Fix tests and polish release

See merge request fdroid/fdroidserver!508
This commit is contained in:
Hans-Christoph Steiner 2018-05-25 08:51:18 +00:00
commit 5afba57212
5 changed files with 12 additions and 8 deletions

View file

@ -122,11 +122,13 @@ pip_install:
- fdroid update --help
pyup_io_safety_check:
image: archlinux/base
image: alpine:3.7
variables:
LANG: C.UTF-8
script:
- pacman --sync --sysupgrade --refresh --noconfirm grep python-pip python-virtualenv tar
- ./setup.py compile_catalog install
- pip install safety
- apk add --no-cache ca-certificates python3
- python3 -m ensurepip
- pip3 install safety
- safety check --full-report
pylint:

View file

@ -149,7 +149,7 @@ include tests/repo/org.videolan.vlc/en-US/sevenInchScreenshots/screenshot5.png
include tests/repo/org.videolan.vlc/en-US/sevenInchScreenshots/screenshot6.png
include tests/repo/org.videolan.vlc/en-US/sevenInchScreenshots/screenshot8.png
include tests/repo/patch.1619.obb.mainpatch.current.obb
include tests/repo/urzip-Rakhmaninov*.apk
include tests/repo/urzip-*.apk
include tests/run-tests
include tests/signatures.TestCase
include tests/signindex/guardianproject.jar

2
fdroid
View file

@ -126,7 +126,7 @@ def main():
# temporary workaround until server.py becomes deploy.py
if command == 'deploy':
command = 'server'
sys.argv.insert(1, 'update')
sys.argv.insert(2, 'update')
# Trick optparse into displaying the right usage when --help is used.
sys.argv[0] += ' ' + command

View file

@ -3215,7 +3215,7 @@ def calculate_math_string(expr):
if '#' in expr:
raise SyntaxError('no comments allowed')
return execute_ast(ast.parse(expr, mode='eval').body)
except SyntaxError as e:
except SyntaxError:
raise SyntaxError("could not parse expression '{expr}', "
"only basic math operations are allowed (+, -, *)"
.format(expr=expr))

View file

@ -112,7 +112,7 @@ fi
# allow the location of aapt to be overridden
if [ -z $aapt ]; then
aapt=`ls -1 $ANDROID_HOME/build-tools/*/aapt | sort | tail -1`
aapt=`ls -1 $ANDROID_HOME/build-tools/*/aapt 2> /dev/null | sort | tail -1`
fi
# try to use GNU sed on OSX/BSD cuz BSD sed sucks
@ -610,6 +610,7 @@ $fdroid gpgsign
$fdroid lint
$fdroid readmeta
$fdroid rewritemeta fake
$fdroid deploy
$fdroid server update
$fdroid scanner
@ -643,6 +644,7 @@ $fdroid init
$fdroid update --create-metadata --verbose
$fdroid readmeta
$fdroid server update --local-copy-dir=/tmp/fdroid
$fdroid deploy --local-copy-dir=/tmp/fdroid --verbose
# now test the errors work
set +e