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 - fdroid update --help
pyup_io_safety_check: pyup_io_safety_check:
image: archlinux/base image: alpine:3.7
variables:
LANG: C.UTF-8
script: script:
- pacman --sync --sysupgrade --refresh --noconfirm grep python-pip python-virtualenv tar - apk add --no-cache ca-certificates python3
- ./setup.py compile_catalog install - python3 -m ensurepip
- pip install safety - pip3 install safety
- safety check --full-report - safety check --full-report
pylint: 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/screenshot6.png
include tests/repo/org.videolan.vlc/en-US/sevenInchScreenshots/screenshot8.png include tests/repo/org.videolan.vlc/en-US/sevenInchScreenshots/screenshot8.png
include tests/repo/patch.1619.obb.mainpatch.current.obb 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/run-tests
include tests/signatures.TestCase include tests/signatures.TestCase
include tests/signindex/guardianproject.jar include tests/signindex/guardianproject.jar

2
fdroid
View file

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

View file

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

View file

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