mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-07-04 16:30:12 +02:00
tests: switch to python3
This commit is contained in:
parent
a1703f1204
commit
24ad0418e3
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||
|
||||
|
|
|
@ -51,10 +51,10 @@ cd $WORKSPACE/tests
|
|||
#------------------------------------------------------------------------------#
|
||||
# test building the source tarball, then installing it
|
||||
cd $WORKSPACE
|
||||
python2 setup.py sdist
|
||||
python3 setup.py sdist
|
||||
|
||||
rm -rf $WORKSPACE/env
|
||||
virtualenv --python=python2 $WORKSPACE/env
|
||||
virtualenv --python=python3 $WORKSPACE/env
|
||||
. $WORKSPACE/env/bin/activate
|
||||
pip install dist/fdroidserver-*.tar.gz
|
||||
|
||||
|
@ -66,10 +66,10 @@ fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests $apksource
|
|||
# test install using install direct from git repo
|
||||
cd $WORKSPACE
|
||||
rm -rf $WORKSPACE/env
|
||||
virtualenv --python=python2 --system-site-packages $WORKSPACE/env
|
||||
virtualenv --python=python3 --system-site-packages $WORKSPACE/env
|
||||
. $WORKSPACE/env/bin/activate
|
||||
pip install -e $WORKSPACE
|
||||
python2 setup.py install
|
||||
python3 setup.py install
|
||||
|
||||
# run tests in new pip+virtualenv install
|
||||
fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests $apksource
|
||||
|
@ -86,7 +86,7 @@ sh hooks/pre-commit
|
|||
cd $WORKSPACE
|
||||
set +e
|
||||
# use the virtualenv python so pylint checks against its installed libs
|
||||
PYTHONPATH=$WORKSPACE/.pylint-plugins python2 /usr/bin/pylint \
|
||||
PYTHONPATH=$WORKSPACE/.pylint-plugins python3 /usr/bin/pylint \
|
||||
--output-format=parseable --reports=n \
|
||||
--load-plugins astng_hashlib \
|
||||
fdroidserver/*.py fdroid makebuildserver setup.py > $WORKSPACE/pylint.parseable
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ fi
|
|||
|
||||
# allow the location of python to be overridden
|
||||
if [ -z $python ]; then
|
||||
python=python2
|
||||
python=python3
|
||||
fi
|
||||
|
||||
set -x # show each command as it is executed
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user