From 74fb07b30208bf26e1aa467b9167ea94bd79bbeb Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 17 May 2018 13:39:14 +0200 Subject: [PATCH 1/5] gitlab-ci: switch pyup_io_safety_check to Alpine to be lighter --- .gitlab-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2dbea825..3cbb4b08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: From cef73e57949b0939aecb53efa297600dbefa4180 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 25 May 2018 10:00:52 +0200 Subject: [PATCH 2/5] remove unused variable, as reported by pyflakes --- fdroidserver/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index b886f200..f99f2824 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -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)) From 002a4ae50e8e7a9312f8b06edf9283501cdb368f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 18 May 2018 10:36:32 +0200 Subject: [PATCH 3/5] fix including unicode test APK in source tarball --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 4b6681ae..ec78c166 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 From 1daa1063c5b280ab864fb6d0942c431d42b9c296 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 18 May 2018 10:51:24 +0200 Subject: [PATCH 4/5] tests: keep strerr totally clean on successful runs Debian's autopkgtest defaults to considering any output on stderr as a sign that the tests failed. it is simple to make this achieve that standard, so it seems worth it for now at least. --- tests/run-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-tests b/tests/run-tests index cad3bf90..16ecfdb9 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -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 From 0a15a9b65be29dfd5beefa8389564e008a6e1c69 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 25 May 2018 09:52:17 +0200 Subject: [PATCH 5/5] tests: fix and test `fdroid deploy` --- fdroid | 2 +- tests/run-tests | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fdroid b/fdroid index ec9bae2c..4147119d 100755 --- a/fdroid +++ b/fdroid @@ -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 diff --git a/tests/run-tests b/tests/run-tests index 16ecfdb9..e0ea2aa1 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -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