mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-19 21:30:10 +01:00
split pip tests to run separately for Ubuntu/trusty and Debian/stretch
Trying to reuse the pip test run is now a lot more work than just writing it cutstom for each target platform. Ubuntu/trusty does not have androguard 3.1.x nor aapt >= 26.x, so using trusty's aapt will always have errors scraping some names from APKs. This continues to use Google's binary. `apt-get update` is now disabled by default by Travis, this adds it back so that the latest files from the PPA are used. Here's one example of an issue with pip on trusty: https://github.com/requests/requests/issues/4006 pip3 install --quiet -e /home/travis/build/fdroidtravis/fdroidserver Exception: Traceback (most recent call last): File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2482, in _dep_map return self.__dep_map File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2344, in __getattr__ raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python3.4/site-packages/pip/commands/install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python3.4/site-packages/pip/req.py", line 1266, in prepare_files req_to_install.extras): File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2291, in requires dm = self._dep_map File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2484, in _dep_map self.__dep_map = self._compute_dependencies() File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2517, in _compute_dependencies common = frozenset(reqs_for_extra(None)) File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2514, in reqs_for_extra if req.marker_fn(override={'extra':extra}): File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/_markerlib/markers.py", line 113, in marker_fn return eval(compiled_marker, environment) File "<environment marker>", line 1, in <module> NameError: name 'platform_system' is not defined
This commit is contained in:
parent
3e0fa5c80e
commit
b3f45ca024
32
.travis.yml
32
.travis.yml
@ -24,27 +24,18 @@ matrix:
|
||||
# is used on Windows Subsystem for Linux.
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
sources:
|
||||
- sourceline: 'ppa:fdroid/fdroidserver'
|
||||
packages:
|
||||
- bash
|
||||
- dash
|
||||
- pylint
|
||||
- pep8
|
||||
- python3-babel
|
||||
- python3-dev
|
||||
- python3-pip
|
||||
- python3-ruamel.yaml
|
||||
- python3-setuptools
|
||||
- python3.4-venv
|
||||
- libjpeg-dev
|
||||
- zlib1g-dev
|
||||
- fdroidserver
|
||||
- python3-babel
|
||||
- python3-setuptools
|
||||
- fdroidserver
|
||||
|
||||
android:
|
||||
components:
|
||||
- android-23 # required for `fdroid build` test
|
||||
- build-tools-25.0.3 # required for `fdroid build` test
|
||||
- build-tools-27.0.3 # required for `fdroid build` test
|
||||
licenses:
|
||||
- 'android-sdk-preview-.+'
|
||||
- 'android-sdk-license-.+'
|
||||
@ -101,15 +92,12 @@ install:
|
||||
fi
|
||||
|
||||
# The OSX tests seem to run slower, they often timeout. So only run
|
||||
# the test suite with the installed version of fdroid, instead of the
|
||||
# three rounds that ./complete-ci-tests does.
|
||||
# the test suite with the installed version of fdroid.
|
||||
#
|
||||
# Supporting pip on Ubuntu/trusty was too painful here, since it seems
|
||||
# that pip installs conflict with the Ubuntu packages.
|
||||
script:
|
||||
- cd tests
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
./run-tests;
|
||||
else
|
||||
./complete-ci-tests;
|
||||
fi
|
||||
- ./tests/run-tests
|
||||
|
||||
after_failure:
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
|
@ -27,6 +27,11 @@ if [ -z $ANDROID_HOME ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! which pyvenv; then
|
||||
echo "pyvenv required to run this test suite!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
apksource=$1
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
@ -35,31 +40,12 @@ if [ -z $PIP_DOWNLOAD_CACHE ]; then
|
||||
export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache
|
||||
fi
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# required Java 7 or later keytool/jarsigner for :file support
|
||||
|
||||
export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# run local tests, don't scan fdroidserver/ project for APKs
|
||||
|
||||
cd $WORKSPACE/tests
|
||||
./run-tests $apksource
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# find pyvenv, to support Ubuntu/trusty's python3.4-venv
|
||||
|
||||
if which pyvenv; then
|
||||
pyvenv=pyvenv
|
||||
elif which pyvenv-3.4; then
|
||||
pyvenv=pyvenv-3.4
|
||||
else
|
||||
echo "pyvenv required to run this test suite!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# make sure that translations do not cause stacktraces
|
||||
@ -78,10 +64,8 @@ done
|
||||
# test install using install direct from git repo
|
||||
cd $WORKSPACE
|
||||
rm -rf $WORKSPACE/env
|
||||
$pyvenv $WORKSPACE/env
|
||||
pyvenv $WORKSPACE/env
|
||||
. $WORKSPACE/env/bin/activate
|
||||
# workaround https://github.com/pypa/setuptools/issues/937
|
||||
pip3 install --quiet setuptools==33.1.1 Babel
|
||||
pip3 install --quiet -e $WORKSPACE
|
||||
python3 setup.py compile_catalog install
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user